]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: Add a helper to dedup reporting of unhandled VM-Exits
authorSean Christopherson <seanjc@google.com>
Thu, 30 Oct 2025 18:50:03 +0000 (11:50 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 4 Nov 2025 17:14:47 +0000 (09:14 -0800)
commit65a70164aba7c5d3b37a2d1e04a8d19c9d980994
tree0f2bdc5ed436909a02da39f2c514608762ce526e
parent211ddde0823f1442e4ad052a2f30f050145ccada
KVM: x86: Add a helper to dedup reporting of unhandled VM-Exits

Add and use a helper, kvm_prepare_unexpected_reason_exit(), to dedup the
code that fills the exit reason and CPU when KVM encounters a VM-Exit that
KVM doesn't know how to handle.

Reviewed-by: yaoyuan@linux.alibaba.com
Reviewed-by: Yao Yuan <yaoyuan@linux.alibaba.com>
Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://patch.msgid.link/20251030185004.3372256-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/tdx.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c