x86/fpu: Provide fpu_update_guest_xfd() for IA32_XFD emulation
authorKevin Tian <kevin.tian@intel.com>
Wed, 5 Jan 2022 12:35:20 +0000 (04:35 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Jan 2022 18:43:22 +0000 (13:43 -0500)
commit8eb9a48ac1e86a8a59f7123b529d6e498fb1f163
treef25e5222256212c863df324a76f714dd2d26bfc7
parent5ab2f45bba4894a0db4af8567da3efd6228dd010
x86/fpu: Provide fpu_update_guest_xfd() for IA32_XFD emulation

Guest XFD can be updated either in the emulation path or in the
restore path.

Provide a wrapper to update guest_fpu::fpstate::xfd. If the guest
fpstate is currently in-use, also update the per-cpu xfd cache and
the actual MSR.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jing Liu <jing2.liu@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20220105123532.12586-10-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/fpu/api.h
arch/x86/kernel/fpu/core.c