[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Don't reclaim vcpus that are not put into use yet when destroying HVM



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID beb37b3409033fc6a8872bb9f6963ece67e6004c
# Parent  1e5788066d1f6e886ed71574df418c72b485b802
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@xxxxxxxxx>
Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>

diff -r 1e5788066d1f -r beb37b340903 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Sun Mar 26 10:42:17 2006
+++ b/xen/arch/x86/hvm/svm/svm.c        Sun Mar 26 10:43:53 2006
@@ -728,6 +728,8 @@
 
     for_each_vcpu ( d, v )
     {
+        if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
+            continue;
 #if 0
         /* Memory leak by not freeing this. XXXKAF: *Why* is not per core?? */
         free_host_save_area(v->arch.hvm_svm.host_save_area);
diff -r 1e5788066d1f -r beb37b340903 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Sun Mar 26 10:42:17 2006
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Sun Mar 26 10:43:53 2006
@@ -89,6 +89,8 @@
 
     for_each_vcpu ( d, v )
     {
+        if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
+            continue;
         vmx_request_clear_vmcs(v);
         destroy_vmcs(&v->arch.hvm_vmx);
         free_monitor_pagetable(v);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.