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

[Xen-changelog] Only BSP can really do clear_all_shadow_status.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c4eead8a925bd047834bf784f02edae33426b913
# Parent  3c1cd09801c047008e529aa03b56059e00c1f4f2
Only BSP can really do clear_all_shadow_status.
This fixes SMP IA32 VMX guest booting on IA32 xen.

Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>

diff -r 3c1cd09801c0 -r c4eead8a925b xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Sun Apr 16 14:04:21 2006
+++ b/xen/arch/x86/shadow32.c   Sun Apr 16 14:41:31 2006
@@ -3291,19 +3291,29 @@
 
 void clear_all_shadow_status(struct domain *d)
 {
+    struct vcpu *v = current;
+
+    /*
+     * Don't clean up while other vcpus are working.
+     */
+    if ( v->vcpu_id )
+        return;
+
     shadow_lock(d);
+
     free_shadow_pages(d);
     free_shadow_ht_entries(d);
-    d->arch.shadow_ht = 
+    d->arch.shadow_ht =
         xmalloc_array(struct shadow_status, shadow_ht_buckets);
     if ( d->arch.shadow_ht == NULL ) {
-        printk("clear all shadow status:xmalloc fail\n");
+        printk("clear all shadow status: xmalloc failed\n");
         domain_crash_synchronous();
     }
     memset(d->arch.shadow_ht, 0,
            shadow_ht_buckets * sizeof(struct shadow_status));
 
     free_out_of_sync_entries(d);
+
     shadow_unlock(d);
 }
 

_______________________________________________
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®.