x86emul: support FXSAVE/FXRSTOR
authorJan Beulich <jbeulich@suse.com>
Fri, 29 May 2020 15:35:09 +0000 (17:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 29 May 2020 15:35:09 +0000 (17:35 +0200)
commitbeb164ea11da62237d723af098f9371f35fe0323
tree593a95c963e67d0be423b07a5a3ef7735e13b942
parentbe55ed744ed81ffb114ce16abb4bfe2f22af5a1d
x86emul: support FXSAVE/FXRSTOR

Note that FPU selector handling as well as MXCSR mask saving for now
does not honor differences between host and guest visible featuresets.

While for Intel operation of the insns with CR4.OSFXSR=0 is
implementation dependent, use the easiest solution there: Simply don't
look at the bit in the first place. For AMD and alike the behavior is
well defined, so it gets handled together with FFXSR.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/test_x86_emulator.c
tools/tests/x86_emulator/x86-emulate.c
xen/arch/x86/x86_emulate.c
xen/arch/x86/x86_emulate/x86_emulate.c