ia64/xen-unstable

changeset 9457:beb37b340903

Don't reclaim vcpus that are not put into use yet when destroying HVM
domain. Otherwise, when running a debug=y xen, we will get a assertion
failure in vmx_request_clear_vmcs(), since some vcpus may be not
initialized for HVM use yet.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Mar 26 11:43:53 2006 +0100 (2006-03-26)
parents 1e5788066d1f
children 4840c3da2521
files xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Sun Mar 26 11:42:17 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Sun Mar 26 11:43:53 2006 +0100
     1.3 @@ -728,6 +728,8 @@ static void svm_relinquish_guest_resourc
     1.4  
     1.5      for_each_vcpu ( d, v )
     1.6      {
     1.7 +        if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
     1.8 +            continue;
     1.9  #if 0
    1.10          /* Memory leak by not freeing this. XXXKAF: *Why* is not per core?? */
    1.11          free_host_save_area(v->arch.hvm_svm.host_save_area);
     2.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Sun Mar 26 11:42:17 2006 +0100
     2.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Sun Mar 26 11:43:53 2006 +0100
     2.3 @@ -89,6 +89,8 @@ static void vmx_relinquish_guest_resourc
     2.4  
     2.5      for_each_vcpu ( d, v )
     2.6      {
     2.7 +        if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
     2.8 +            continue;
     2.9          vmx_request_clear_vmcs(v);
    2.10          destroy_vmcs(&v->arch.hvm_vmx);
    2.11          free_monitor_pagetable(v);