]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
xen: Introduce arch_domain_teardown()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 17 Jul 2023 07:20:44 +0000 (09:20 +0200)
committerJulien Grall <jgrall@amazon.com>
Thu, 20 Jul 2023 22:20:04 +0000 (23:20 +0100)
Plumb it into domain_teardown().  Provide arch_val in the teardown
continuation information for use by arch_domain_teardown().

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/arch/arm/domain.c
xen/arch/x86/domain.c
xen/common/domain.c
xen/include/xen/domain.h
xen/include/xen/sched.h

index 8c18e92079079836f6fc54b0ca372718849d7a8d..15d9709a97d2d202bb3087f12e21d34779c4376e 100644 (file)
@@ -793,6 +793,11 @@ fail:
     return rc;
 }
 
+int arch_domain_teardown(struct domain *d)
+{
+    return 0;
+}
+
 void arch_domain_destroy(struct domain *d)
 {
     /* IOMMU page table is shared with P2M, always call
index 39c215316546b38f4a48978dfe1f7e99c81a3f39..5f66c2ae33d710008aa36c646f7fd2fe62334109 100644 (file)
@@ -888,6 +888,11 @@ int arch_domain_create(struct domain *d,
     return rc;
 }
 
+int arch_domain_teardown(struct domain *d)
+{
+    return 0;
+}
+
 void arch_domain_destroy(struct domain *d)
 {
     if ( is_hvm_domain(d) )
index caaa402637928a2170445e58bcf938015373b1ad..304aa04fa6cb33f62c11028931846a8804b523cb 100644 (file)
@@ -439,6 +439,7 @@ static int domain_teardown(struct domain *d)
             PROG_none,
             PROG_gnttab_mappings,
             PROG_vcpu_teardown,
+            PROG_arch_teardown,
             PROG_done,
         };
 
@@ -459,6 +460,11 @@ static int domain_teardown(struct domain *d)
                 return rc;
         }
 
+    PROGRESS(arch_teardown):
+        rc = arch_domain_teardown(d);
+        if ( rc )
+            return rc;
+
     PROGRESS(done):
         break;
 
index 1df8f933d0763d4e315ac1c40404808eccf58d2c..d35af348410c0294e129b7e5be4518b8060ef850 100644 (file)
@@ -81,6 +81,7 @@ int arch_domain_create(struct domain *d,
                        struct xen_domctl_createdomain *config,
                        unsigned int flags);
 
+int arch_domain_teardown(struct domain *d);
 void arch_domain_destroy(struct domain *d);
 
 void arch_domain_shutdown(struct domain *d);
index 85242a73d374c6a52603b01d3dfb58a77ffc8656..854f3e32c00ede0c0a97ab7a74e49dfb239a2ef0 100644 (file)
@@ -589,6 +589,7 @@ struct domain
      */
     struct {
         unsigned int val;
+        unsigned int arch_val;
         struct vcpu *vcpu;
     } teardown;