Skip to content

Commit 51d165e

Browse files
rhythm16oupton
authored andcommitted
KVM: arm64: Remove stage 2 read fault check
In the non-NV case, read permission is always granted when mapping stage-2, so checking for it doesn't bring much. On the other hand, shadow stage-2 for NV guests could potentially have non-readable mappings when we align the permissions with those that L1 set for L2, we shouldn't be checking for read faults in this case either. So just remove this check. Suggested-by: Oliver Upton <[email protected]> Suggested-by: Marc Zyngier <[email protected]> Signed-off-by: Wei-Lin Chang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 2dc720e commit 51d165e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/arm64/kvm/mmu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,11 +1545,6 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
15451545
exec_fault = kvm_vcpu_trap_is_exec_fault(vcpu);
15461546
VM_BUG_ON(write_fault && exec_fault);
15471547

1548-
if (fault_is_perm && !write_fault && !exec_fault) {
1549-
kvm_err("Unexpected L2 read permission error\n");
1550-
return -EFAULT;
1551-
}
1552-
15531548
if (!is_protected_kvm_enabled())
15541549
memcache = &vcpu->arch.mmu_page_cache;
15551550
else

0 commit comments

Comments
 (0)