From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [ARM] SMMU and PCI passthrough Was: Re: Xen 4.5-rc1 update (RC1 is out 2014-Oct-24th) Date: Mon, 03 Nov 2014 09:52:25 +0000 Message-ID: <54575059.8080905@linaro.org> References: <20141024180843.EA0DF10D709@laptop.dumpdata.com> <20141031142403.GA6913@laptop.dumpdata.com> <54539D4D.1040108@linaro.org> <20141031210156.GA20039@laptop.dumpdata.com> <54551BDD.5080800@linaro.org> <545604CF.60905@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XlEJJ-0005xZ-G1 for xen-devel@lists.xenproject.org; Mon, 03 Nov 2014 09:52:29 +0000 Received: by mail-wi0-f179.google.com with SMTP id h11so5847855wiw.0 for ; Mon, 03 Nov 2014 01:52:27 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: manish jaggi Cc: xen-devel , manish.jaggi@caviumnetworks.com, Ian Campbell , Christoffer Dall , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 03/11/2014 05:08, manish jaggi wrote: > On 2 November 2014 15:47, Julien Grall wrote: >> (Renaming the subject of the thread). >> >> On 02/11/2014 06:03, manish jaggi wrote: >>> >>> On 1 November 2014 23:13, Julien Grall wrote: >>>> >>>> Hi Konrad, >>>> >>>> >>>> On 31/10/2014 21:01, Konrad Rzeszutek Wilk wrote: >>>>> >>>>> >>>>> On Fri, Oct 31, 2014 at 02:31:41PM +0000, Julien Grall wrote: >>>>>> >>>>>> >>>>>> On 10/31/2014 02:24 PM, Konrad Rzeszutek Wilk wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> * PVH - PCI passthrough for DomU. >>>>>>>> >>>>>>>> >>>>>>>> I am working on Cavium Thunder (ARM64) on this feature. >>>>>>>> [Xen SMMU driver changes + PCI passthrough changes in Xen and Linux] >>>>>> >>>>>> >>>>>> >>>>>> FYI, I'm currently reworking the SMMU drivers to resync with Linux. >>>>>> With >>>>>> thoses changes, you should not need to modify the SMMU code. >>>>> >>>>> >>>>> >>>>> Thank you for the update. Put your name behind that for 4.6. >>>>>> >>>>>> >>>>>> >>>>>>> Ok, replaced Julien's name with yours. Please make sure >>>>>>> that for the Linux patches you CC xen-devel and the >>>>>>> maintainers (David, Stefano, Boris and me). >>>>>> >>>>>> >>>>>> >>>>>> There is 2 distinct passthrough: platform (i.e non-PCI) and PCI one. >>>>>> >>>>>> While Manish is working on PCI passthrough, I'm still working the >>>>>> non-PCI one. Please don't drop my name. >>>>> >>>>> >>>>> >>>>> I thought that Arianna's patches had taken care of that (the MMIO >>>>> part?). Or does each platform need a different implementation of >>>>> that? >>>> >>>> >>>> >>>> To passthrough a platform device you need to be able to assign the device >>>> to >>>> the guest via the IOMMU and map MMIOs (done by Arianna's series) and >>>> interrupts. >>>> >>> For a PCI passthrough SMMU ops are to be added. The way the smmu for a >>> pci device is found needs to be updated in the smmu.c, so there are >>> some substantial changes to smmu.c for pci passthrough. >> >> >> The SMMU drivers in Linux already supports PCI. As I'm currently resync our >> driver with this version PCI assignment in the SMMU should come freely. >> >> I expect the only plumbing for the Xen callback and few bugs fixes will be >> necessary. >> > we can discuss more on design level. There are changes What kind of changes? Do you have a tree with them? >>> Also MMIO mapping code the same pci device to be added. >> >> >> Hmmm? What do you mean? MMIO mapping code is definitely not part of the SMMU >> drivers. >> >> IIRC, this should be done by either the toolstack or PCI back in Linux. >> >>> So in short there changes, and as they are in the same files and >>> features are also similar, is it possible that we work together may >>> be julien can provide a design document (simple txt file would do). >> >> >> There is no need of design document for the SMMU drivers. Everything for DT >> passthrough is already there. >> > It would be helpful if you can provide a basic flow. http://lists.xen.org/archives/html/xen-devel/2014-07/msg04090.html -- Julien Grall