]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86 / vmx: move teardown from domain_destroy()...
authorPaul Durrant <pdurrant@amazon.com>
Mon, 3 Feb 2020 12:08:44 +0000 (13:08 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2020 12:08:44 +0000 (13:08 +0100)
... to domain_relinquish_resources().

The teardown code frees the APICv page. This does not need to be done late
so do it in domain_relinquish_resources() rather than domain_destroy().

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c

index 35c8402ea0b4874ccba78d5844f395f88773ecb4..8debf6be3ef928dff2b586bff9fe17b21a13c48b 100644 (file)
@@ -420,7 +420,7 @@ static int vmx_domain_initialise(struct domain *d)
     return 0;
 }
 
-static void vmx_domain_destroy(struct domain *d)
+static void vmx_domain_relinquish_resources(struct domain *d)
 {
     if ( !has_vlapic(d) )
         return;
@@ -2241,7 +2241,7 @@ static struct hvm_function_table __initdata vmx_function_table = {
     .cpu_up_prepare       = vmx_cpu_up_prepare,
     .cpu_dead             = vmx_cpu_dead,
     .domain_initialise    = vmx_domain_initialise,
-    .domain_destroy       = vmx_domain_destroy,
+    .domain_relinquish_resources = vmx_domain_relinquish_resources,
     .vcpu_initialise      = vmx_vcpu_initialise,
     .vcpu_destroy         = vmx_vcpu_destroy,
     .save_cpu_ctxt        = vmx_save_vmcs_ctxt,