Article View: linux.kernel.netdev
Article #17416Re: [PATCH v2 18/19] PCI: Replace untrusted state with device trust
From: Jason Gunthorpe
Date: Mon, 16 Nov 2026 19:04
Date: Mon, 16 Nov 2026 19:04
67 lines
14857 bytes
14857 bytes
On Mon, Nov 16, 2026 at 10:46:25AM -0800, Kameron Carr wrote:
> > @@ -1738,24 +1738,24 @@ static void set_pcie_cxl(struct pci_dev *dev)
> >
> > }
> >
> > -static void set_pcie_untrusted(struct pci_dev *dev)
> > +static void pci_set_default_trust_policy(struct pci_dev *dev)
> > {
> > - struct pci_dev *parent = pci_upstream_bridge(dev);
> > + struct pci_dev *parent = pci_physfn(dev);
> > +
> > + if (parent == dev)
> > + parent = pci_upstream_bridge(dev);
> >
> > if (!parent)
> > return;
>
> Hi Leon,
>
> The default policy here works for physical hierarchies, but there's no
> opportunity for a paravirtual host bridge to participate in the trust
> resolution when the host bridge driver itself knows the appropriate
> trust level for a device.
HW doesn't really "know" the trust level, it can suggest a default but
the kernel command line and userspace should always be able to
override it.
> My scenario is pci-hyperv in a confidential VM with a paravisor. The
> paravisor is inside the guest's trust boundary and owns TDISP. It locks,
> attests and accepts the device, then answers a VMBus query describing
> which BAR ranges are private and whether the device's DMA may target
> private memory. Before a driver can bind pci-hyperv has to:
Sounds like a user in such an environment just wouldn't use the trust
level mechanism at all.
What use do you see for enabling trust level but having all the
devices unattestable and accepted already?
Your bigger issue is the below:
> - query the paravisor,
> - refuse to operate the device if the query failed or if the response
> is invalid,
> - decide whether the device may operate.
>
> The modular host bridge driver in this scenario needs a hook to be able
> to participate in trust resolution.
>
> I'm also looking for the right place to setup MMIO and configure DMA
> in my scenario. Let me know if you have guidance.
Well, you are very far outside what Linux expects for a CC flow, and
these special requests conflict with the arch code flows we need to
have.
So, I don't know. Maybe somewhere in the arch code hyperv can hook and
say the device is special? You'll have to see when we get more of the
CC stuff layed out.
Though, FWIW, I don't like it at all as a model. Denying the tenant
the ability to directly attest the HW is far away from what I'd
consider as necessary for CC.
Jason
Technical Details
Message-ID:
<20261116190417.GD2299285@ziepe.ca>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364659-linux-kernel-netdev=dewy.ruReferences:
<20261109-device-trust-core-v2-0-3b12d9a9f861@nvidia.com> <20261109-device-trust-core-v2-18-3b12d9a9f861@nvidia.com> <193e4130-9c2f-4a0f-b218-f5fcf0b3d508@linux.microsoft.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364659-linux-kernel-netdev=dewy.ru
From: jgg@ziepe.ca (Jason Gunthorpe)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v2 18/19] PCI: Replace untrusted state with device trust
Date: Mon, 16 Nov 2026 15:04:17 -0400
Organization: Usenet Network
Message-ID: <20261116190417.GD2299285@ziepe.ca>
References: <20261109-device-trust-core-v2-0-3b12d9a9f861@nvidia.com>
<20261109-device-trust-core-v2-18-3b12d9a9f861@nvidia.com>
<193e4130-9c2f-4a0f-b218-f5fcf0b3d508@linux.microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
logging-data="2144882"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:xowVxLhVZ3p9167Ff1lfwNYSrPg= sha256:EzxVyt6YQIaG4ZrV6ZIlK4oby0FktBeSoWSCMO1abgk=
sha1:MJXzGqeRKtrU1IzfWl/ae6tFNCE= sha256:LbaZwwpWQhynwRIGMZzxjONMa+9EH/RgPxsiBokirX4=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 8170D114D48; Mon, 16 Nov 2026 22:05:10 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.951
X-Spam-Status: No, score=-1.951 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=ziepe.ca
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 2SQkSo3Q6uBi;
Mon, 16 Nov 2026 22:05:07 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-364659-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=ziepe.ca
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id C08D7114D47; Mon, 16 Nov 2026 22:04:58 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 1452931887; Mon, 16 Nov 2026 19:04:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1794855866;
b=GlqrL5JzfmCHrWP9kfXc/4AKBfpKzf+sqYRPb/ALjUHxKL4dh9cQ7x2CEJzSQiiMflUj
OZKi4pxuIxW0wX8kJHQFIwNkwAJ9S+kg+0XXuLjX02f9zRZ8vhxFBOJGuIYDyJqtZ8H1U
ueEdfwsUcDZjWSkOCq9AHHuM97XD48nFb9AblnwkF4ATToNGJs2CI/68soB/IfGVsXp8r
QUjY6OV6vnhhI1vEAtiv1/GSpSZ6knGXBXGafybQkto1gQE0hIZTSuveqZGWDhbjz5KBW
LukX0ps9N89unocKnpfwcy9uDBrwVcdPdmzEUU5D2+Ou+mmCmvP3iPKzXvSCVuvpaDQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794855866;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:Received:Date:From:To:Cc:Subject:
Message-ID:References:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To;
bh=WvOfbKHC1YhEa2QpW290x7cG/RSkj9nU3s9Pf1uScWc=;
b=cliN71arEGIM0turQwOcBm0pQqYQgiVNZL2z2+HKvqj/3klxdqgmyFcH7L8kMIHfdC7b
SNGF0qBxZ90a17SEIOTBk9sMYiCMTHGpmHoggEB8x/FvMSdDdCx0Zo34l0HqixPfft1a0
WEDy2ub+F8mbjFIKETVjp8TG83nLAFdU8T3YjUFjL/Pw1Xkwe9E/9A3OSmyQ+mciRquAr
pYqVZcpLeVB/ddHBDyUymNzvQ3reSfm1IM6jAQeWcobTzMJdnzqmNGVJLw7UnyQD2TpCz
fNrmKoQu8j32ITSp/xbxthyZyvozSd+tLiXPSZ78TdAt9dZb3bprCRaRnMMsH8XYVxg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=cV6xCUYW;
dmarc=none header.from=ziepe.ca;
spf=pass smtp.mailfrom=ziepe.ca;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CC95606A32A;
Mon, 16 Nov 2026 19:04:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=cV6xCUYW
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.172
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794855860;
b=WzAbRMhWNBgYC/rCFpqBPeMSa4twABr6N875CH/jJqKfecvMqouVw/F64MPwgyexNTIR
lZKwV4YDwrg9IrUGS93Y92XRagOrnFKC9q4flPItUje9J0In7F8iKhf57lQHvOF+V/QKz
MegyFb78jLRCwOwC30fOp+4JM7SxEhZYAAgdgNX/ty8zHUpc2PoCNjw7y+nfEwMek/Yy0
Wu8sBvuFagFGVmfXeE+ginAgONaiy6d705FDcJ3CpasAKI6iqOX7L5V8PNmArQTaT1pjK
HHFYcx9Vu8ipHrtt7L8vKhZ4P/fboAPQo7s0teAWnA6/berL5IR8+cTw0OsdV0Zu25A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794855860;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To;
bh=WvOfbKHC1YhEa2QpW290x7cG/RSkj9nU3s9Pf1uScWc=;
b=t1rWLf06gyDoFzCGtCVJs2blyi3kxF3nmQ7oTItG8oJE+lNxsx/Hgu045+ZLdqNH+uzL
QknueyVAROirxYhik/h+mtA74T8B9fM5xl3L8BsJK/KKWBZXQOgeVC2Hdl61ZhMl3bZaL
QjmP6WHb0eezsyMPm0Xuw0hpUSj3d/sXuvfFVSEJAwI0OlqCyA24CdagBIhuMBGYhU+FF
pA+Jl1HtGKtJrDaPD6NvzBfIoCnmXQ/H40J99gFz4S3VNBK8q0VZdUApnJ3vlkeP+r6Rt
+aQQ4XXaQcRnVUNk+2gScancI45/w09/5nVfxxhAP/ANDSs/q+1RaNrq0PnSimXpB3g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=ziepe.ca;
spf=pass smtp.mailfrom=ziepe.ca;
dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=cV6xCUYW;
arc=none smtp.remote-ip=209.85.160.172
X-Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E386F606A330
for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 19:04:19 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E386F606A330
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca
X-Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-53669f7b518so50537551cf.2
for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 11:04:19 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=ziepe.ca; s=google; t=1794855859; x=1795460659; darn=vger.kernel.org;
h=in-reply-to:content-disposition:content-type:mime-version
:references:message-id:subject:cc:to:from:date:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=WvOfbKHC1YhEa2QpW290x7cG/RSkj9nU3s9Pf1uScWc=;
b=cV6xCUYW6Nj32ATgj9pR3hPHUcXMAswfWFmbofUn9Kj8O2h0vBxKz+gKkblkAcoZs4
3Sksf2uZJcrqFHnWfbGA31BNzwsf2S1dv95GJqgZVMfFGYLSB6zg6g2Fr+yuwov/in3t
kzMGwphN2MWZmbFV+wYJtbSpA7Il47XDSpoenMocuugAiDnZMkgQe82N6D/LNCvFdxrw
g4Vs+tRlvNQP2aXotTXnhkPG5j8fWm0uVGtEmoX6U112LRHDjo2Qmq5iAcSLMow6gR3a
CP6w8W/FgL6u2p7O81zc788TpdcCz8lIWVKQDNRHCpvZKfTuZAAb/gE598LmoW33C074
z1Cw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794855859; x=1795460659;
h=in-reply-to:content-disposition:content-type:mime-version
:references:message-id:subject:cc:to:from:date:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=WvOfbKHC1YhEa2QpW290x7cG/RSkj9nU3s9Pf1uScWc=;
b=d2IpGlhjCbYISCc9KwjdBvrWy242FHZdT8xhTUAUry+kBmyAMb+MzPNS4uaeQN8PaQ
xjzuTHNCIp7CEvm18K7IjCZmSFeqUyX120Vb4pP0XzDPrt0XD6QFQ5tfHYVTGVhv8grS
ZsEhbCNkacjx7MY1coEBuj9gNldydMCGTG4Fz9pSSe3HhdC9AeaIb35byipRkYNjXnxS
0Zr9JnoJ8b2y2AhuYDeAW7fo73yBwBGeSnU4zkMYFQqPAGt5cDCDTWkoEk4s7b0pCZGL
aZ87/8Am2Bl2Hd4Bfaqva97l44BcnhrzzpU1R32yQ/ygypENHdyZp9l443pVc0Z91YcW
sS2g==
X-Forwarded-Encrypted: i=1; AL+hErFd/bhCrkDVZyssownYipvE2m8+Rf2C1a4zPKflpNaKga+t82nxD5lhdmyMCEksqdqABCkrz3A=@vger.kernel.org
X-Gm-Message-State: APuU4Z/uueZfogyQWhyLvM2nruRA+LxSHSkyCm7xQdp1qeMPQQrBMJB6
yN7anyqvIe6CQoEoAd9oHqNPHPxIGlbk9fWt9FptZJm5+uahH7BTHgFoJg/sYKvk0Hs=
X-Gm-Gg: AYBFou3pLyxUEtnJVXHM/mIqF57JLvtjQa05PkMZ4Fc/Y1+WKjLgbO714Z8qA57NzQH
a5y62FRw2iX9tCSxa7Rb9a2uMEalPLv154YIJBWuv/m2LkiC7fpTUtzQ/huj8SI/7NHJake34VG
BmadqQQwM32ldKm+LmlCpPjhSKQo9nFHzFpfBh3v4mTr+0fAM7AH0225fQCIFtT7czAxMCrT4eM
3YD1n0oawtgXKThl2bLGa7K9EfHcohW1/oky433i5hmfusvuV4pt6VQKwQYZcKyvl6U3OuE13NR
ZoTOTElqKDLKMvc7gXuJeMArBlTbLZAO3TBrA4xZbljTtulhwSdAmsSGgz8erEtOGQq7hTONcRL
jDLgX4kJWpEh0g8MRhVvZnDhYWZu63ezEOWWeirARVboUg0pJkkXU+jOXphr4pR+GMSKqxOHmS8
Cj9Ky9L23li2sTlJbiywgELP25r9o6b9loOxtvhYrTx7p/zOfsxt++zWwSWdHmIMQUMuT8fTbsd
Bu7MQ8gJ4wTwNcTwUJ6lOkON6cmL54jwghVJtgqZc6EGnF0iM42JbnLQvvNJm/LdCBOkKyRrQSz
nke3ng==
X-Received: by 2002:a05:622a:124b:b0:536:9140:e2be with SMTP id d75a77b69052e-55ac948cc41mr174359441cf.74.1794855858824;
Mon, 16 Nov 2026 11:04:18 -0800 (PST)
X-Received: from ziepe.ca ([142.166.156.71])
by smtp.gmail.com with ESMTPSA id d75a77b69052e-55ad1b13917sm87667361cf.29.2026.11.16.11.04.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 16 Nov 2026 11:04:17 -0800 (PST)
X-Received: from jgg by wakko with local (Exim 4.97)
(envelope-from <jgg@ziepe.ca>)
id 1xT201-0000000AFsj-03Yl;
Mon, 16 Nov 2026 15:04:17 -0400
X-Cc: Leon Romanovsky <leon@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Johannes Berg <johannes@sipsolutions.net>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Bjorn Helgaas <bhelgaas@google.com>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Vasant Hegde <vasant.hegde@amd.com>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
David Woodhouse <dwmw2@infradead.org>,
Lu Baolu <baolu.lu@linux.intel.com>,
Johan Hovold <johan@kernel.org>, Eric Dumazet <edumazet@kernel.org>,
Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Nipun Gupta <nipun.gupta@amd.com>,
Nikhil Agarwal <nikhil.agarwal@amd.com>,
Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev,
linux-input@vger.kernel.org, netdev@vger.kernel.org,
linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org,
linux-bluetooth@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-doc@vger.kernel.org, linux-pci@vger.kernel.org,
iommu@lists.linux.dev
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <193e4130-9c2f-4a0f-b218-f5fcf0b3d508@linux.microsoft.com>