]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Move nested_run_pending to kvm_vcpu_arch
authorYosry Ahmed <yosry@kernel.org>
Thu, 12 Mar 2026 23:48:22 +0000 (16:48 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 3 Apr 2026 16:33:30 +0000 (09:33 -0700)
commit3d4470d71fbf70576636947aba1ae51adbad5225
tree286f0c3ed05c8d11142601eca4591d309c17ffbd
parent520a1347faf46c2c00c3499de05fdecc6d254c2e
KVM: x86: Move nested_run_pending to kvm_vcpu_arch

Move nested_run_pending field present in both svm_nested_state and
nested_vmx to the common kvm_vcpu_arch. This allows for common code to
use without plumbing it through per-vendor helpers.

nested_run_pending remains zero-initialized, as the entire kvm_vcpu
struct is, and all further accesses are done through vcpu->arch instead
of svm->nested or vmx->nested.

No functional change intended.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
[sean: expand the commend in the field declaration]
Link: https://patch.msgid.link/20260312234823.3120658-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h