From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 3B24D1FF13C for ; Thu, 19 Mar 2026 12:23:42 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D8BB81BCD4; Thu, 19 Mar 2026 12:23:56 +0100 (CET) Content-Type: text/plain; charset=UTF-8 Date: Thu, 19 Mar 2026 12:23:22 +0100 Message-Id: Subject: Re: [PATCH qemu-server 2/2] pci: mdev: use PVE::RS::NVML for nvidia mdev information From: "Christoph Heiss" To: "Dominik Csapak" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: aerc 0.21.0 References: <20260305091711.1221589-1-d.csapak@proxmox.com> <20260305091711.1221589-12-d.csapak@proxmox.com> In-Reply-To: <20260305091711.1221589-12-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773919359767 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.053 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: TYQPAOIX45VX5ZMTMQ7YKH44HNFQ5IP2 X-Message-ID-Hash: TYQPAOIX45VX5ZMTMQ7YKH44HNFQ5IP2 X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: One tiny nit inline (could also be fixed while applying), other than that please consider it: Reviewed-by: Christoph Heiss On Thu Mar 5, 2026 at 10:16 AM CET, Dominik Csapak wrote: > This gets us the missing description that used to be in sysfs. > > In case this is an SR-IOV virtual function, we have to get the physical > device first since only that is a valid device for querying with NVML. > > 'pci_dev_physfn_id' is only used here currently so it's a local sub, but > if we need it in more places, a good place could be 'PVE::SysFSTools' or > 'PVE::QemuServer::PCI'. > > Signed-off-by: Dominik Csapak > --- > src/PVE/QemuServer/PCI/Mdev.pm | 45 ++++++++++++++++++++++++---------- > 1 file changed, 32 insertions(+), 13 deletions(-) > > diff --git a/src/PVE/QemuServer/PCI/Mdev.pm b/src/PVE/QemuServer/PCI/Mdev= .pm > index 3b42ce2d..51dca474 100644 > --- a/src/PVE/QemuServer/PCI/Mdev.pm > +++ b/src/PVE/QemuServer/PCI/Mdev.pm > @@ -2,11 +2,28 @@ package PVE::QemuServer::PCI::Mdev; > > use v5.36; > > +use File::Basename; > + > +use PVE::RS::NVML; Nit: Needs the dependency entry on libpve-rs-perl in d/control recorded.