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] Only BSP can really do clear_all_shadow_status.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Only BSP can really do clear_all_shadow_status.
From: Xen patchbot -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 16 Apr 2006 19:54:14 +0000
Delivery-date: Sun, 16 Apr 2006 12:55:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 07408313ce33971c77714967c219d9ba8ca083cd
# Parent  d216ced3e34aec5d8e77b7c0c31022ec81d3af05
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 d216ced3e34a -r 07408313ce33 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Sat Apr 15 21:48:08 2006
+++ b/xen/arch/x86/shadow32.c   Sun Apr 16 14:45:57 2006
@@ -3275,19 +3275,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

<Prev in Thread] Current Thread [Next in Thread>