ia64/xen-unstable
changeset 9738:c4eead8a925b
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@intel.com>
This fixes SMP IA32 VMX guest booting on IA32 xen.
Signed-off-by: Xin Li <xin.b.li@intel.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Sun Apr 16 15:41:31 2006 +0100 (2006-04-16) |
parents | 3c1cd09801c0 |
children | 41823e46d6ac 0094c4c8c221 |
files | xen/arch/x86/shadow32.c |
line diff
1.1 --- a/xen/arch/x86/shadow32.c Sun Apr 16 15:04:21 2006 +0100 1.2 +++ b/xen/arch/x86/shadow32.c Sun Apr 16 15:41:31 2006 +0100 1.3 @@ -3291,19 +3291,29 @@ void __update_pagetables(struct vcpu *v) 1.4 1.5 void clear_all_shadow_status(struct domain *d) 1.6 { 1.7 + struct vcpu *v = current; 1.8 + 1.9 + /* 1.10 + * Don't clean up while other vcpus are working. 1.11 + */ 1.12 + if ( v->vcpu_id ) 1.13 + return; 1.14 + 1.15 shadow_lock(d); 1.16 + 1.17 free_shadow_pages(d); 1.18 free_shadow_ht_entries(d); 1.19 - d->arch.shadow_ht = 1.20 + d->arch.shadow_ht = 1.21 xmalloc_array(struct shadow_status, shadow_ht_buckets); 1.22 if ( d->arch.shadow_ht == NULL ) { 1.23 - printk("clear all shadow status:xmalloc fail\n"); 1.24 + printk("clear all shadow status: xmalloc failed\n"); 1.25 domain_crash_synchronous(); 1.26 } 1.27 memset(d->arch.shadow_ht, 0, 1.28 shadow_ht_buckets * sizeof(struct shadow_status)); 1.29 1.30 free_out_of_sync_entries(d); 1.31 + 1.32 shadow_unlock(d); 1.33 } 1.34