@@ -499,15 +499,6 @@ static int kvmppc_mmu_book3s_64_hv_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
gpte->may_write = hpte_write_permission(pp, key);
gpte->may_execute = gpte->may_read && !(gr & (HPTE_R_N | HPTE_R_G));
- /* Storage key permission check for POWER7 */
- if (data && virtmode && cpu_has_feature(CPU_FTR_ARCH_206)) {
- int amrfield = hpte_get_skey_perm(gr, vcpu->arch.amr);
- if (amrfield & 1)
- gpte->may_read = 0;
- if (amrfield & 2)
- gpte->may_write = 0;
- }
-
/* Get the guest physical address */
gpte->raddr = kvmppc_mmu_get_real_addr(v, gr, eaddr);
return 0;
@@ -925,15 +925,6 @@ long kvmppc_hpte_hv_fault(struct kvm_vcpu *vcpu, unsigned long addr,
return status | DSISR_PROTFAULT;
}
- /* Check storage key, if applicable */
- if (data && (vcpu->arch.shregs.msr & MSR_DR)) {
- unsigned int perm = hpte_get_skey_perm(gr, vcpu->arch.amr);
- if (status & DSISR_ISSTORE)
- perm >>= 1;
- if (perm & 1)
- return status | DSISR_KEYFAULT;
- }
-
/* Save HPTE info for virtual-mode handler */
vcpu->arch.pgfault_addr = addr;
vcpu->arch.pgfault_index = index;
Since we do don't support virtual page class key protection mechanism in the guest, we should not find a keyfault that needs to be forwarded to the guest. So remove the dead code. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 9 --------- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 9 --------- 2 files changed, 18 deletions(-)