From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: powerpc: beyond ARRAY_SIZE of vcpu->arch.guest_tlb Date: Sun, 31 May 2009 15:00:24 +0300 Message-ID: <4A227158.6050605@redhat.com> References: <4A15B129.8070700@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: paulmck@linux.vnet.ibm.com, Andrew Morton , kvm@vger.kernel.org, linuxppc-dev@ozlabs.org To: Roel Kluin Return-path: Received: from mx2.redhat.com ([66.187.237.31]:53888 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753382AbZEaMBF (ORCPT ); Sun, 31 May 2009 08:01:05 -0400 In-Reply-To: <4A15B129.8070700@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Roel Kluin wrote: > Do not go beyond ARRAY_SIZE of vcpu->arch.guest_tlb > > Signed-off-by: Roel Kluin > --- > 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