From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 1/1] fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs
Date: Thu, 15 May 2025 15:00:34 +0200 [thread overview]
Message-ID: <20250515130034.2889104-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20250515130034.2889104-1-d.csapak@proxmox.com>
when creating or cleaning up NVIDIA vGPUs, we mistakenly assumed a
PCI domain of 0000, but this might be different.
Use 'normalize_pci_id' from PVE::SysFSTools, which handles this already
correctly.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
depends on the pve-common patch
PVE/QemuServer.pm | 2 +-
PVE/QemuServer/PCI.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 577959a4..7f937a38 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6131,7 +6131,7 @@ sub cleanup_pci_devices {
my $reservations = PVE::QemuServer::PCI::get_reservations($vmid);
# clean up nvidia devices
for my $id ($reservations->@*) {
- $id = '0000:'.$id if $id !~ m/^0000:/;
+ $id = PVE::SysFSTools::normalize_pci_id($id);
my $create_path = "/sys/bus/pci/devices/$id/nvidia/current_vgpu_type";
diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm
index afb60ad2..5e74bed3 100644
--- a/PVE/QemuServer/PCI.pm
+++ b/PVE/QemuServer/PCI.pm
@@ -528,7 +528,7 @@ sub parse_hostpci_devices {
my sub create_nvidia_device {
my ($id, $model) = @_;
- $id = '0000:'.$id if $id !~ m/^0000:/;
+ $id = PVE::SysFSTools::normalize_pci_id($id);
my $creation = "/sys/bus/pci/devices/$id/nvidia/current_vgpu_type";
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-15 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 13:00 [pve-devel] [PATCH common/qemu-server 0/2] fix #6400: allow pci domains other " Dominik Csapak
2025-05-15 13:00 ` [pve-devel] [PATCH common 1/1] sysfstools: make normalize_pci_id public Dominik Csapak
2025-05-15 13:00 ` Dominik Csapak [this message]
2025-07-04 6:20 ` [pve-devel] superseded: [PATCH common/qemu-server 0/2] fix #6400: allow pci domains other than 0000 for NVIDIA vGPUs Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250515130034.2889104-3-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.