Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4406095pxb; Tue, 25 Jan 2022 09:36:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+F7wGCikYG4FosPquNiQGsMZ35defM/9aJ9uckuLgMEM6r8liDOp/qb8GyxBeorDgvPOW X-Received: by 2002:a17:907:160d:: with SMTP id hb13mr6187555ejc.609.1643132206744; Tue, 25 Jan 2022 09:36:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643132206; cv=none; d=google.com; s=arc-20160816; b=mKPaEdMTfEJj62G4faTPoGjqf8jzGOTsH5/cHds6GWG4/o6wxst/LXi8j9/T3RWlYN f805Huig8SyQB1HJZgPaeZYOc2ECCZ51lgvWY8rU8O75b1fwDewe+vi0pbC7QFJ4ONNX DdrzqVD0u1NU8ex2fO3VqPfUJ8T5fgqTUouN7Um+kJwZmwE/e2ddfBLUgPUrqJAsw2gD ZAhPgHsvWB2y1HzWT1XHRuJAgtPKyYEGitxl216wV/VzBK3bHK0J+JjlDbNfB5CGW5aw a06Js/R2b6AEWlZs/hlSKPkIgpXXGXDNsqAU3JtMlwBFRlQ1xuViXcyTwM+XtvkD4E0E So8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/EQ9aaTNbDIesxt/RgQL3NzSdxq2Zcg+Whxwm9kn8yo=; b=a2+ksLJyXeWLNOP3b2ng3TRGiUEgzWEvoSGae2/lqa083nn7gDmcM64I/nD+MsG6xV SsOQn520LQhcZTfqwIIQUWb+auq4xlHBVlgH8oGhWgegbJtpcq1W6FrNStmM+tecWV1Z GjcAHoYiIFYMH/Qt9tIGgkYYDuOgX4TJfESeYMlj9eRCDvgcMp3YpRMH9btiBXVNooVb GB8FAm31eJPz/WFXubWSbsc+r9jaLWd9XfJofhLBE3Yy+xlABL8rdR1hj4MJqYv2H5YP 8q1bqqYFEOhpE8srzD/QS+c3JeRhqUnjKErGgmkrJOgTlcM9F50e8l/xgy7FxCftCMZO mAQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="NR//p5kd"; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si9665825ejk.429.2022.01.25.09.36.20; Tue, 25 Jan 2022 09:36:46 -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; dkim=pass header.i=@intel.com header.s=Intel header.b="NR//p5kd"; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1575210AbiAYNCm (ORCPT + 99 others); Tue, 25 Jan 2022 08:02:42 -0500 Received: from mga18.intel.com ([134.134.136.126]:51283 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573866AbiAYNAG (ORCPT ); Tue, 25 Jan 2022 08:00:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643115603; x=1674651603; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=yzsKhozAAf7/ioiWYX2kSFAetWf23UwLpvHuHDWhI9Q=; b=NR//p5kdFiAZh6yjNHLWilqU/esPUsLI97gCAJQO46Znm7s9P582cdZV CsUMdUhwdKSpo66axky/dVc2slTqkCtDACYv6mVrPLQcGU+AhjPC8y47U Gl4+ivl6Ppcrr+J6/fS4sEzSKpKjU61hXQOEJmhQU6GRqtuYhRIWTjxZx 9HV7taQQHtJBH0OL3BZ69x5uyz984UzlZBVMO7wlt7hBrY3SGYMJo9MFz GBCjR6Pa+1qmN0FgiY6McsxvNi9Tpz8Rx9oUJaOLGqyUhtBO3DqXCRua0 ynfu1a/iILtlO8LlN9X15kqPLudy0QPCBjlZJ9b73LmuPqJX8GFgvDZqq w==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="229866371" X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="229866371" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 04:55:47 -0800 X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="695823077" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.162]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 04:55:42 -0800 Received: by lahna (sSMTP sendmail emulation); Tue, 25 Jan 2022 14:55:40 +0200 Date: Tue, 25 Jan 2022 14:55:40 +0200 From: Mika Westerberg To: Greg Kroah-Hartman Cc: Bjorn Helgaas , Rajat Jain , "Rafael J. Wysocki" , Len Brown , Bjorn Helgaas , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, rajatxjain@gmail.com, dtor@google.com, jsbarnes@google.com, Jean-Philippe Brucker , Pavel Machek , Oliver O'Halloran , Joerg Roedel Subject: Re: [PATCH] PCI: ACPI: Allow internal devices to be marked as untrusted Message-ID: References: <20220120000409.2706549-1-rajatja@google.com> <20220121214117.GA1154852@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.