]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: nv: Mark VM as bugged for unexpected VNCR abort
authorOliver Upton <oupton@kernel.org>
Thu, 18 Jun 2026 23:42:06 +0000 (16:42 -0700)
committerMarc Zyngier <maz@kernel.org>
Mon, 22 Jun 2026 09:43:25 +0000 (10:43 +0100)
KVM is unlikely to resolve an unexpected VNCR abort, meaning that
returning to the guest will likely leave the vCPU stuck in an abort
loop. Bug the VM and exit to userspace instead.

Signed-off-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/20260618234207.1063941-6-oupton@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/nested.c

index d4c9a9b05e3ff289184013ee9d013438609fd994..94df26de6990c3ed81cc46ec57ed5036f42b2da3 100644 (file)
@@ -1491,8 +1491,8 @@ int kvm_handle_vncr_abort(struct kvm_vcpu *vcpu)
                return kvm_handle_guest_sea(vcpu);
 
        if (!esr_fsc_is_translation_fault(esr) && !esr_fsc_is_permission_fault(esr)) {
-               WARN_ONCE(1, "Unhandled VNCR abort, ESR=%llx\n", esr);
-               return 1;
+               KVM_BUG(1, vcpu->kvm, "Unhandled VNCR abort, ESR=%llx\n", esr);
+               return -EIO;
        }
 
        ret = kvm_translate_vncr(vcpu, &is_gmem);