linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Keep index within boundaries in kvmppc_44x_emul_tlbwe()
@ 2010-05-09 15:26 Roel Kluin
  2010-05-09 19:06 ` Alexander Graf
  2010-05-10 22:58 ` Hollis Blanchard
  0 siblings, 2 replies; 5+ messages in thread
From: Roel Kluin @ 2010-05-09 15:26 UTC (permalink / raw)
  To: Alexander Graf, kvm-ppc, Andrew Morton, LKML

An index of KVM44x_GUEST_TLB_SIZE is already one too large.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 arch/powerpc/kvm/44x_tlb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c
index 2570fcc..8123125 100644
--- a/arch/powerpc/kvm/44x_tlb.c
+++ b/arch/powerpc/kvm/44x_tlb.c
@@ -440,7 +440,7 @@ int kvmppc_44x_emul_tlbwe(struct kvm_vcpu *vcpu, u8 ra, u8 rs, u8 ws)
 	unsigned int gtlb_index;
 
 	gtlb_index = kvmppc_get_gpr(vcpu, ra);
-	if (gtlb_index > KVM44x_GUEST_TLB_SIZE) {
+	if (gtlb_index >= KVM44x_GUEST_TLB_SIZE) {
 		printk("%s: index %d\n", __func__, gtlb_index);
 		kvmppc_dump_vcpu(vcpu);
 		return EMULATE_FAIL;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-12 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-09 15:26 Keep index within boundaries in kvmppc_44x_emul_tlbwe() Roel Kluin
2010-05-09 19:06 ` Alexander Graf
2010-05-10 22:58 ` Hollis Blanchard
2010-05-10 23:10   ` Alexander Graf
2010-05-12 20:23     ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).