From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [ARM] SMMU and PCI passthrough Was: Re: Xen 4.5-rc1 update (RC1 is out 2014-Oct-24th) Date: Sun, 02 Nov 2014 10:17:51 +0000 Message-ID: <545604CF.60905@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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XksEN-0001XL-8E for xen-devel@lists.xenproject.org; Sun, 02 Nov 2014 10:17:55 +0000 Received: by mail-wg0-f41.google.com with SMTP id k14so9184036wgh.28 for ; Sun, 02 Nov 2014 02:17:53 -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: Ian Campbell , Stefano Stabellini , manish.jaggi@caviumnetworks.com, xen-devel , Christoffer Dall List-Id: xen-devel@lists.xenproject.org (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. > 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. > I > have already shared mine in another mail thread with stefano. Could you send a link to this mail? Regards, -- Julien Grall