diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-09-29 11:27:53 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-09-29 11:27:53 +0100 |
commit | fb7925518f22199dd55fb3e204fb609affe7f4cd (patch) | |
tree | 2372678883881b2d8574e4de9b71b2560df29264 /xen/include/asm-x86/hvm/vcpu.h | |
parent | 341c0e113f2b60c37813708cd91f4507ed08f3f4 (diff) | |
download | xen-fb7925518f22199dd55fb3e204fb609affe7f4cd.tar.gz xen-fb7925518f22199dd55fb3e204fb609affe7f4cd.tar.bz2 xen-fb7925518f22199dd55fb3e204fb609affe7f4cd.zip |
vmx: add the support of XSAVE/XRSTOR to VMX guest
XSAVE/XRSTOR manages the existing and future processor extended states
on x86 architecture.
The XSAVE/XRSTOR infrastructure is defined in Intel SDMs:
http://www.intel.com/products/processor/manuals/
The patch uses the classical CR0.TS based algorithm to manage the
states on context switch. At present, we know 3 bits in the
XFEATURE_ENABLED_MASK: FPU, SSE and YMM. YMM is defined in Intel AVX
Programming Reference: http://software.intel.com/sites/avx/
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'xen/include/asm-x86/hvm/vcpu.h')
-rw-r--r-- | xen/include/asm-x86/hvm/vcpu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h index cd24177232..cc97de490a 100644 --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -47,6 +47,15 @@ struct hvm_vcpu { */ unsigned long hw_cr[5]; + /* + * The save area for Processor Extended States and the bitmask of the + * XSAVE/XRSTOR features. They are used by: 1) when a vcpu (which has + * dirtied FPU/SSE) is scheduled out we XSAVE the states here; 2) in + * #NM handler, we XRSTOR the states we XSAVE-ed; + */ + void *xsave_area; + uint64_t xfeature_mask; + struct vlapic vlapic; s64 cache_tsc_offset; u64 guest_time; |