From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH for-4.6 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map Date: Thu, 19 Feb 2015 13:46:09 +0000 Message-ID: <54E5E921.9050708@linaro.org> References: <1414144694.15687.31.camel@citrix.com> <54E168D6.6000502@amd.com> <54E1C2AA.3070504@linaro.org> <54E2AFCC.3090302@amd.com> <54E34592.2020803@linaro.org> <54E3472D.6030103@citrix.com> <54E3C21A.6080909@amd.com> <54E3DD71.6070001@amd.com> <54E422FE.4080803@amd.com> <54E48A0F.80900@linaro.org> <54E4F24E.2020602@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54E4F24E.2020602@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Suravee Suthikulanit , Andrew Cooper , Ian Campbell , Stefano Stabellini , xen-devel , Jan Beulich List-Id: xen-devel@lists.xenproject.org Hi Suravee, On 18/02/15 20:13, Suravee Suthikulanit wrote: >> Who decide to assign the MSI n to the SPI x? DOM0 or Xen? > > For v2m, each MSI is tied to a specific SPI. The range of SPIs is > specified in the GIC V2M_MSI_TYPER register. In Xen, we need to make > sure that these are routed to Dom0 initially since Dom0 GICv2m driver is > the one handling all MSI assignments. I guess you emulate the GICv2m frame? If so, can't you trap access to the frame in order to configure the SPI? >> Wouldn't it be possible to route the SPI dynamically when the domain >> decide to use the MSI n? We would need to implement PHYSDEVOP_map_pirq >> for MSI. > > Enabling MSI is done by each end-point PCI device drivers in the guest. > In Linux, this would mean that when the driver tries to allocate an MSI > interrupt, it would need to communicate back to Xen (possibly via > hypercall as you pointed out) to get the next available SPI. It is not > necessary for now. I am planning to revisit this when we try to > implement pass-through support. Lemme know if you think this should be > handled differently. The pass-through support will come quickly. I think it would be better to support this case now, mainly if we have to add some code in Linux. It may take some times to upstream it. Although, I haven't really though about how to do it in Xen. Regards, -- Julien Grall