]> xenbits.xensource.com Git - xen.git/commit
x86/fpu: add a per-domain field to set the width of FIP/FDP
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 26 Feb 2016 11:16:13 +0000 (12:16 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Feb 2016 11:29:21 +0000 (12:29 +0100)
commit879b44b041f26de35e4b527bf0f3c361eb52bd82
tree9c6c68171608bba4b28684efd96d81a21a82cf5d
parent825c6dddf5993ab6b84590026cd7b5454a7d5e94
x86/fpu: add a per-domain field to set the width of FIP/FDP

The x86 architecture allows either: a) the 64-bit FIP/FDP registers to
be restored (clearing FCS and FDS); or b) the 32-bit FIP/FDP and
FCS/FDS registers to be restored (clearing the upper 32-bits).

Add a per-domain field to indicate which of these options a guest
needs.  The options are: 8, 4 or 0.  Where 0 indicates that the
hypervisor should automatically guess the FIP width by checking the
value of FIP/FDP when saving the state (this is the existing
behaviour).

The FIP width is initially automatic but is set explicitly in the
following cases:

- 32-bit PV guest: 4
- Newer CPUs that do not save FCS/FDS: 8

The x87_fip_width field is placed into an existing 1 byte hole in
struct arch_domain.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Fix build.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain.c
xen/arch/x86/i387.c
xen/arch/x86/xstate.c
xen/include/asm-x86/domain.h