diff options
Diffstat (limited to 'arch/powerpc/kvm/e500_emulate.c')
-rw-r--r-- | arch/powerpc/kvm/e500_emulate.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c index e78f353a836a..b10a01243abd 100644 --- a/arch/powerpc/kvm/e500_emulate.c +++ b/arch/powerpc/kvm/e500_emulate.c | |||
@@ -284,6 +284,16 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val) | |||
284 | case SPRN_TLB1CFG: | 284 | case SPRN_TLB1CFG: |
285 | *spr_val = vcpu->arch.tlbcfg[1]; | 285 | *spr_val = vcpu->arch.tlbcfg[1]; |
286 | break; | 286 | break; |
287 | case SPRN_TLB0PS: | ||
288 | if (!has_feature(vcpu, VCPU_FTR_MMU_V2)) | ||
289 | return EMULATE_FAIL; | ||
290 | *spr_val = vcpu->arch.tlbps[0]; | ||
291 | break; | ||
292 | case SPRN_TLB1PS: | ||
293 | if (!has_feature(vcpu, VCPU_FTR_MMU_V2)) | ||
294 | return EMULATE_FAIL; | ||
295 | *spr_val = vcpu->arch.tlbps[1]; | ||
296 | break; | ||
287 | case SPRN_L1CSR0: | 297 | case SPRN_L1CSR0: |
288 | *spr_val = vcpu_e500->l1csr0; | 298 | *spr_val = vcpu_e500->l1csr0; |
289 | break; | 299 | break; |
@@ -307,6 +317,15 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val) | |||
307 | case SPRN_MMUCFG: | 317 | case SPRN_MMUCFG: |
308 | *spr_val = vcpu->arch.mmucfg; | 318 | *spr_val = vcpu->arch.mmucfg; |
309 | break; | 319 | break; |
320 | case SPRN_EPTCFG: | ||
321 | if (!has_feature(vcpu, VCPU_FTR_MMU_V2)) | ||
322 | return EMULATE_FAIL; | ||
323 | /* | ||
324 | * Legacy Linux guests access EPTCFG register even if the E.PT | ||
325 | * category is disabled in the VM. Give them a chance to live. | ||
326 | */ | ||
327 | *spr_val = vcpu->arch.eptcfg; | ||
328 | break; | ||
310 | 329 | ||
311 | /* extra exceptions */ | 330 | /* extra exceptions */ |
312 | case SPRN_IVOR32: | 331 | case SPRN_IVOR32: |