Implement arch_domain_destroy, use it in the error path of
arch_domain_create.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
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)