diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-07-02 08:41:28 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-07-02 08:41:28 +0200 |
commit | f9755488bf17c056111d1e442be394cfb63d7788 (patch) | |
tree | 224e860b016512cac04f1d67503ad30ea1f391a2 /xen/include/asm-x86/xstate.h | |
parent | 7b62e6bd2fcc862360c741cf64d2cbce7825402b (diff) | |
download | xen-f9755488bf17c056111d1e442be394cfb63d7788.tar.gz xen-f9755488bf17c056111d1e442be394cfb63d7788.tar.bz2 xen-f9755488bf17c056111d1e442be394cfb63d7788.zip |
x86/xsave: adjust state management
The initial state for a vCPU is using default values, so there's no
need to force the XRSTOR to read the state from memory. This saves a
couple of thousand restores from memory just during boot of Linux on
my Sandy Bridge system (I didn't try to make further measurements).
The above requires that arch_set_info_guest() updates the state flags
in the save area when valid floating point state got passed in, but
that would really have been needed even before in case XSAVE{,OPT}
decided to clear one or both of the FP and SSE bits.
Furthermore, hvm_vcpu_reset_state() shouldn't just clear out the FPU/
SSE area, but needs to re-initialized MXCSR and FCW.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/xstate.h')
-rw-r--r-- | xen/include/asm-x86/xstate.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/include/asm-x86/xstate.h b/xen/include/asm-x86/xstate.h index 49168f3293..dc3cb8eb75 100644 --- a/xen/include/asm-x86/xstate.h +++ b/xen/include/asm-x86/xstate.h @@ -11,6 +11,7 @@ #include <xen/types.h> #define FCW_DEFAULT 0x037f +#define FCW_RESET 0x0040 #define MXCSR_DEFAULT 0x1f80 #define XSTATE_CPUID 0x0000000d |