On Fri, Oct 24, 2025 at 02:56:23PM +0800, Zhao Liu wrote: >From: Yang Weijiang <[email protected]> > >Add CET_U/S bits in xstate area and report support in xstate >feature mask. >MSR_XSS[bit 11] corresponds to CET user mode states. >MSR_XSS[bit 12] corresponds to CET supervisor mode states. > >CET Shadow Stack(SHSTK) and Indirect Branch Tracking(IBT) features >are enumerated via CPUID.(EAX=07H,ECX=0H):ECX[7] and EDX[20] >respectively, two features share the same state bits in XSS, so >if either of the features is enabled, set CET_U and CET_S bits >together. > >Tested-by: Farrah Chen <[email protected]> >Signed-off-by: Yang Weijiang <[email protected]> >Co-developed-by: Chao Gao <[email protected]> >Signed-off-by: Chao Gao <[email protected]> >Co-developed-by: Zhao Liu <[email protected]> >Signed-off-by: Zhao Liu <[email protected]>
It just occurred to me that KVM_GET/SET_XSAVE don't save/restore supervisor states. Supervisor states need to be saved/restored via MSR APIs. So, there is no need to add supervisor states (including ARCH_LBR states) to x86_ext_save_areas[].
