|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86: reduce magic number usage in XSAVE c
# HG changeset patch
# User Wei Gang <gang.wei@xxxxxxxxx>
# Date 1297241891 0
# Node ID f1fac30a531be95ce147a6acf7a94afb77c8a4a7
# Parent 3c5990fabb79cbc73fcc4d589ef5b54618aaf739
x86: reduce magic number usage in XSAVE code
Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
---
xen/arch/x86/hvm/hvm.c | 2 +-
xen/arch/x86/i387.c | 1 -
xen/include/asm-x86/i387.h | 3 ++-
3 files changed, 3 insertions(+), 3 deletions(-)
diff -r 3c5990fabb79 -r f1fac30a531b xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c Wed Feb 09 08:57:12 2011 +0000
+++ b/xen/arch/x86/hvm/hvm.c Wed Feb 09 08:58:11 2011 +0000
@@ -2223,7 +2223,7 @@ void hvm_cpuid(unsigned int input, unsig
if ( count == 0 && v->arch.xcr0 )
{
/* reset EBX to default value first */
- *ebx = 576;
+ *ebx = XSAVE_AREA_MIN_SIZE;
for ( sub_leaf = 2; sub_leaf < 64; sub_leaf++ )
{
if ( !(v->arch.xcr0 & (1ULL << sub_leaf)) )
diff -r 3c5990fabb79 -r f1fac30a531b xen/arch/x86/i387.c
--- a/xen/arch/x86/i387.c Wed Feb 09 08:57:12 2011 +0000
+++ b/xen/arch/x86/i387.c Wed Feb 09 08:58:11 2011 +0000
@@ -221,7 +221,6 @@ static void restore_fpu(struct vcpu *v)
}
#define XSTATE_CPUID 0xd
-#define XSAVE_AREA_MIN_SIZE (512 + 64) /* FP/SSE + XSAVE.HEADER */
/*
* Maximum size (in byte) of the XSAVE/XRSTOR save area required by all
diff -r 3c5990fabb79 -r f1fac30a531b xen/include/asm-x86/i387.h
--- a/xen/include/asm-x86/i387.h Wed Feb 09 08:57:12 2011 +0000
+++ b/xen/include/asm-x86/i387.h Wed Feb 09 08:58:11 2011 +0000
@@ -21,13 +21,14 @@ int xsave_alloc_save_area(struct vcpu *v
int xsave_alloc_save_area(struct vcpu *v);
void xsave_free_save_area(struct vcpu *v);
+#define XSAVE_AREA_MIN_SIZE (512 + 64) /* FP/SSE + XSAVE.HEADER */
#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 | XSTATE_LWP)
-#define XSTATE_YMM_OFFSET (512 + 64)
+#define XSTATE_YMM_OFFSET XSAVE_AREA_MIN_SIZE
#define XSTATE_YMM_SIZE 256
#define XSAVEOPT (1 << 0)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86: reduce magic number usage in XSAVE code,
Xen patchbot-unstable <=
|
|
|
|
|