summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLiu Yu <yu.liu@freescale.com>2009-03-17 16:57:45 +0800
committerAvi Kivity <avi@redhat.com>2009-03-24 11:03:14 +0200
commitbc35cbc85cd78213590761618a13da6a9707652c (patch)
tree12f0075b62b53fb40e472f1b42fd3188883daa5d /arch/powerpc
parent4539b35881ae9664b0e2953438dd83f5ee02c0b4 (diff)
downloadop-kernel-dev-bc35cbc85cd78213590761618a13da6a9707652c.zip
op-kernel-dev-bc35cbc85cd78213590761618a13da6a9707652c.tar.gz
KVM: ppc: e500: Fix the bug that mas0 update to wrong value when read TLB entry
Should clear and then update the next victim area here. Guest kernel only read TLB1 when startup kernel, this bug result in an extra 4K TLB1 mapping in guest from 0x0 to 0x0. As the problem has no impact to bootup a guest, we didn't notice it before. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kvm/e500_tlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index 72386dd..ec93320 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -448,7 +448,7 @@ int kvmppc_e500_emul_tlbre(struct kvm_vcpu *vcpu)
esel = get_tlb_esel(vcpu_e500, tlbsel);
gtlbe = &vcpu_e500->guest_tlb[tlbsel][esel];
- vcpu_e500->mas0 &= MAS0_NV(0);
+ vcpu_e500->mas0 &= ~MAS0_NV(~0);
vcpu_e500->mas0 |= MAS0_NV(vcpu_e500->guest_tlb_nv[tlbsel]);
vcpu_e500->mas1 = gtlbe->mas1;
vcpu_e500->mas2 = gtlbe->mas2;
OpenPOWER on IntegriCloud