]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86/hvm.c: Don't tear down altp2m state if it was never set up
authorRavi Sahita <ravi.sahita@intel.com>
Wed, 29 Jul 2015 16:39:22 +0000 (09:39 -0700)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 30 Jul 2015 09:12:11 +0000 (10:12 +0100)
Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ravi Sahita <ravi.sahita@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Wei Liu <wei.liu2@citrix.com>
[ ijc -- replacement subject from Andy ]

xen/arch/x86/hvm/hvm.c

index ec1d797d5dc3cebe5ee31f08f989e1bde4d38ce1..6a56216721518e3d7408da3bf7dc6525b733431f 100644 (file)
@@ -2463,7 +2463,9 @@ void hvm_vcpu_destroy(struct vcpu *v)
 {
     hvm_all_ioreq_servers_remove_vcpu(v->domain, v);
 
-    altp2m_vcpu_destroy(v);
+    if ( hvm_altp2m_supported() )
+        altp2m_vcpu_destroy(v);
+
     nestedhvm_vcpu_destroy(v);
 
     free_compat_arg_xlat(v);