summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/cpuid.c
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2016-11-09 19:07:06 +0100
committerRadim Krčmář <rkrcmar@redhat.com>2016-11-16 22:09:46 +0100
commit283c95d0e3891b64087706b344a4b545d04a6e62 (patch)
treeed7d530132e7ef7607fc07fc70139d23e697203c /arch/x86/kvm/cpuid.c
parentaabba3c6abd50b05b1fc2c6ec44244aa6bcda576 (diff)
downloadlinux-283c95d0e3891b64087706b344a4b545d04a6e62.tar.gz
linux-283c95d0e3891b64087706b344a4b545d04a6e62.tar.xz
KVM: x86: emulate FXSAVE and FXRSTOR
Internal errors were reported on 16 bit fxsave and fxrstor with ipxe. Old Intels don't have unrestricted_guest, so we have to emulate them. The patch takes advantage of the hardware implementation. AMD and Intel differ in saving and restoring other fields in first 32 bytes. A test wrote 0xff to the fxsave area, 0 to upper bits of MCSXR in the fxsave area, executed fxrstor, rewrote the fxsave area to 0xee, and executed fxsave: Intel (Nehalem): 7f 1f 7f 7f ff 00 ff 07 ff ff ff ff ff ff 00 00 ff ff ff ff ff ff 00 00 ff ff 00 00 ff ff 00 00 Intel (Haswell -- deprecated FPU CS and FPU DS): 7f 1f 7f 7f ff 00 ff 07 ff ff ff ff 00 00 00 00 ff ff ff ff 00 00 00 00 ff ff 00 00 ff ff 00 00 AMD (Opteron 2300-series): 7f 1f 7f 7f ff 00 ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ff ff 00 00 ff ff 02 00 fxsave/fxrstor will only be emulated on early Intels, so KVM can't do much to improve the situation. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/cpuid.c')
0 files changed, 0 insertions, 0 deletions