From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: [PATCH 05/14] KVM: PPC: e500: tlbsx: fix tlb0 esel Date: Mon, 31 Oct 2011 08:53:07 +0100 Message-ID: <1320047596-20577-6-git-send-email-agraf@suse.de> References: <1320047596-20577-1-git-send-email-agraf@suse.de> Cc: kvm list , Marcelo Tosatti , Scott Wood To: kvm-ppc@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:52379 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754142Ab1JaHo0 (ORCPT ); Mon, 31 Oct 2011 03:44:26 -0400 In-Reply-To: <1320047596-20577-1-git-send-email-agraf@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: From: Scott Wood It should contain the way, not the absolute TLB0 index. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500_tlb.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index f19ae2f..ec17148 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -853,6 +853,8 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) } if (gtlbe) { + esel &= vcpu_e500->gtlb_params[tlbsel].ways - 1; + vcpu_e500->mas0 = MAS0_TLBSEL(tlbsel) | MAS0_ESEL(esel) | MAS0_NV(vcpu_e500->gtlb_nv[tlbsel]); vcpu_e500->mas1 = gtlbe->mas1; -- 1.6.0.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Mon, 31 Oct 2011 07:53:07 +0000 Subject: [PATCH 05/14] KVM: PPC: e500: tlbsx: fix tlb0 esel Message-Id: <1320047596-20577-6-git-send-email-agraf@suse.de> List-Id: References: <1320047596-20577-1-git-send-email-agraf@suse.de> In-Reply-To: <1320047596-20577-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org Cc: kvm list , Marcelo Tosatti , Scott Wood From: Scott Wood It should contain the way, not the absolute TLB0 index. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500_tlb.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index f19ae2f..ec17148 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -853,6 +853,8 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) } if (gtlbe) { + esel &= vcpu_e500->gtlb_params[tlbsel].ways - 1; + vcpu_e500->mas0 = MAS0_TLBSEL(tlbsel) | MAS0_ESEL(esel) | MAS0_NV(vcpu_e500->gtlb_nv[tlbsel]); vcpu_e500->mas1 = gtlbe->mas1; -- 1.6.0.2