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=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable 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 8C990C43381 for ; Wed, 20 Mar 2019 22:03:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C7C1218AE for ; Wed, 20 Mar 2019 22:03:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FPenkucI"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="sb5W8cwB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C7C1218AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a3mC2N74Wpe+v/fqwmzOpGJ4/xSN79zUw9SThUhOoiU=; b=FPenkucIaVvajh +VQrHTcWyuIQkW/J1FekEakAR/GfT4jZ8GDS0sWEEciqDq/ZG24R5F4BPsgpMY9W9HWmdFM3RSDRM Wes+rD+UdLkHcWZSy+dLMBOCIamRiaouWJVz+3BjEeny9qy3TssAGTmWOW0H22G9Khw1X7+uW7gNR QDwdVawT+oz2MrqM8myKzBSbqfGk8Rh6U+rY/1plZVk4oiQc+9AExVCHLRaHjV8avN3urtMb3fqgZ I+fONUjFt9AlKY2MNyrkcd/ClnYVvXyykT4vokwjhWGRsI/hkEaw0OAS8N/OuGjMYnggrw3+oBfjF E+/bXJ0DpzZkTX7f5Nag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6jJH-00008V-GD; Wed, 20 Mar 2019 22:03:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6jJF-00008B-6Q for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2019 22:03:42 +0000 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1718B218AE; Wed, 20 Mar 2019 22:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553119420; bh=74KpYV6dfYZDWtfuaUWmLfwBeifkLeo8R5Ykkyriqeo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sb5W8cwBdrzvB3VHOdZnBsS5/X+R0cw/9L4srkVCZ9YmUS+ScFOgBKl57hz6kf5xH 3jOQJT486wwV2PkWhmW38nRwnGwChFMNT6PLR1RJuyjxYptXuuhuoMqo5zdBd5bSJU UAEIsMkVqPsjOdJVdN1WdZKDX7J2p5OdACqRIFWA= Date: Wed, 20 Mar 2019 17:03:38 -0500 From: Bjorn Helgaas To: Jean-Philippe Brucker Subject: Re: [PATCH 1/2] dt-bindings: Add external-facing PCIe port property Message-ID: <20190320220338.GH251185@google.com> References: <20190318182124.53859-1-jean-philippe.brucker@arm.com> <20190318182124.53859-2-jean-philippe.brucker@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190318182124.53859-2-jean-philippe.brucker@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190320_150341_279260_F0998625 X-CRM114-Status: GOOD ( 25.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Grant.Likely@arm.com, linux-pci@vger.kernel.org, Jeremy.Linton@arm.com, robh+dt@kernel.org, Robin.Murphy@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 18, 2019 at 06:21:23PM +0000, Jean-Philippe Brucker wrote: > Provide a way for the firmware to tell the OS which devices are external > to the machine and therefore untrusted. The property can describe for > example thunderbolt and other hot-pluggable ports, which should always > have the strongest IOMMU protection. s/thunderbolt/Thunderbolt/ I think the important bit is that the port is user-accessible, whether it is hot-pluggable or not, right? I think I'm OK with this from a PCI perspective. > Signed-off-by: Jean-Philippe Brucker > --- > Documentation/devicetree/bindings/pci/pci.txt | 47 +++++++++++++++++++ > 1 file changed, 47 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt > index c77981c5dd18..55cdbc5d2804 100644 > --- a/Documentation/devicetree/bindings/pci/pci.txt > +++ b/Documentation/devicetree/bindings/pci/pci.txt > @@ -24,3 +24,50 @@ driver implementation may support the following properties: > unsupported link speed, for instance, trying to do training for > unsupported link speed, etc. Must be '4' for gen4, '3' for gen3, '2' > for gen2, and '1' for gen1. Any other values are invalid. > + > +PCI-PCI Bridge properties > +------------------------- > + > +Root ports and switch ports may be described explicitly in the device Maybe "PCIe root ports and switch ports" since pci.txt seems to apply to both conventional PCI and PCIe? > +tree, as children of the host bridge node. Even though those devices are > +discoverable by probing, it might be necessary to describe properties that > +aren't provided by standard PCIe capabilities. > + > +Required properties: > + > +- reg: > + Identifies the PCI-PCI bridge. As defined in the IEEE Std 1275-1994 > + document, it is a five-cell address encoded as (phys.hi phys.mid > + phys.lo size.hi size.lo). phys.hi should contain the device's BDF as > + 0b00000000 bbbbbbbb dddddfff 00000000. The other cells should be zero. > + > + The bus number is defined by firmware, through the standard bridge > + configuration mechanism. If this port is a switch port, then firmware > + allocates the bus number and writes it into the Secondary Bus Number > + register of the bridge directly above this port. Otherwise, the bus > + number of a root port is the first number in the bus-range property, > + defaulting to zero. > + > + If firmware leaves the ARI Forwarding Enable bit set in the bridge > + above this port, then phys.hi contains the 8-bit function number as > + 0b00000000 bbbbbbbb ffffffff 00000000. Note that the PCIe specification > + recommends that firmware only leaves ARI enabled when it knows that the > + OS is ARI-aware. > + > +Optional properties: > + > +- external-facing: > + When present, the port is external facing. All bridges and endpoints > + downstream of this port are external to the machine. Maybe include a note about why this is important, ie, we care because malicious devices may be attached to an external port? I know you have that in the commit log but it would be more visible here. Elsewhere you use "external-facing", here too for consistency? > +Example: > + > +pcie@10000000 { > + compatible = "pci-host-ecam-generic"; > + ... > + pcie@0008 { > + /* Root port 00:01.0 is external-facing */ > + reg = <0x00000800 0 0 0 0>; > + external-facing; > + }; > +}; > -- > 2.21.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel