Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4609727pxb; Tue, 25 Jan 2022 14:23:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxh63wSjlC0Qpram5YMZewqbI+3EV3uQFEti4nA3CWdtDyGvhrmr/2ptHqpoL6hj4PV8JWU X-Received: by 2002:a17:903:300c:b0:14b:61:b1a9 with SMTP id o12-20020a170903300c00b0014b0061b1a9mr20747775pla.137.1643149421230; Tue, 25 Jan 2022 14:23:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643149421; cv=none; d=google.com; s=arc-20160816; b=ukkqn1dmfA2iJH2hGw1ROkpJr6UhhEJC0B5+O2VxxhxG78SgBejAW4OYNAoRjgeFvj 255kDFKQb1k1Zo/pXOGZ4B5vmER1fzg02O9m8Rw+/peFnIYORppt0MyN+fYc7U5lSXzY DB7XJUugh2WV4G0xfyFjYmcer8s7XK4u2KzKQuSlfJttZpTXQhlv1Z2rxZBImEmIShrl 9TLBAJ9AiKjaG/tsOzwQu4FMRJxHJwj6AJ7kSBMmePsqrSe6ksfRtEKLvrNvg7mcgu6l jK8wTNMRp2NLZL9Lwv2FLdGNYCDF/tJHi9BeRoQWeF22FufpoFKqXzD4z4p3zr9abins uVpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=2baAB3uSLjYkpNcq5GaJvhhWWvmQdMQHFWAgaLKDTts=; b=fjtIv81y7uDdgWCIJM5LalQrru2U0oYEZyJmd1/l43YhQT0NoPxM4BzDJPRjlhVqKV 5ifBUJ8cQNovJW52sOcqCFRl6gSAjIiylljvf/sXvubd4/cWGbGrl+5vo8S1kGL7R3KN DDpHXxbgBeJ3IBa++oy8FpoxO6sfy/BqG9uehFlgSLQc8NmfrVZUbWclIPJFCa3EP6Ni 3xv6Waj9MQ+LnnN5PxABeSwr42yQFMcFMDGtUFbYdHvY4tfQbBkt+/6or2TnSTj48BCA ggWJpTSngwWTUGtTRHpnlRUKeBazrzf/F1x6Ho0kF9t2Sr8UFmS1VV2LT0udK6q1Nifo IyTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si7215343plx.573.2022.01.25.14.23.29; Tue, 25 Jan 2022 14:23:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1580580AbiAYOvD (ORCPT + 99 others); Tue, 25 Jan 2022 09:51:03 -0500 Received: from mail-yb1-f182.google.com ([209.85.219.182]:38739 "EHLO mail-yb1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389262AbiAYOpa (ORCPT ); Tue, 25 Jan 2022 09:45:30 -0500 Received: by mail-yb1-f182.google.com with SMTP id i62so16004076ybg.5; Tue, 25 Jan 2022 06:45:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2baAB3uSLjYkpNcq5GaJvhhWWvmQdMQHFWAgaLKDTts=; b=OU7b01teOvLz6JMewIKe1XyupgILMDCitWHq0ZjsmbwwQSjobjeEtYofDCY/F4A4SX vHuF4CPknMAVUq1yyM0/5W4KmwFIhJPQAfNqFYfIp4LUbeYa00xSL2Au5kF5dPj72Vmr KX2kxnkLZSW4W7YnwA1r1GvN5eSEsa33s0wPep0x2Eh6W7Il10yR5bmgOd8zWBS/E3uo yFS2PHvIJJwcSMSMhP9kGRqBVYHJo/e7oN+9PiHEUjmNKdN7rDANLg+0sDzITjCMDwf0 oTs/XcbHp22W2cjOtyS1CJ8d1caC4drReM0R5K+FyCbqslShQk6E9DKvEtgqkvpgUq7P ccXA== X-Gm-Message-State: AOAM530e9fmZtAri3XrFpIPReg6c1XfKFIiZ4h4V4m66Rw8hNt0m+Hln lWUPJwhpua4hXkRwZAju5sPZMrXGtIipdo/KNvw= X-Received: by 2002:a5b:58d:: with SMTP id l13mr30663076ybp.475.1643121916245; Tue, 25 Jan 2022 06:45:16 -0800 (PST) MIME-Version: 1.0 References: <20220120000409.2706549-1-rajatja@google.com> <20220121214117.GA1154852@bhelgaas> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 25 Jan 2022 15:45:03 +0100 Message-ID: Subject: Re: [PATCH] PCI: ACPI: Allow internal devices to be marked as untrusted To: Mika Westerberg Cc: Greg Kroah-Hartman , Bjorn Helgaas , Rajat Jain , "Rafael J. Wysocki" , Len Brown , Bjorn Helgaas , ACPI Devel Maling List , Linux PCI , Linux Kernel Mailing List , Rajat Jain , Dmitry Torokhov , Jesse Barnes , Jean-Philippe Brucker , Pavel Machek , "Oliver O'Halloran" , Joerg Roedel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 1:55 PM Mika Westerberg wrote: > > On Tue, Jan 25, 2022 at 12:15:02PM +0100, Greg Kroah-Hartman wrote: > > On Tue, Jan 25, 2022 at 12:58:52PM +0200, Mika Westerberg wrote: > > > On Mon, Jan 24, 2022 at 08:27:17AM +0200, Mika Westerberg wrote: > > > > > > This patch introduces a new "UntrustedDevice" property that can be used > > > > > > by the firmware to mark any device as untrusted. > > > > > > > > I think this new property should be documented somewhere too (also > > > > explain when to use it instead of ExternalFacingPort). If not in the > > > > next ACPI spec or some supplemental doc then perhaps in the DT bindings > > > > under Documentation/devicetree/bindings. > > > > > > Actually Microsoft has similar already: > > > > > > https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-internal-pcie-ports-accessible-to-users-and-requiring-dma-protection > > > > > > I think we should use that too here. > > > > But we do not have "dma protection" for Linux, so how will that value > > make sense? > > Yes I think we do - IOMMU. That's the same thing what we do now for > "External Facing Ports". This one just is for internal ones. > > > And shouldn't this be an ACPI standard? > > Probably should or some supplemental doc but not sure how easy these > "properties" can be added there to be honest. > > Some of these that we use in Linux too are from that same page: > > https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports > > Namely these: HotPlugSupportInD3, ExternalFacingPort, usb4-host-interface, > usb4-port-number and StorageD3Enable. Right. We are kind of on the receiving end here, because at the time we learn about these things the decisions to use them have been made already.