[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 2/5] xen/arm: Enable the existing x86 virtual PCI support for ARM
- To: Bertrand Marquis <bertrand.marquis@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Julien Grall <julien@xxxxxxx>
- Date: Fri, 15 Oct 2021 16:10:12 +0100
- Cc: iwj@xxxxxxxxxxxxxx, Rahul Singh <rahul.singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 15 Oct 2021 15:10:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Bertrand,
On 15/10/2021 14:59, Bertrand Marquis wrote:
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index 3aa8c3175f..082892c8a2 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -766,7 +766,21 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
list_add(&pdev->domain_list, &hardware_domain->pdev_list);
}
else
+ {
+#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);
Sorry for only noticing it now. Looking at the last staging
vpci_add_handlers() is annotated with __hwdom_init. On Arm,
__hwdom_init means the function will disappear after boot.
However, pci_add_device() can be called from a physdev op. So I think we
would need to drop __hwdom_init. I can't seem to find this change in
this series. Did I miss anything?
The rest of the changes LGTM.
Cheers,
--
Julien Grall
|