ia64/xen-unstable

changeset 17765:85fa199b4b7b

x86: Fix teardown of relocated vcpu_info structures.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sun Jun 01 09:16:26 2008 +0100 (2008-06-01)
parents 6e688d5a936b
children f1508348ffab
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Fri May 30 19:31:18 2008 +0100
     1.2 +++ b/xen/arch/x86/domain.c	Sun Jun 01 09:16:26 2008 +0100
     1.3 @@ -59,8 +59,6 @@ DEFINE_PER_CPU(unsigned long, cr4);
     1.4  static void default_idle(void);
     1.5  void (*pm_idle) (void) = default_idle;
     1.6  
     1.7 -static void unmap_vcpu_info(struct vcpu *v);
     1.8 -
     1.9  static void paravirt_ctxt_switch_from(struct vcpu *v);
    1.10  static void paravirt_ctxt_switch_to(struct vcpu *v);
    1.11  
    1.12 @@ -433,8 +431,6 @@ void vcpu_destroy(struct vcpu *v)
    1.13      if ( is_pv_32on64_vcpu(v) )
    1.14          release_compat_l4(v);
    1.15  
    1.16 -    unmap_vcpu_info(v);
    1.17 -
    1.18      if ( is_hvm_vcpu(v) )
    1.19          hvm_vcpu_destroy(v);
    1.20  }
    1.21 @@ -1864,17 +1860,20 @@ int domain_relinquish_resources(struct d
    1.22          /* Tear down paging-assistance stuff. */
    1.23          paging_teardown(d);
    1.24  
    1.25 -        /* Drop the in-use references to page-table bases. */
    1.26          for_each_vcpu ( d, v )
    1.27 +        {
    1.28 +            /* Drop the in-use references to page-table bases. */
    1.29              vcpu_destroy_pagetables(v);
    1.30  
    1.31 -        /*
    1.32 -         * Relinquish GDT mappings. No need for explicit unmapping of the LDT
    1.33 -         * as it automatically gets squashed when the guest's mappings go away.
    1.34 -         */
    1.35 -        for_each_vcpu(d, v)
    1.36 +            /*
    1.37 +             * Relinquish GDT mappings. No need for explicit unmapping of the
    1.38 +             * LDT as it automatically gets squashed with the guest mappings.
    1.39 +             */
    1.40              destroy_gdt(v);
    1.41  
    1.42 +            unmap_vcpu_info(v);
    1.43 +        }
    1.44 +
    1.45          d->arch.relmem = RELMEM_xen_l4;
    1.46          /* fallthrough */
    1.47