On Fri, Apr 19, 2024, vsntk18@xxxxxxxxx wrote: > From: Vasant Karasulli <vkarasulli@xxxxxxx> > > Processing CPUID #VC for AMD SEV-ES requires copying xcr0 into GHCB. > Move the xsave read/write helpers used by xsave testcase to lib/x86 > to share as common code. This doesn't make any sense, processor.h _is_ common code. And using get_supported_xcr0(), which does CPUID, in a #VC handler is even more nonsensical. Indeed, it's still used only by test_xsave() at the end of this series. > Signed-off-by: Varad Gautam <varad.gautam@xxxxxxxx> > Signed-off-by: Vasant Karasulli <vkarasulli@xxxxxxx> > Reviewed-by: Marc Orr <marcorr@xxxxxxxxxx> > --- > lib/x86/processor.h | 10 ---------- > lib/x86/xsave.c | 26 ++++++++++++++++++++++++++ > lib/x86/xsave.h | 15 +++++++++++++++ > x86/Makefile.common | 1 + > x86/xsave.c | 17 +---------------- > 5 files changed, 43 insertions(+), 26 deletions(-) > create mode 100644 lib/x86/xsave.c > create mode 100644 lib/x86/xsave.h