Files
linux/arch/x86/include/asm
Jing Liu 1df4fd834e x86/fpu: Prepare xfd_err in struct fpu_guest
When XFD causes an instruction to generate #NM, IA32_XFD_ERR
contains information about which disabled state components are
being accessed. The #NM handler is expected to check this
information and then enable the state components by clearing
IA32_XFD for the faulting task (if having permission).

If the XFD_ERR value generated in guest is consumed/clobbered
by the host before the guest itself doing so, it may lead to
non-XFD-related #NM treated as XFD #NM in host (due to non-zero
value in XFD_ERR), or XFD-related #NM treated as non-XFD #NM in
guest (XFD_ERR cleared by the host #NM handler).

Introduce a new field in fpu_guest to save the guest xfd_err value.
KVM is expected to save guest xfd_err before interrupt is enabled
and restore it right before entering the guest (with interrupt
disabled).

Signed-off-by: Jing Liu <jing2.liu@intel.com>
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-12-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-01-14 13:44:08 -05:00
..
2021-10-20 22:35:04 +02:00
2021-03-18 15:31:53 +01:00
2021-05-05 21:50:13 +02:00
2020-01-23 10:41:20 -08:00
2021-03-18 15:31:53 +01:00
2021-09-08 15:32:35 -07:00
2020-05-07 16:06:20 +02:00
2021-10-28 23:25:26 +02:00
2020-10-28 20:26:25 +01:00
2021-10-05 21:48:30 +02:00
2021-03-31 16:20:22 +02:00
2020-11-26 12:58:56 +01:00
2019-04-16 12:26:18 +02:00
2020-11-06 23:14:58 +01:00
2021-05-12 14:54:56 +02:00
2020-09-16 16:52:28 +02:00
2021-10-26 10:18:09 +02:00
2021-10-05 21:48:30 +02:00
2021-06-22 13:56:43 +02:00
2021-07-01 11:06:03 -07:00
2021-10-20 15:27:25 +02:00
2021-05-12 20:00:51 +02:00
2019-04-10 09:53:31 +02:00
2020-03-21 16:03:25 +01:00
2020-11-17 14:36:13 +01:00
2020-03-23 18:45:14 +01:00
2020-01-14 12:20:58 +01:00