[RFC PATCH 4/4] KVM: PPC: e500mc: Advertise E.PT to support HTW guests

Mihai Caraman
2014-07-03T14:45:54Z

Enable E.PT for vcpus with MMU MAV 2.0 to support Hardware Page Tablewalk (HTW)
in guests.

Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
---
arch/powerpc/kvm/e500_mmu.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c
index b775e6a..1de0cd6 100644
--- a/arch/powerpc/kvm/e500_mmu.c
+++ b/arch/powerpc/kvm/e500_mmu.c
@@ -945,11 +945,7 @@ static int vcpu_mmu_init(struct kvm_vcpu *vcpu,
vcpu->arch.tlbps[1] = mfspr(SPRN_TLB1PS);

vcpu->arch.mmucfg &= ~MMUCFG_LRAT;
-
- /* Guest mmu emulation currently doesn't handle E.PT */
- vcpu->arch.eptcfg = 0;
- vcpu->arch.tlbcfg[0] &= ~TLBnCFG_PT;
- vcpu->arch.tlbcfg[1] &= ~TLBnCFG_IND;
+ vcpu->arch.eptcfg = mfspr(SPRN_EPTCFG);
}

return 0;
--
1.7.11.7