]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: SVM: Add a helper to detect VMRUN failures
authorSean Christopherson <seanjc@google.com>
Tue, 30 Dec 2025 21:13:40 +0000 (13:13 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 14 Jan 2026 01:37:03 +0000 (17:37 -0800)
commit217463aa329ea9a2efafd1bbfa6787e8df9091b9
tree5d71710b5edaa9814258c13f1f481244e20cfcfa
parentd23051f59a5b4eb1f6163cf27e07b8cfcaeb4758
KVM: SVM: Add a helper to detect VMRUN failures

Add a helper to detect VMRUN failures so that KVM can guard against its
own long-standing bug, where KVM neglects to set exitcode[63:32] when
synthesizing a nested VMFAIL_INVALID VM-Exit.  This will allow fixing
KVM's mess of treating exitcode as two separate 32-bit values without
breaking KVM-on-KVM when running on an older, unfixed KVM.

Cc: Jim Mattson <jmattson@google.com>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Link: https://patch.msgid.link/20251230211347.4099600-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h