From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86B0CC04AB6 for ; Fri, 31 May 2019 11:14:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 643822681C for ; Fri, 31 May 2019 11:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726403AbfEaLON (ORCPT ); Fri, 31 May 2019 07:14:13 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50240 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfEaLON (ORCPT ); Fri, 31 May 2019 07:14:13 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2A8B6341; Fri, 31 May 2019 04:14:13 -0700 (PDT) Received: from [10.1.196.129] (ostrya.cambridge.arm.com [10.1.196.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2E6DF3F5AF; Fri, 31 May 2019 04:14:10 -0700 (PDT) Subject: Re: [virtio-dev] Re: [PATCH v8 2/7] dt-bindings: virtio: Add virtio-pci-iommu node To: "Michael S. Tsirkin" Cc: "joro@8bytes.org" , "iommu@lists.linux-foundation.org" , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "virtio-dev@lists.oasis-open.org" , "jasowang@redhat.com" , "robh+dt@kernel.org" , Mark Rutland , Lorenzo Pieralisi , Robin Murphy , "bhelgaas@google.com" , "frowand.list@gmail.com" , "kvmarm@lists.cs.columbia.edu" , "eric.auger@redhat.com" , "tnowicki@caviumnetworks.com" , "kevin.tian@intel.com" , "bauerman@linux.ibm.com" References: <20190530170929.19366-1-jean-philippe.brucker@arm.com> <20190530170929.19366-3-jean-philippe.brucker@arm.com> <20190530133523-mutt-send-email-mst@kernel.org> From: Jean-Philippe Brucker Message-ID: Date: Fri, 31 May 2019 12:13:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190530133523-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 30/05/2019 18:45, Michael S. Tsirkin wrote: > On Thu, May 30, 2019 at 06:09:24PM +0100, Jean-Philippe Brucker wrote: >> Some systems implement virtio-iommu as a PCI endpoint. The operating >> system needs to discover the relationship between IOMMU and masters long >> before the PCI endpoint gets probed. Add a PCI child node to describe the >> virtio-iommu device. >> >> The virtio-pci-iommu is conceptually split between a PCI programming >> interface and a translation component on the parent bus. The latter >> doesn't have a node in the device tree. The virtio-pci-iommu node >> describes both, by linking the PCI endpoint to "iommus" property of DMA >> master nodes and to "iommu-map" properties of bus nodes. >> >> Reviewed-by: Rob Herring >> Reviewed-by: Eric Auger >> Signed-off-by: Jean-Philippe Brucker > > So this is just an example right? > We are not defining any new properties or anything like that. Yes it's just an example. The properties already exist but it's good to describe how to put them together for this particular case, because there isn't a precedent describing the topology for an IOMMU that appears on the PCI bus. > I think down the road for non dt platforms we want to put this > info in the config space of the device. I do not think ACPI > is the best option for this since not all systems have it. > But that can wait. There is the probe order problem - PCI needs this info before starting to probe devices on the bus. Maybe we could store the info in a separate memory region, that is referenced on the command-line and that the guest can read early. Thanks, Jean