linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: powerpc: beyond ARRAY_SIZE of vcpu->arch.guest_tlb
@ 2009-05-21 19:53 Roel Kluin
  2009-05-31 12:00 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-05-21 19:53 UTC (permalink / raw)
  To: avi, paulmck; +Cc: linuxppc-dev, Andrew Morton, kvm

Do not go beyond ARRAY_SIZE of vcpu->arch.guest_tlb

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index 0fce4fb..c2cfd46 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -125,7 +125,7 @@ static int kvmppc_emul_tlbwe(struct kvm_vcpu *vcpu, u32 inst)
 	ws = get_ws(inst);
 
 	index = vcpu->arch.gpr[ra];
-	if (index > PPC44x_TLB_SIZE) {
+	if (index >= PPC44x_TLB_SIZE) {
 		printk("%s: index %d\n", __func__, index);
 		kvmppc_dump_vcpu(vcpu);
 		return EMULATE_FAIL;

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

* Re: [PATCH] KVM: powerpc: beyond ARRAY_SIZE of vcpu->arch.guest_tlb
  2009-05-21 19:53 [PATCH] KVM: powerpc: beyond ARRAY_SIZE of vcpu->arch.guest_tlb Roel Kluin
@ 2009-05-31 12:00 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-05-31 12:00 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linuxppc-dev, Andrew Morton, paulmck, kvm

Roel Kluin wrote:
> Do not go beyond ARRAY_SIZE of vcpu->arch.guest_tlb
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
> index 0fce4fb..c2cfd46 100644
> --- a/arch/powerpc/kvm/emulate.c
> +++ b/arch/powerpc/kvm/emulate.c
> @@ -125,7 +125,7 @@ static int kvmppc_emul_tlbwe(struct kvm_vcpu *vcpu, u32 inst)
>  	ws = get_ws(inst);
>  
>  	index = vcpu->arch.gpr[ra];
> -	if (index > PPC44x_TLB_SIZE) {
> +	if (index >= PPC44x_TLB_SIZE) {
>  		printk("%s: index %d\n", __func__, index);
>  		kvmppc_dump_vcpu(vcpu);
>  		return EMULATE_FAIL;
>   

This code no longer exists in kvm.git.

-- 
error compiling committee.c: too many arguments to function

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

end of thread, other threads:[~2009-05-31 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21 19:53 [PATCH] KVM: powerpc: beyond ARRAY_SIZE of vcpu->arch.guest_tlb Roel Kluin
2009-05-31 12:00 ` Avi Kivity

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).