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

login
register
mail settings
Submitter Mihai Caraman
Date July 3, 2014, 2:45 p.m.
Message ID <1404398727-12844-5-git-send-email-mihai.caraman@freescale.com>
Download mbox | patch
Permalink /patch/366899/
State Not Applicable
Headers show

Comments

Mihai Caraman - July 3, 2014, 2:45 p.m.
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(-)

Patch

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;