Message ID | 24f88973257b7038511a0ca49a992d38b295c26f.1634639117.git.bertrand.marquis@arm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Fixes: PCI devices passthrough on Arm | expand |
On 19.10.2021 12:40, Bertrand Marquis wrote: > --- a/xen/drivers/passthrough/pci.c > +++ b/xen/drivers/passthrough/pci.c > @@ -756,11 +756,6 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, > if ( !pdev->domain ) > { > pdev->domain = hardware_domain; > -#ifdef CONFIG_ARM > - /* > - * On ARM PCI devices discovery will be done by Dom0. Add vpci handler > - * when Dom0 inform XEN to add the PCI devices in XEN. > - */ > ret = vpci_add_handlers(pdev); I think it wouldn't hurt to retain a (re-worded) comment here, maybe along the lines of "For devices not discovered by Xen during boot, add vPCI handlers when Dom0 first informs Xen about such devices." Jan
Hi Jan, > On 19 Oct 2021, at 13:29, Jan Beulich <jbeulich@suse.com> wrote: > > On 19.10.2021 12:40, Bertrand Marquis wrote: >> --- a/xen/drivers/passthrough/pci.c >> +++ b/xen/drivers/passthrough/pci.c >> @@ -756,11 +756,6 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, >> if ( !pdev->domain ) >> { >> pdev->domain = hardware_domain; >> -#ifdef CONFIG_ARM >> - /* >> - * On ARM PCI devices discovery will be done by Dom0. Add vpci handler >> - * when Dom0 inform XEN to add the PCI devices in XEN. >> - */ >> ret = vpci_add_handlers(pdev); > > I think it wouldn't hurt to retain a (re-worded) comment here, maybe > along the lines of "For devices not discovered by Xen during boot, > add vPCI handlers when Dom0 first informs Xen about such devices." Ok, I will add that in v2. Cheers Bertrand > > Jan >
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 35e0190796..d7e09448d1 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -756,11 +756,6 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, if ( !pdev->domain ) { pdev->domain = hardware_domain; -#ifdef CONFIG_ARM - /* - * On ARM PCI devices discovery will be done by Dom0. Add vpci handler - * when Dom0 inform XEN to add the PCI devices in XEN. - */ ret = vpci_add_handlers(pdev); if ( ret ) { @@ -768,7 +763,6 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, pdev->domain = NULL; goto out; } -#endif ret = iommu_add_device(pdev); if ( ret ) {
Xen might not be able to discover at boot time all devices or some devices might appear after specific actions from dom0. In this case dom0 can use the PHYSDEVOP_pci_device_add to signal some PCI devices to Xen. As those devices where not known from Xen before, the vpci handlers must be properly installed during pci_device_add for x86 PVH Dom0, in the same way as what is done currently on arm (where Xen does not detect PCI devices but relies on Dom0 to declare them all the time). So this patch is removing the ifdef protecting the call to vpci_add_handlers and the comment which was arm specific. Suggested-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> --- xen/drivers/passthrough/pci.c | 6 ------ 1 file changed, 6 deletions(-)