aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/i387.h
diff options
context:
space:
mode:
authorWei Gang <gang.wei@intel.com>2011-02-21 09:11:57 +0000
committerWei Gang <gang.wei@intel.com>2011-02-21 09:11:57 +0000
commit3af87a7ece7f27a537a006196873ca9fda696616 (patch)
tree5fd8c0199526ccb8651a76da2b334223b6e41b7d /xen/include/asm-x86/i387.h
parent0dba10b8e37f3f63ed9f5ed449d9e9e0c8c9f1aa (diff)
downloadxen-3af87a7ece7f27a537a006196873ca9fda696616.tar.gz
xen-3af87a7ece7f27a537a006196873ca9fda696616.tar.bz2
xen-3af87a7ece7f27a537a006196873ca9fda696616.zip
x86: add strictly sanity check for XSAVE/XRSTOR
Replace most checks on cpu_has_xsave with checks on new fn xsave_enabled(), do additional sanity checks in the new fn. Signed-off-by: Wei Gang <gang.wei@intel.com> Signed-off-by: Keir Fraser <keir.xen@gmail.com>
Diffstat (limited to 'xen/include/asm-x86/i387.h')
-rw-r--r--xen/include/asm-x86/i387.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xen/include/asm-x86/i387.h b/xen/include/asm-x86/i387.h
index 2cbbbc40e9..8e10d927e1 100644
--- a/xen/include/asm-x86/i387.h
+++ b/xen/include/asm-x86/i387.h
@@ -11,8 +11,10 @@
#ifndef __ASM_I386_I387_H
#define __ASM_I386_I387_H
-#include <xen/sched.h>
-#include <asm/processor.h>
+#include <xen/types.h>
+#include <xen/percpu.h>
+
+struct vcpu;
extern unsigned int xsave_cntxt_size;
extern u64 xfeature_mask;
@@ -20,6 +22,7 @@ extern u64 xfeature_mask;
void xsave_init(void);
int xsave_alloc_save_area(struct vcpu *v);
void xsave_free_save_area(struct vcpu *v);
+bool_t xsave_enabled(const struct vcpu *v);
#define XSAVE_AREA_MIN_SIZE (512 + 64) /* FP/SSE + XSAVE.HEADER */
#define XSTATE_FP (1ULL << 0)