summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/e500_emulate.c
diff options
context:
space:
mode:
authorMihai Caraman <mihai.caraman@freescale.com>2013-04-11 00:03:11 +0000
committerAlexander Graf <agraf@suse.de>2013-04-26 20:27:08 +0200
commit9a6061d7fdedbf025549adf5c9d920d90bbf4a69 (patch)
tree65057dad1b9ed9255175c19b8fe52cad37d91500 /arch/powerpc/kvm/e500_emulate.c
parent307d9008ed4f28920e0e78719e10d0f407341e00 (diff)
downloadlinux-9a6061d7fdedbf025549adf5c9d920d90bbf4a69.tar.bz2
KVM: PPC: e500: Add support for EPTCFG register
EPTCFG register defined by E.PT is accessed unconditionally by Linux guests in the presence of MAV 2.0. Emulate it now. Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/e500_emulate.c')
-rw-r--r--arch/powerpc/kvm/e500_emulate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c
index 12b8de2f91ed..b10a01243abd 100644
--- a/arch/powerpc/kvm/e500_emulate.c
+++ b/arch/powerpc/kvm/e500_emulate.c
@@ -317,6 +317,15 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val)
case SPRN_MMUCFG:
*spr_val = vcpu->arch.mmucfg;
break;
+ case SPRN_EPTCFG:
+ if (!has_feature(vcpu, VCPU_FTR_MMU_V2))
+ return EMULATE_FAIL;
+ /*
+ * Legacy Linux guests access EPTCFG register even if the E.PT
+ * category is disabled in the VM. Give them a chance to live.
+ */
+ *spr_val = vcpu->arch.eptcfg;
+ break;
/* extra exceptions */
case SPRN_IVOR32: