]> Gentwo Git Trees - linux/.git/commit
KVM: x86: Call out MSR_IA32_S_CET is not handled by XSAVES
authorChao Gao <chao.gao@intel.com>
Tue, 28 Oct 2025 06:01:41 +0000 (23:01 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 4 Nov 2025 17:14:26 +0000 (09:14 -0800)
commitcab4098be41826a91b55cdc851196d73d7057f9c
tree411adec4b900563b23d5e20a2e0d60b124d356e5
parent9bc610b6a2a71d1a6acac27e82a0bc8ca861c7ac
KVM: x86: Call out MSR_IA32_S_CET is not handled by XSAVES

Update the comment above is_xstate_managed_msr() to note that
MSR_IA32_S_CET isn't saved/restored by XSAVES/XRSTORS.

MSR_IA32_S_CET isn't part of CET_U/S state as the SDM states:
  The register state used by Control-Flow Enforcement Technology (CET)
  comprises the two 64-bit MSRs (IA32_U_CET and IA32_PL3_SSP) that manage
  CET when CPL = 3 (CET_U state); and the three 64-bit MSRs
  (IA32_PL0_SSP–IA32_PL2_SSP) that manage CET when CPL < 3 (CET_S state).

Opportunistically shift the snippet about the safety of loading certain
MSRs to the function comment for kvm_access_xstate_msr(), which is where
the MSRs are actually loaded into hardware.

Fixes: e44eb58334bb ("KVM: x86: Load guest FPU state when access XSAVE-managed MSRs")
Signed-off-by: Chao Gao <chao.gao@intel.com>
Link: https://patch.msgid.link/20251028060142.29830-1-chao.gao@intel.com
[sean: shift snippet about safety to kvm_access_xstate_msr()]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c