[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 0/7] SMMU handling for PCIe Passthrough on ARM
Hi Rahul, On 25/06/2023 15:28, Rahul Singh wrote: Right, but selecting "pci-passthrough" to be able to use the IOMMU in dom0 is confusing. We already support PCI in dom0 and adding the support (IOMMU + PCI) has no relation with assigning a device to the guest. IOW one may want to use IOMMU in dom0 without assigning devices to the guest.On 25 Jun 2023, at 1:56 pm, Julien Grall <julien@xxxxxxx> wrote: On 15/06/2023 22:05, Stewart Hildebrand wrote:On 6/7/23 03:19, Julien Grall wrote:On 07/06/2023 04:02, Stewart Hildebrand wrote:This series introduces SMMU handling for PCIe passthrough on ARM. These patches are independent from (and don't depend on) the vPCI reference counting/locking work in progress, and should be able to be upstreamed independently.Can you clarify how this code was tested? Does this require code not yet upstreamed?I'm testing the series standalone (+ config changes) by using a PCI device in dom0, and also in combination with the vPCI series [3] [4] for passthrough to a domU. Here are some more details on the test cases I'm using.Thanks that's helpful! One comment about the first test case.1. Using the PCI device in dom0 with the pci-passthrough=yes arg. In this case a couple of additional config changes [1] [2] are needed to select CONFIG_HAS_PCI=y, CONFIG_HAS_VPCI=y, and make has_vpci() return true. Aside from this series itself and the config changes, nothing else not-yet-upstreamed is required for this test case. It is on my TODO list to upstream these config changes, which I think will be useful on their own, not necessarily as part of any other series.I find a bit confusing that the IOMMU support for dom0 is gated behind 'pci-passthrough'. I was expecting that the iommu would also be properly configured for PCI if we using 'iommu=yes'.As per my understanding Xen can configure the iommus for PCI device without "pci-passthrough” enabled if we follow below path: 1) PCI host bridge is already enumerated and powered on in firmware before Xen boot 2) PCI devices are scanned in Xen. (https://gitlab.com/xen-project/people/bmarquis/xen-arm-poc/-/commit/bce463e1588a45e1bfdf59fc0d5f88b16604e439) 3) After scanning the PCI devices add PCI devices to iommu ( iommu_add_device() ) If PCI host bridge is not enumerated then we need "pci-passthrough” enabled to allow Linux to do enumeration and to inform Xen via PHYSDEVOP_pci_device_add hyper call to add PCI devices in Xen This is implemented as part of PCI passthrough feature. I think part of the code gated by "pci-passthrough" should also be available when the IOMMU is enabled. This would allow users to use IOMMU + PCI in dom0 without any extra patches and/or command line option. Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |