]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: VMX: Drop intermediate "guest" field from msr_autostore
authorSean Christopherson <seanjc@google.com>
Sat, 6 Dec 2025 00:17:11 +0000 (16:17 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 8 Jan 2026 19:52:17 +0000 (11:52 -0800)
commit462f092dc55c0eb97da02dd0c773a4394850dd1b
treea013c6f4b3d2166bd56a0f8fc1ad7dbb57558c5c
parentb0b6a8d3be16ea742bf835407e9968378c0c753c
KVM: VMX: Drop intermediate "guest" field from msr_autostore

Drop the intermediate "guest" field from vcpu_vmx.msr_autostore as the
value saved on VM-Exit isn't guaranteed to be the guest's value, it's
purely whatever is in hardware at the time of VM-Exit.  E.g. KVM's only
use of the store list at the momemnt is to snapshot TSC at VM-Exit, and
the value saved is always the raw TSC even if TSC-offseting and/or
TSC-scaling is enabled for the guest.

And unlike msr_autoload, there is no need differentiate between "on-entry"
and "on-exit".

No functional change intended.

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