> > 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[]. > > x86_ext_save_areas[] is not used only for xsave state, it's also used for > the setup of xsave features, i.e., CPUID leaf 0xD.
Yes. And it can also maintain dependencies. > And you did catch the missing part of this series, it lacks the save/restore > of CET XSAVE state in x86_cpu_xsave_all_areas()/x86_cpu_xrstor_all_areas() Not a missing part. CET's xstates contain CET related MSRs and actually is saved/restored via MSR ioctls, not KVM_GET/SET_XSAVE. Regards, Zhao
