From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 13/24] xen/arm: Implement hypercall PHYSDEVOP_{, un}map_pirq Date: Mon, 23 Feb 2015 21:54:15 +0000 Message-ID: <54EBA187.307@linaro.org> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> <1421159133-31526-14-git-send-email-julien.grall@linaro.org> <54C932BF.5070009@linaro.org> <54CA2709.9080409@linaro.org> <1424451224.30924.357.camel@citrix.com> <54EB01E102000078000625CB@mail.emea.novell.com> <1424705290.27930.161.camel@citrix.com> <54EB4CE7.3040509@linaro.org> <1424707450.27930.191.camel@citrix.com> <54EB514E.5010604@linaro.org> <1424709262.27930.210.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YQ0xH-0002Rl-Mo for xen-devel@lists.xenproject.org; Mon, 23 Feb 2015 21:54:19 +0000 Received: by wevk48 with SMTP id k48so21572469wev.0 for ; Mon, 23 Feb 2015 13:54:18 -0800 (PST) In-Reply-To: <1424709262.27930.210.camel@citrix.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: Ian Campbell Cc: xen-devel@lists.xenproject.org, Stefano Stabellini , stefano.stabellini@citrix.com, Jan Beulich , tim@xen.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 23/02/2015 16:34, Ian Campbell wrote: > On Mon, 2015-02-23 at 16:11 +0000, Julien Grall wrote: >> On 23/02/15 16:04, Ian Campbell wrote: >>> On Mon, 2015-02-23 at 15:53 +0000, Julien Grall wrote: >>>> Hi Ian, >>>> >>>> On 23/02/15 15:28, Ian Campbell wrote: >>>>> On Mon, 2015-02-23 at 09:33 +0000, Jan Beulich wrote: >>>>>>>>> On 20.02.15 at 17:53, wrote: >>>>>>> Jan, do you have any feeling for how this is going to play out on x86 >>>>>>> with the vapic stuff? >>>>>> >>>>>> The vapic logic shouldn't require any physdevop involvement, so if >>>>>> I read right what you propose (not having such a requirement / >>>>>> connection on ARM) either, I agree that a new domctl should be all >>>>>> that's needed (if XEN_DOMCTL_{,un}bind_pt_irq can't be re-used). >>>>> >>>>> Actually, I think bind_pt_irq with a new PT_IRQ_TYPE_* would be a good >>>>> option. >>>>> >>>>> An ARM SPI is a bit like an ISA IRQ, but not close enough to reuse IMHO >>>>> (and the datatype would need widening). >>>> >>>> We have to think about MSI and other type too... >>>> >>>> In any case a DOMCTL is not suitable here because a guest kernel may >>>> need to map/unmap IRQ too (think about ACPI or device passthrough). >>> >>> I don't follow, setting up device passthrough is very much a toolstack >>> operation, isn't it? Where does the guest kernel get involved? >> >> Sorry I meant the DOM0 kernel. >> >> Not really. On platform device pass-through there is no way to know the >> IRQ, so for now the routing is done by the toolstack. >> >> But we could decide to implement a driver in DOM0 which will >> unbind/bind/reset device. > > Sure, but... > >> In this case it will require to >> assign/deassign the IRQ from DOM0. > > ...why does that follow? Because we may decide to re-use the device to DOM0. In the case of the DOMCTL, it's not possible to do it. >> There is also the case of MSI. > > Handled via XEN_DOMCTL_bind_pt_irq for the toolstack configuration > angle, the actual guest usage of them is a separate interface which > doesn't yet concern us, at least not in this series. That would require some rework in the toolstack to make the IRQ routing (xc_physdev...) per architecture. Also what about IRQ permission? Should we just ignore it and not give permission to the guest domain? >>> As for ACPI, I think dom0 propagating ACPI derived platform info to Xen >>> should be handled differently (at the hypercall interface at least) >>> separate from passthrough. >> >> There is no difference between routing because of ACPI and/or because >> pass-through. So this should be done the same way. > > I'm not convinced. Routing all the IRQs is only one aspect of dom0 > propagating ACPI derived platform info to Xen. > > I suppose we will see once I look at the ACPI series. In the meantime I > think XEN_DOMCTL_bind_pt_irq matches your requirements in for this > series (and is a domctl so we aren't tied to it once we have a better > understanding of the other stuff). ACPI is one part of the problem, MSI with PCI is another problem. Anyway, I suspect we will have the same talk before 4.6 release so we just defer the problem. Regards, -- Julien Grall