瀏覽代碼

KVM: PPC: e500: tlbsx: fix tlb0 esel

It should contain the way, not the absolute TLB0 index.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Scott Wood 14 年之前
父節點
當前提交
303b7c97e3
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      arch/powerpc/kvm/e500_tlb.c

+ 2 - 0
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;