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

[Xen-devel] [PATCH 1/3] xen/arm: implement arch_domain_destroy



Implement arch_domain_destroy, use it in the error path of
arch_domain_create.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 xen/arch/arm/domain.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 644b066..17713f8 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -440,20 +440,17 @@ int arch_domain_create(struct domain *d, unsigned int 
domcr_flags)
 
 fail:
     d->is_dying = DOMDYING_dead;
-    free_xenheap_page(d->shared_info);
-
-    p2m_teardown(d);
-
-    domain_vgic_free(d);
-    domain_uart0_free(d);
+    arch_domain_destroy(d);
 
     return rc;
 }
 
 void arch_domain_destroy(struct domain *d)
 {
-    /* p2m_destroy */
-    /* domain_vgic_destroy */
+    p2m_teardown(d);
+    domain_vgic_free(d);
+    domain_uart0_free(d);
+    free_xenheap_page(d->shared_info);
 }
 
 static int is_guest_psr(uint32_t psr)
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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