direct-io.hg

changeset 15432:d0608ecb56bc

hvm: Destroy timers early during domain death.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Wed Jun 27 22:20:17 2007 +0100 (2007-06-27)
parents 3362de397f1e
children a5360bf18668
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Wed Jun 27 21:43:43 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Wed Jun 27 22:20:17 2007 +0100
     1.3 @@ -242,6 +242,11 @@ void hvm_domain_relinquish_resources(str
     1.4  {
     1.5      hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.ioreq);
     1.6      hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.buf_ioreq);
     1.7 +
     1.8 +    pit_deinit(d);
     1.9 +    rtc_deinit(d);
    1.10 +    pmtimer_deinit(d);
    1.11 +    hpet_deinit(d);
    1.12  }
    1.13  
    1.14  void hvm_domain_destroy(struct domain *d)
    1.15 @@ -421,17 +426,6 @@ int hvm_vcpu_initialise(struct vcpu *v)
    1.16  
    1.17  void hvm_vcpu_destroy(struct vcpu *v)
    1.18  {
    1.19 -    struct domain *d = v->domain;
    1.20 -
    1.21 -    if ( v->vcpu_id == 0 )
    1.22 -    {
    1.23 -        /* NB. All these really belong in hvm_domain_destroy(). */
    1.24 -        pit_deinit(d);
    1.25 -        rtc_deinit(d);
    1.26 -        pmtimer_deinit(d);
    1.27 -        hpet_deinit(d);
    1.28 -    }
    1.29 -
    1.30      vlapic_destroy(v);
    1.31      hvm_funcs.vcpu_destroy(v);
    1.32