All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: julien@xen.org, sstabellini@kernel.org,
	oleksandr_tyshchenko@epam.com, volodymyr_babchuk@epam.com,
	Artem_Mygaiev@epam.com, roger.pau@citrix.com, jbeulich@suse.com,
	andrew.cooper3@citrix.com, george.dunlap@citrix.com,
	paul@xen.org, bertrand.marquis@arm.com, rahul.singh@arm.com,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: [PATCH v5 05/10] xen/domain: Call pci_release_devices() when releasing domain resources
Date: Fri,  8 Oct 2021 08:55:30 +0300	[thread overview]
Message-ID: <20211008055535.337436-6-andr2000@gmail.com> (raw)
In-Reply-To: <20211008055535.337436-1-andr2000@gmail.com>

From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

This is the very same that we already do for DT devices. Moreover, x86
already calls pci_release_devices().

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
---
Since v1:
 - re-wording in the commit message
---
 xen/arch/arm/domain.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index fbb52f78f1a6..79012bf77757 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -985,7 +985,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,
@@ -1022,6 +1023,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);
-- 
2.25.1



  parent reply	other threads:[~2021-10-08  5:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  5:55 [PATCH v5 00/10] PCI devices passthrough on Arm, part 2 Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 01/10] xen/arm: Add new device type for PCI Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 02/10] xen/arm: Introduce pci_find_host_bridge_node helper Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 03/10] xen/device-tree: Make dt_find_node_by_phandle global Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 04/10] xen/arm: Mark device as PCI while creating one Oleksandr Andrushchenko
2021-10-08  5:55 ` Oleksandr Andrushchenko [this message]
2021-10-08  5:55 ` [PATCH v5 06/10] libxl: Allow removing PCI devices for all types of domains Oleksandr Andrushchenko
2021-10-11 16:11   ` Anthony PERARD
2021-10-11 16:16     ` Oleksandr Andrushchenko
2021-10-25 13:14   ` Roger Pau Monné
2021-10-25 13:17     ` Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 07/10] libxl: Only map legacy PCI IRQs if they are supported Oleksandr Andrushchenko
2021-10-11 16:37   ` Anthony PERARD
2021-10-12  1:32     ` Stefano Stabellini
2021-10-25 13:22   ` Roger Pau Monné
2021-10-25 13:38     ` Oleksandr Andrushchenko
2021-10-25 13:46       ` Roger Pau Monné
2021-11-02 11:32       ` Jan Beulich
2021-11-02 11:37         ` Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 08/10] xen/arm: Setup MMIO range trap handlers for hardware domain Oleksandr Andrushchenko
2021-10-13 10:11   ` Roger Pau Monné
2021-10-25  9:38     ` Oleksandr Andrushchenko
2021-10-25 13:40       ` Roger Pau Monné
2021-10-25 13:47         ` Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 09/10] xen/arm: Do not map PCI ECAM and MMIO space to Domain-0's p2m Oleksandr Andrushchenko
2021-10-08 23:00   ` Stefano Stabellini
2021-10-13 16:17   ` Julien Grall
2021-10-25 11:37     ` Oleksandr Andrushchenko
2021-10-28 11:13       ` Julien Grall
2021-10-28 11:20         ` Oleksandr Andrushchenko
2021-10-08  5:55 ` [PATCH v5 10/10] xen/arm: Process pending vPCI map/unmap operations Oleksandr Andrushchenko
2021-10-13 15:30   ` Julien Grall
2021-10-25 11:24     ` Oleksandr Andrushchenko
2021-10-08 22:54 ` [PATCH v5 00/10] PCI devices passthrough on Arm, part 2 Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211008055535.337436-6-andr2000@gmail.com \
    --to=andr2000@gmail.com \
    --cc=Artem_Mygaiev@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=paul@xen.org \
    --cc=rahul.singh@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=volodymyr_babchuk@epam.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.