WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: reduce magic number usage in XSAVE c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: reduce magic number usage in XSAVE code
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 10 Feb 2011 06:10:20 -0800
Delivery-date: Thu, 10 Feb 2011 06:11:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=