|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [early RFC] ARM PCI Passthrough design document
Hi Roger, On 01/02/17 10:55, Roger Pau Monné wrote: On Wed, Jan 25, 2017 at 06:53:20PM +0000, Julien Grall wrote:Hi Stefano, On 24/01/17 20:07, Stefano Stabellini wrote:On Tue, 24 Jan 2017, Julien Grall wrote:whilst for Device Tree the segment number is not available. So Xen needs to rely on DOM0 to discover the host bridges and notify Xen with all the relevant informations. This will be done via a new hypercall PHYSDEVOP_pci_host_bridge_add. The layout of the structure will be:I understand that the main purpose of this hypercall is to get Xen and Dom0 to agree on the segment numbers, but why is it necessary? If Dom0 has an emulated contoller like any other guest, do we care what segment numbers Dom0 will use?I was not planning to have a emulated controller for DOM0. The physical one is not necessarily ECAM compliant so we would have to either emulate the physical one (meaning multiple different emulation) or an ECAM compliant. The latter is not possible because you don't know if there is enough free MMIO space for the emulation. In the case on ARM, I don't see much the point to emulate the host bridge for DOM0. The only thing we need in Xen is to access the configuration space, we don't have about driving the host bridge. So I would let DOM0 dealing with that. Also, I don't see any reason for ARM to trap DOM0 configuration space access. The MSI will be configured using the interrupt controller and it is a trusted Domain.These last you sentences raise a lot of questions. Maybe I am missing something. You might want to clarify the strategy for Dom0 and DomUs, and how they differ, in the next version of the doc. At some point you wrote "Instantiation of a specific driver for the host controller can be easily done if Xen has the information to detect it. However, those drivers may require resources described in ASL." Does it mean you plan to drive the physical host bridge from Xen and Dom0 simultaneously? As Stefano suggested, we should try to initialize the hostbridge in Xen when possible. This will avoid a split interaction and our hair too :). I am looking at different hostbridge to see how much code would be required in Xen to handle them. I think the Xilinx root-complex is an easy one (see the discussion in [1]) and it is manageable to get the code in Xen. But some are much more complex, for instance the R-Car (see discussion in [2]) requires clocks, use a specific way to access configuration space and has the MSI controller integrated in the root complex. This would require some work with DOM0. I will mention the problem in the design document but not going to address it at the moment (too complex). Although, we would have to support it at some point as the root complex is used in automotive board (see [3]).
For now I will address:
- ECAM compliant/ECAM like root complex
- Root complex with simple initialization
For DT, I would have a fallback on mapping the root complex to DOM0 if
we don't support it. So DOM0 could still use PCI.
For ACPI, I am expecting all the platform ECAM compliant or require few quirks. So I would mandate the support of the root complex in Xen in order to get PCI supported.
I was effectively thinking to avoid trapping PCI config space, but you and Stefano changed my mind. It does not cost too much to trap ECAM access and would be necessary on non-ECAM one. This will also simplify the way to hide a PCI to DOM0. Xen can do it by making the config space of the device unavailable to DOM0 (similar to pciback.hide options today). Cheers, [1] <a1120a60-b859-c7ff-9d4a-553c330669f1@xxxxxxxxxx> [2] <616043e2-82d6-9f64-94fc-5c836d41818f@xxxxxxxxxx> [3] https://www.renesas.com/en-us/solutions/automotive/products/rcar-h3.html -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |