Skip to content

Commit 54dc0d2

Browse files
willdeaconMarc Zyngier
authored andcommitted
KVM: arm64: Don't skip cache maintenance for read-only memslots
If a guest performs cache maintenance on a read-only memslot, we should inform userspace rather than skip the instruction altogether. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Quentin Perret <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 84b951a commit 54dc0d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, struct kvm_run *run)
21212121
* So let's assume that the guest is just being
21222122
* cautious, and skip the instruction.
21232123
*/
2124-
if (kvm_vcpu_dabt_is_cm(vcpu)) {
2124+
if (kvm_is_error_hva(hva) && kvm_vcpu_dabt_is_cm(vcpu)) {
21252125
kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
21262126
ret = 1;
21272127
goto out_unlock;

0 commit comments

Comments
 (0)