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] Fix to previous changeset: CLTS must be unconditional in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix to previous changeset: CLTS must be unconditional in
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Feb 2006 13:14:12 +0000
Delivery-date: Wed, 15 Feb 2006 13:27:38 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 166322cd55df5d5e624bed730169a6bf7751ecea
# Parent  7d89f672aa49b0240bff86ad56992c888e4eca54
Fix to previous changeset: CLTS must be unconditional in
setup_fpu(), as the flag can be set in CR0 even if the VCPU
has already dirtied the FPU (this happens if a paravirtualised
guest has set CR0.TS).

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 7d89f672aa49 -r 166322cd55df xen/include/asm-x86/i387.h
--- a/xen/include/asm-x86/i387.h        Tue Feb 14 23:15:11 2006
+++ b/xen/include/asm-x86/i387.h        Tue Feb 14 23:37:15 2006
@@ -15,25 +15,26 @@
 #include <asm/processor.h>
 
 extern void init_fpu(void);
-extern void save_init_fpu(struct vcpu *tsk);
-extern void restore_fpu(struct vcpu *tsk);
+extern void save_init_fpu(struct vcpu *v);
+extern void restore_fpu(struct vcpu *v);
 
-#define unlazy_fpu(_tsk) do { \
-    if ( test_bit(_VCPUF_fpu_dirtied, &(_tsk)->vcpu_flags) ) \
-        save_init_fpu(_tsk); \
+#define unlazy_fpu(v) do {                                      \
+    if ( test_bit(_VCPUF_fpu_dirtied, &(v)->vcpu_flags) )       \
+        save_init_fpu(v);                                       \
 } while ( 0 )
 
-#define load_mxcsr( val ) do { \
-    unsigned long __mxcsr = ((unsigned long)(val) & 0xffbf); \
-    __asm__ __volatile__ ( "ldmxcsr %0" : : "m" (__mxcsr) ); \
+#define load_mxcsr(val) do {                                    \
+    unsigned long __mxcsr = ((unsigned long)(val) & 0xffbf);    \
+    __asm__ __volatile__ ( "ldmxcsr %0" : : "m" (__mxcsr) );    \
 } while ( 0 )
 
-/* Make domain the FPU owner */
 static inline void setup_fpu(struct vcpu *v)
 {
+    /* Avoid recursion. */
+    clts();
+
     if ( !test_and_set_bit(_VCPUF_fpu_dirtied, &v->vcpu_flags) )
     {
-        clts();
         if ( test_bit(_VCPUF_fpu_initialised, &v->vcpu_flags) )
             restore_fpu(v);
         else

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix to previous changeset: CLTS must be unconditional in, Xen patchbot -unstable <=