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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B2D5C433EF for ; Wed, 2 Feb 2022 02:01:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243747AbiBBCBQ (ORCPT ); Tue, 1 Feb 2022 21:01:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243753AbiBBCBL (ORCPT ); Tue, 1 Feb 2022 21:01:11 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A110DC06173E for ; Tue, 1 Feb 2022 18:01:11 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id t91-20020a25aae4000000b0061963cce3c1so24497282ybi.11 for ; Tue, 01 Feb 2022 18:01:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=q1oi/RXvkD8Dq7uJmeyWkylsnr5bf/ofiDPgwV3XBxs=; b=HxhJFx8m1xXWPSkOOlyIHZ6TrBS88zHq/VAT9Azm8OrGOXPZ9brzpZt4GDmYgOJy5d ynIOdFCljbEHCcUOgSq9oY6YBG5ym7KHqVPEvqeLPOvSDDelPg+wpmLbl7w+c1e1tUfz zzoKk/HVz+AOO/D8kD1g0E3cghS3LbDh588/FaPOBvMytF3sr93ri6+p0AEEHJexUu2q hIQT6OliOYVL+oHVbUo1X8dX3Cwh744nCTUT30tFFRnxC5XkOVyX9VOjZcNPmqFSMiCi C3A4uhN+FsT2AEv6udiM3Cib0xVhFo7fiC74QvwT5yC88rcxCP4xT4vwK63dV4piNsaq roVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=q1oi/RXvkD8Dq7uJmeyWkylsnr5bf/ofiDPgwV3XBxs=; b=Hp1ZaOy9J7BNLfU8yq1mitqbYL14jqZfMKC4d/Sg6jQ0P8n3ZD3DEbZYngvhuZ4MVK P0LnDUKFEDuVcCEM0eMc/Qm1OCSc7g51e5H6ebeI/YFr5y6/ua2MBJpPdzD9jxRsn+kU zMN3U9cwzuP5K/VhUwX/UVtFpwnUpJpLfW0Nd3tXvDMfq9yGXv7Dg7HK+wmegGodRRG2 /37BfnP+zxeaYtPYPXWvlDBi+cEWJXP9xxi9RjopDYUEkIcmjM/KqF+X1ZK2f972HcRK jYqGp202Y39mV31yFBPC9tEUYJEmfeQIxq4Oe7jboP5o8zfw6ASJmEn5d/qRdQWI7psa KqHg== X-Gm-Message-State: AOAM533kaHsLpgfB88n3GZ+MT9eCXacVCRrlKjWrLvxlOqfXeaKNXrB3 uK04YOjhCAyI8B9XM6OWtWZPXUxyNmax X-Google-Smtp-Source: ABdhPJwEpwwsb0wPv1uBzyjNY2EpARcBgOMHZ0zvO/DbYf2KSjn9bDzFDRksVosNRbsKOee80RK5err37Kpz X-Received: from rajat2.mtv.corp.google.com ([2620:15c:202:201:57dc:f744:660d:72d]) (user=rajatja job=sendgmr) by 2002:a25:e5c7:: with SMTP id c190mr29691167ybh.175.1643767270447; Tue, 01 Feb 2022 18:01:10 -0800 (PST) Date: Tue, 1 Feb 2022 18:01:03 -0800 In-Reply-To: <20220202020103.2149130-1-rajatja@google.com> Message-Id: <20220202020103.2149130-2-rajatja@google.com> Mime-Version: 1.0 References: <20220202020103.2149130-1-rajatja@google.com> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog Subject: [PATCH v2 2/2] dt-bindings: Document "UntrustedDevice" property for PCI devices From: Rajat Jain To: Rob Herring , "Rafael J. Wysocki" , Len Brown , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, Mika Westerberg , Greg Kroah-Hartman , Bjorn Helgaas , Bjorn Helgaas , ACPI Devel Maling List , Linux Kernel Mailing List , Rajat Jain , Dmitry Torokhov , Jesse Barnes , Jean-Philippe Brucker , Pavel Machek , "Oliver O'Halloran" , Joerg Roedel Cc: Rajat Jain Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the new "UntrustedDevice" property for PCI devices. This property is optional and can be applied to any PCI device. Signed-off-by: Rajat Jain --- v2: Initial version (added documentation based on comments) v1: Does not exist. Documentation/devicetree/bindings/pci/pci.txt | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt index 6a8f2874a24d..bc1ba10f51e1 100644 --- a/Documentation/devicetree/bindings/pci/pci.txt +++ b/Documentation/devicetree/bindings/pci/pci.txt @@ -82,3 +82,38 @@ pcie@10000000 { external-facing; }; }; + +PCI Device Properties +--------------------- +Following optional properties may be present for any PCI device: + +- UntrustedDevice: + When present, this property is an indicator that this PCI device (and + any downstream devices) are to be treated as untrusted by the kernel. + The kernel can, for example, use this information to isolate such + devices using a strict DMA protection via the IOMMU. + + Example device tree node: + pcie@0008 { + /* PCI device 00:01.0 is an untrusted device */ + reg = <0x00000800 0 0 0 0>; + UntrustedDevice = <1>; + }; + + Example ACPI node: + Scope (\_SB.PCI0.WFA3) + { + Name (_DSD, Package (0x02) // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device + Properties for _DSD */, + Package (0x01) + { + Package (0x02) + { + "UntrustedDevice", + One + } + } + }) + } -- 2.35.0.rc2.247.g8bbb082509-goog