libxl: Allow removing PCI devices for all types of domains
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Fri, 8 Oct 2021 05:55:31 +0000 (08:55 +0300)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Mon, 11 Oct 2021 20:27:04 +0000 (13:27 -0700)
The PCI device remove path may now be used by PVH on ARM, so the
assert is no longer valid.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
tools/libs/light/libxl_pci.c

index 1a1c2630803b5b3b4e07f093b688e0fd5780e745..59f3686fc85e193742e46aada883ec0008d18ab0 100644 (file)
@@ -1947,8 +1947,6 @@ static void do_pci_remove(libxl__egc *egc, pci_remove_state *prs)
             goto out_fail;
         }
     } else {
-        assert(type == LIBXL_DOMAIN_TYPE_PV);
-
         char *sysfs_path = GCSPRINTF(SYSFS_PCI_DEV"/"PCI_BDF"/resource", pci->domain,
                                      pci->bus, pci->dev, pci->func);
         FILE *f = fopen(sysfs_path, "r");