direct-io.hg

changeset 15419:9261686d840c

Deinitialize timers before destroying the local apic; this protects us
against a late firing timer callback function (e.g. hpet_timer_fn) which
tries to access local APIC state.

Signed-off-by: Steven Hand <steven@xensource.com>
author Steven Hand <steven@xensource.com>
date Tue Jun 26 12:40:37 2007 +0100 (2007-06-26)
parents 3f76b2f76c2a
children b14bbd41e9dc
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Mon Jun 25 16:52:39 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Tue Jun 26 12:40:37 2007 +0100
     1.3 @@ -423,12 +423,6 @@ void hvm_vcpu_destroy(struct vcpu *v)
     1.4  {
     1.5      struct domain *d = v->domain;
     1.6  
     1.7 -    vlapic_destroy(v);
     1.8 -    hvm_funcs.vcpu_destroy(v);
     1.9 -
    1.10 -    /* Event channel is already freed by evtchn_destroy(). */
    1.11 -    /*free_xen_event_channel(v, v->arch.hvm_vcpu.xen_port);*/
    1.12 -
    1.13      if ( v->vcpu_id == 0 )
    1.14      {
    1.15          /* NB. All these really belong in hvm_domain_destroy(). */
    1.16 @@ -437,6 +431,12 @@ void hvm_vcpu_destroy(struct vcpu *v)
    1.17          pmtimer_deinit(d);
    1.18          hpet_deinit(d);
    1.19      }
    1.20 +
    1.21 +    vlapic_destroy(v);
    1.22 +    hvm_funcs.vcpu_destroy(v);
    1.23 +
    1.24 +    /* Event channel is already freed by evtchn_destroy(). */
    1.25 +    /*free_xen_event_channel(v, v->arch.hvm_vcpu.xen_port);*/
    1.26  }
    1.27  
    1.28