[PATCH v5 06/10] libxl: Allow removing PCI devices for all types of domains

Oleksandr Andrushchenko posted 10 patches 4 years, 4 months ago
There is a newer version of this series
[PATCH v5 06/10] libxl: Allow removing PCI devices for all types of domains
Posted by Oleksandr Andrushchenko 4 years, 4 months ago
From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

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>
---
Cc: Ian Jackson <iwj@xenproject.org>
Cc: Juergen Gross <jgross@suse.com>
---
 tools/libs/light/libxl_pci.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c
index 1a1c2630803b..59f3686fc85e 100644
--- a/tools/libs/light/libxl_pci.c
+++ b/tools/libs/light/libxl_pci.c
@@ -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");
-- 
2.25.1


Re: [PATCH v5 06/10] libxl: Allow removing PCI devices for all types of domains
Posted by Anthony PERARD 4 years, 3 months ago
On Fri, Oct 08, 2021 at 08:55:31AM +0300, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> The PCI device remove path may now be used by PVH on ARM, so the
> assert is no longer valid.

Is there maybe a patch or a commit you could point to which say that
there can be PCI passthrough on PVH?

> 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>

In any case,
Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

Re: [PATCH v5 06/10] libxl: Allow removing PCI devices for all types of domains
Posted by Oleksandr Andrushchenko 4 years, 3 months ago
Hi, Anthony!

On 11.10.21 19:11, Anthony PERARD wrote:
> On Fri, Oct 08, 2021 at 08:55:31AM +0300, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> The PCI device remove path may now be used by PVH on ARM, so the
>> assert is no longer valid.
> Is there maybe a patch or a commit you could point to which say that
> there can be PCI passthrough on PVH?
Unfortunately no, this is what all the PCI series on Arm are for
>
>> 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>
> In any case,
> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thank you,
Oleksandr
> Thanks,
>
Re: [PATCH v5 06/10] libxl: Allow removing PCI devices for all types of domains
Posted by Roger Pau Monné 4 years, 3 months ago
On Fri, Oct 08, 2021 at 08:55:31AM +0300, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> The PCI device remove path may now be used by PVH on ARM, so the
> assert is no longer valid.

I think ti might be worth saying that this is a preparatory change and
that PCI passthrough is not yet functional on Arm after it.

Thanks, Roger.

Re: [PATCH v5 06/10] libxl: Allow removing PCI devices for all types of domains
Posted by Oleksandr Andrushchenko 4 years, 3 months ago
Hi, Roger!

On 25.10.21 16:14, Roger Pau Monné wrote:
> On Fri, Oct 08, 2021 at 08:55:31AM +0300, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> The PCI device remove path may now be used by PVH on ARM, so the
>> assert is no longer valid.
> I think ti might be worth saying that this is a preparatory change and
> that PCI passthrough is not yet functional on Arm after it.
Unfortunately this change has already landed.
>
> Thanks, Roger.
Thank you,
Oleksandr