]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: VMX: Compartmentalize adding MSRs to host vs. guest auto-load list
authorSean Christopherson <seanjc@google.com>
Sat, 6 Dec 2025 00:17:17 +0000 (16:17 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 8 Jan 2026 19:52:21 +0000 (11:52 -0800)
commit2239d137a71d77c7610434473b0c8cfde90d4116
tree678f997656e4d32a324e313c70316644f46bd20a
parent0c4ff0866fc1b0bf8c1d8d5f27fedc6dd9c51183
KVM: VMX: Compartmentalize adding MSRs to host vs. guest auto-load list

Undo the bundling of the "host" and "guest" MSR auto-load list logic so
that the code can be deduplicated by factoring out the logic to a separate
helper.  Now that "list full" situations are treated as fatal to the VM,
there is no need to pre-check both lists.

For all intents and purposes, this reverts the add_atomic_switch_msr()
changes made by commit 3190709335dd ("x86/KVM/VMX: Separate the VMX
AUTOLOAD guest/host number accounting").

Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Tested-by: Manali Shukla <manali.shukla@amd.com>
Link: https://patch.msgid.link/20251206001720.468579-42-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/vmx.c