[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix invalidation of shadow LDT on SMP systems.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 9d9b75569d0ee8c55d353f7d8ced8dc93485f5f5
# Parent  9d51c5afda92380052aee14eb54f46040fd7963f
Fix invalidation of shadow LDT on SMP systems.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 9d51c5afda92 -r 9d9b75569d0e xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Sat Oct 15 15:25:29 2005
+++ b/xen/arch/x86/mm.c Sat Oct 15 15:26:03 2005
@@ -582,6 +582,7 @@
     unsigned long    pfn  = l1e_get_pfn(l1e);
     struct pfn_info *page = &frame_table[pfn];
     struct domain   *e;
+    struct vcpu     *v;
 
     if ( !(l1e_get_flags(l1e) & _PAGE_PRESENT) || !pfn_valid(pfn) )
         return;
@@ -615,10 +616,12 @@
         /* We expect this is rare so we blow the entire shadow LDT. */
         if ( unlikely(((page->u.inuse.type_info & PGT_type_mask) == 
                        PGT_ldt_page)) &&
-             unlikely(((page->u.inuse.type_info & PGT_count_mask) != 0)) )
-
-            // XXX SMP BUG?
-            invalidate_shadow_ldt(e->vcpu[0]);
+             unlikely(((page->u.inuse.type_info & PGT_count_mask) != 0)) &&
+             (d == e) )
+        {
+            for_each_vcpu ( d, v )
+                invalidate_shadow_ldt(v);
+        }
         put_page(page);
     }
 }
@@ -1311,7 +1314,7 @@
         }
     }
 
-    switch (type  & PGT_type_mask)
+    switch ( type & PGT_type_mask )
     {
     case PGT_l1_page_table:
         free_l1_table(page);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.