direct-io.hg

changeset 8378:fb1f2498ce1e

Check for existence of VLAPIC before relinquishing it,
or a vmx guest can die very early.

Signed-off-by: Xin Li <xin.b.li@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Dec 15 20:42:09 2005 +0100 (2005-12-15)
parents 37cafca1539e
children e7977d6aa6ba
files xen/arch/x86/vmx.c
line diff
     1.1 --- a/xen/arch/x86/vmx.c	Thu Dec 15 20:38:44 2005 +0100
     1.2 +++ b/xen/arch/x86/vmx.c	Thu Dec 15 20:42:09 2005 +0100
     1.3 @@ -110,12 +110,12 @@ void vmx_relinquish_resources(struct vcp
     1.4      vpit = &v->domain->arch.vmx_platform.vmx_pit;
     1.5      if ( active_ac_timer(&(vpit->pit_timer)) )
     1.6          rem_ac_timer(&vpit->pit_timer);
     1.7 -    if ( active_ac_timer(&v->arch.arch_vmx.hlt_timer) ) {
     1.8 +    if ( active_ac_timer(&v->arch.arch_vmx.hlt_timer) )
     1.9          rem_ac_timer(&v->arch.arch_vmx.hlt_timer);
    1.10 -    }
    1.11 -    if ( vmx_apic_support(v->domain) ) {
    1.12 -        rem_ac_timer( &(VLAPIC(v)->vlapic_timer) );
    1.13 -        xfree( VLAPIC(v) );
    1.14 +    if ( vmx_apic_support(v->domain) && (VLAPIC(v) != NULL) )
    1.15 +    {
    1.16 +        rem_ac_timer(&VLAPIC(v)->vlapic_timer);
    1.17 +        xfree(VLAPIC(v));
    1.18      }
    1.19  }
    1.20