# HG changeset patch # User Xiaofeng Ling # Node ID 833b086cc0e82af98fb5149cebfce08e5e65b4b1 # Parent 07070a3511560287314082abf5f3514d4bfdd0dd For vmx domain, because shadow_mode_reference is set later in vmx_final_setup_guest, so in arch_set_info_guest, the phys_basetab is not do get_page, while when destroying, put_page is called, so there is one page, the count=-1, and when a new domain allocate this page, it will take it as cpumask 0xffffffff, this cause flash_tlb_mask goes into dead loop. This patch also eliminate the warning when creating vmx guest: (XEN) Audit 1: type count went below zero mfn=1e03d t=f0000000 ot=3654b Signed-off-by: Xiaofeng Ling diff -r 07070a351156 xen/arch/x86/domain.c --- a/xen/arch/x86/domain.c Thu Nov 10 12:18:23 2005 +0800 +++ b/xen/arch/x86/domain.c Thu Nov 10 15:36:29 2005 +0800 @@ -389,7 +389,7 @@ if ( !get_page(&frame_table[phys_basetab>>PAGE_SHIFT], d) ) return -EINVAL; } - else if ( !(c->flags & VGCF_VMX_GUEST) ) + else { if ( !get_page_and_type(&frame_table[phys_basetab>>PAGE_SHIFT], d, PGT_base_page_table) ) @@ -962,7 +962,7 @@ { if ( (pfn = pagetable_get_pfn(v->arch.guest_table)) != 0 ) { - if ( !shadow_mode_refcounts(d) ) + if ( !shadow_mode_refcounts(d) || shadow_mode_external(d) ) put_page_type(pfn_to_page(pfn)); put_page(pfn_to_page(pfn));