[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 00/33] xen/arm: Add support for non-PCI passthrough
On Thu, Mar 19, 2015 at 07:29:26PM +0000, Julien Grall wrote: > Hello all, > > This is the fourth version of this patch series to add support for platform > device passthrough on ARM. > > In order to passthrough a non-PCI device, the user will have to: > - Map manually MMIO/IRQ > - Describe the device in the newly partial device tree support > - Specify the list of device protected by an IOMMU to assign to the > guest. > > While this solution is primitive, this is allow us to support more complex > device in Xen with an little additionnal work for the user. Attempting to > do it automatically is more difficult because we may not know the dependencies > between devices (for instance a Network card and a phy). > > To avoid adding code in DOM0 to manage platform device deassignment, the > user has to add the property "xen,passthrough" to the device tree node > describing the device. This can be easily done via U-Boot. For instance, > if we want to passthrough the second network card of a Midway server to the > guest. The user will have to add the following line the u-boot script: > > fdt set /soc/ethernet@fff51000 xen,passthrough > > This series has been tested on Midway by assigning the secondary network card > to a guest (see instruction below). Though, it requires a separate patch as > we decide to not support the Midway SMMU within the new drivers. > > I plan to do futher testing on other boards. Hi Julien, I did a bring-up of your work (an older version of your patches) on ZynqMP QEMU and it works nicely. Thanks for working on this! The partial device-tree support is nice and very flexible. I couldn't help thinking that it would be nice to be able to describe more of the guest with device-trees. It may be controversial but it would be cool to be able to go: xl create my-guest.dtb A more down-to earth thing I ran into is that on the ZynqMP, the Cortex-A53 is setup to have 40 bits physical addresses. Our SMMU announces support for up to 48bit input addresses (but can be configured for 40bits aswell). When XEN sets up passthrough for a dev, it probes the SMMU for the max input address size and uses that as the input size for the context. But because XEN reuses the page tables from p2m for the SMMU, we end up in a miss-match. I haven't looked at the details of how to fix but my gut feeling is that we should be re-using the input size of the stage 2 page-tables as the input-size for the SMMU. And only use the max input size of the SMMU to assert that it is big enough. I may be missing something though. The code in question is at the end of arm_smmu_device_cfg_probe(), already merged. Best regards, Edgar _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |