]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Drop superfluous host XSAVE check when adjusting guest XSAVES caps
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:34:18 +0000 (17:34 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:20:17 +0000 (14:20 -0800)
commitcbdeea032bfe24ad9ef13a0c476ada405316758d
tree6aa559234dbf979340314007770488993cd150b1
parent8f2a27752e808f16f3baf1939a91c42966f22a08
KVM: x86: Drop superfluous host XSAVE check when adjusting guest XSAVES caps

Drop the manual boot_cpu_has() checks on XSAVE when adjusting the guest's
XSAVES capabilities now that guest cpu_caps incorporates KVM's support.
The guest's cpu_caps are initialized from kvm_cpu_caps, which are in turn
initialized from boot_cpu_data, i.e. checking guest_cpu_cap_has() also
checks host/KVM capabilities (which is the entire point of cpu_caps).

Cc: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-52-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c