Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3072754pxb; Mon, 19 Apr 2021 23:12:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzln4gSn2bWJEiBh+sQQy34GCGThPl1bhcQbK5hIbBwKpSGnU0Hc5CcoQE924lMEps2tpiL X-Received: by 2002:a17:902:e74c:b029:ec:ad88:4bde with SMTP id p12-20020a170902e74cb02900ecad884bdemr6259599plf.75.1618899124338; Mon, 19 Apr 2021 23:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618899124; cv=none; d=google.com; s=arc-20160816; b=bqY04d9Suv6I1gXA3ulSuANQwBHBRe+Mh9A/n9nK0WvrTIru9cF5+6HlGBADiWjShn aqWylfFrJgjCDCgkIMpG04pCAYBu4tfuVQcUUobqNzdMTD9d960wFhCBlXbdwZ8Y1Vmn qet4y202NwiHPuRxT1va/svJsVIJ6C/5PUfk6m7+nARP3KClhnUD6XRWeAtzT+o92XIG RcKX1OEo095dZCWmMXkmjZDw6VLlIHuG3O8Mu5+MJeF7Mz9mhY+FVB2NHj+doesHE+LJ Hesyl9Ep/dt9QtxWtimz0Dx04rGXEJX32MkUFURPagT2AHk/lEenP/K1Sdn3kv8sMl/X oAZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VtGKwlLzt3o9NMgYENh3GoR2m2ntsi4c0i/iVk3g+b0=; b=p6MHh39Q3aQYG+15xu1jxp45vMdL5OfSDn5TSKlk9tNaKqYUGiKTA3GjYL2azBWw0q r2zZ+tG6Mec0YHmeLoRTYqHkr/AnZDV6gD4FvG+gkswfXGGvcnUNu4tlVLFGEcFHo3o5 T7gU9UdzXo+5e9dlRUq/QkKDWhhn//WuJOBVu5iPonCAUywp+mg1GDA4uli6uJb5y7v+ 1FIxDsPUtqcGYIGLAC/Nv5jO3lxrdwCY4Blq3xrvszURKAkRvwT6cZqzrlcQxkX/5R5I zGwf327tlMfaWXWHPMeJIK3alXNleSSyD63oF8ipFa+vhTexvOOJODOcCfT90zxfO7Bi CjDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KJc8dDKO; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si18282145pgm.525.2021.04.19.23.11.51; Mon, 19 Apr 2021 23:12:04 -0700 (PDT) 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=@infradead.org header.s=casper.20170209 header.b=KJc8dDKO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbhDTGLx (ORCPT + 99 others); Tue, 20 Apr 2021 02:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbhDTGLw (ORCPT ); Tue, 20 Apr 2021 02:11:52 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E19C06174A; Mon, 19 Apr 2021 23:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VtGKwlLzt3o9NMgYENh3GoR2m2ntsi4c0i/iVk3g+b0=; b=KJc8dDKOso7aewyB5hdF/M9Udy MJFlVN+fw0/ovRszP9qlI2D1dVX1Unx0DlfQMBXu/8B5zNzja2NRAwcbv9Hax+2208lVnYl4EQzDM dDzsBnXkPcIrhbt5+GGxdQJlZuNRSWdk9PSwFdbm6nVnfM/B33tSPYZnJiMGwJagLpEIHv1V8EMc9 1b9DQtuLk+/Pcvpad9gemSkgNe83axRZwq+6+OR1iQs0SNSXPvBD4i6rQ4JEOOle03Lvr0PMVkRvb ajK7yNVB5eB6QHGkIW8XCyA1iHit+L7KevaB89YmWSGSnlyCRRHH0+L6CvPAGBksDlK26hvVKwwue 8e6w2fhQ==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lYjaI-00EmxI-EI; Tue, 20 Apr 2021 06:10:11 +0000 Date: Tue, 20 Apr 2021 07:10:06 +0100 From: Christoph Hellwig To: Rajat Jain Cc: Joerg Roedel , Will Deacon , David Woodhouse , Lu Baolu , Bjorn Helgaas , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, helgaas@kernel.org, rajatxjain@gmail.com Subject: Re: [PATCH] pci: Rename pci_dev->untrusted to pci_dev->external Message-ID: <20210420061006.GA3523612@infradead.org> References: <20210420003049.1635027-1-rajatja@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210420003049.1635027-1-rajatja@google.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 05:30:49PM -0700, Rajat Jain wrote: > The current flag name "untrusted" is not correct as it is populated > using the firmware property "external-facing" for the parent ports. In > other words, the firmware only says which ports are external facing, so > the field really identifies the devices as external (vs internal). > > Only field renaming. No functional change intended. I don't think this is a good idea. First the field should have been added to the generic struct device as requested multiple times before. Right now this requires horrible hacks in the IOMMU code to get at the pci_dev, and also doesn't scale to various other potential users. Second the untrusted is objectively a better name. Because untrusted is how we treat the device, which is what mattes. External is just how we come to that conclusion.