From: Oleksandr Tyshchenko Date: Fri, 8 Oct 2021 05:55:30 +0000 (+0300) Subject: xen/domain: Call pci_release_devices() when releasing domain resources X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~118 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d4c9845e52cbb3cd62172809f62ee51dbb3ca7de;p=xen.git xen/domain: Call pci_release_devices() when releasing domain resources This is the very same that we already do for DT devices. Moreover, x86 already calls pci_release_devices(). Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Stefano Stabellini Reviewed-by: Rahul Singh Tested-by: Rahul Singh --- diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 36138c1b2e..aae4472479 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -981,7 +981,8 @@ static int relinquish_memory(struct domain *d, struct page_list_head *list) * function which may return -ERESTART. */ enum { - PROG_tee = 1, + PROG_pci = 1, + PROG_tee, PROG_xen, PROG_page, PROG_mapping, @@ -1018,6 +1019,12 @@ int domain_relinquish_resources(struct domain *d) #ifdef CONFIG_IOREQ_SERVER ioreq_server_destroy_all(d); #endif +#ifdef CONFIG_HAS_PCI + PROGRESS(pci): + ret = pci_release_devices(d); + if ( ret ) + return ret; +#endif PROGRESS(tee): ret = tee_relinquish_resources(d);