ia64/xen-unstable

changeset 7763:de41f5e24cf1

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 <xiaofeng.ling@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Nov 10 12:09:17 2005 +0100 (2005-11-10)
parents e436e4e93076
children bee09e2200ab
files xen/arch/x86/domain.c xen/arch/x86/vmx_vmcs.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Thu Nov 10 12:06:50 2005 +0100
     1.2 +++ b/xen/arch/x86/domain.c	Thu Nov 10 12:09:17 2005 +0100
     1.3 @@ -407,6 +407,7 @@ int arch_set_info_guest(
     1.4          /* VMX uses the initially provided page tables as the P2M map. */
     1.5          if ( !pagetable_get_paddr(d->arch.phys_table) )
     1.6              d->arch.phys_table = v->arch.guest_table;
     1.7 +        v->arch.guest_table = mk_pagetable(0);
     1.8  
     1.9          /* Initialize monitor page table */
    1.10          v->arch.monitor_table = mk_pagetable(0);
     2.1 --- a/xen/arch/x86/vmx_vmcs.c	Thu Nov 10 12:06:50 2005 +0100
     2.2 +++ b/xen/arch/x86/vmx_vmcs.c	Thu Nov 10 12:09:17 2005 +0100
     2.3 @@ -332,7 +332,7 @@ static void vmx_do_launch(struct vcpu *v
     2.4      error |= __vmwrite(GUEST_TR_BASE, 0);
     2.5      error |= __vmwrite(GUEST_TR_LIMIT, 0xff);
     2.6  
     2.7 -    __vmwrite(GUEST_CR3, pagetable_get_paddr(v->arch.guest_table));
     2.8 +    __vmwrite(GUEST_CR3, pagetable_get_paddr(v->domain->arch.phys_table));
     2.9      __vmwrite(HOST_CR3, pagetable_get_paddr(v->arch.monitor_table));
    2.10      __vmwrite(HOST_RSP, (unsigned long)get_stack_bottom());
    2.11