]> xenbits.xensource.com Git - people/vhanquez/xen-unstable.git/commitdiff
x86 xsave: Enable xsave_feature[62] (AMD Lightweight Profiling)
authorKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:38:22 +0000 (08:38 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:38:22 +0000 (08:38 +0000)
The spec of LWP is available at
http://developer.amd.com/cpu/lwp/Pages/default.aspx.

Signed-off-by: Wei Huang <wei.huang2@amd.com>
xen/include/asm-x86/i387.h

index 471747c7c478cdd8865abff041f71187084044b7..4cb67d482c58eb16046ce9ffe56b83b7e3e35fb5 100644 (file)
@@ -22,11 +22,12 @@ void xsave_init(void);
 int xsave_alloc_save_area(struct vcpu *v);
 void xsave_free_save_area(struct vcpu *v);
 
-#define XSTATE_FP       (1 << 0)
-#define XSTATE_SSE      (1 << 1)
-#define XSTATE_YMM      (1 << 2)
+#define XSTATE_FP       (1ULL << 0)
+#define XSTATE_SSE      (1ULL << 1)
+#define XSTATE_YMM      (1ULL << 2)
+#define XSTATE_LWP      (1ULL << 62) /* AMD lightweight profiling */
 #define XSTATE_FP_SSE   (XSTATE_FP | XSTATE_SSE)
-#define XCNTXT_MASK     (XSTATE_FP | XSTATE_SSE | XSTATE_YMM)
+#define XCNTXT_MASK     (XSTATE_FP | XSTATE_SSE | XSTATE_YMM | XSTATE_LWP)
 #define XSTATE_YMM_OFFSET  (512 + 64)
 #define XSTATE_YMM_SIZE    256
 #define XSAVEOPT        (1 << 0)