]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86/hvm: make domain_destroy() method optional
authorPaul Durrant <pdurrant@amazon.com>
Fri, 24 Jan 2020 15:30:59 +0000 (15:30 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 25 Jan 2020 18:43:32 +0000 (18:43 +0000)
This method is currently empty for SVM so make it optional and, while in
the neighbourhood, make it an alternative_vcall().

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c

index 6333ae6aba55a5260572a0aa2d26a555211b1676..0b93609a8201297de2c7f9a0474a301b8eed730f 100644 (file)
@@ -747,7 +747,9 @@ void hvm_domain_destroy(struct domain *d)
 
     hvm_destroy_cacheattr_region_list(d);
 
-    hvm_funcs.domain_destroy(d);
+    if ( hvm_funcs.domain_destroy )
+        alternative_vcall(hvm_funcs.domain_destroy, d);
+
     rtc_deinit(d);
     stdvga_deinit(d);
     vioapic_deinit(d);
index b1c376d4554ac60b8966948b23cb9b80636d85d4..b7f67f9f036ce2b79486664517e25a73493aa8bf 100644 (file)
@@ -1155,10 +1155,6 @@ static int svm_domain_initialise(struct domain *d)
     return 0;
 }
 
-static void svm_domain_destroy(struct domain *d)
-{
-}
-
 static int svm_vcpu_initialise(struct vcpu *v)
 {
     int rc;
@@ -2425,7 +2421,6 @@ static struct hvm_function_table __initdata svm_function_table = {
     .cpu_up               = svm_cpu_up,
     .cpu_down             = svm_cpu_down,
     .domain_initialise    = svm_domain_initialise,
-    .domain_destroy       = svm_domain_destroy,
     .vcpu_initialise      = svm_vcpu_initialise,
     .vcpu_destroy         = svm_vcpu_destroy,
     .save_cpu_ctxt        = svm_save_vmcb_ctxt,