* [pve-devel] [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other than 0000 for NVIDIA vGPUs
@ 2025-07-04 6:18 Dominik Csapak
2025-07-04 6:18 ` [pve-devel] [PATCH common v2 1/1] sysfstools: make normalize_pci_id public Dominik Csapak
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-07-04 6:18 UTC (permalink / raw)
To: pve-devel
by reusing the normalization of pci ids from SysFSTools
qemu-server patch depends on a pve-common patch
patches are developed on master, but should (currently) apply cleanly on
stable-bookworm too (or could be cherry-picked)
changes from v1:
* rebase on master (indent change)
pve-common:
Dominik Csapak (1):
sysfstools: make normalize_pci_id public
src/PVE/SysFSTools.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
qemu-server:
Dominik Csapak (1):
fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs
src/PVE/QemuServer.pm | 2 +-
src/PVE/QemuServer/PCI.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Summary over all repositories:
3 files changed, 4 insertions(+), 3 deletions(-)
--
Generated by git-murpp 0.8.1
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH common v2 1/1] sysfstools: make normalize_pci_id public
2025-07-04 6:18 [pve-devel] [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other than 0000 for NVIDIA vGPUs Dominik Csapak
@ 2025-07-04 6:18 ` Dominik Csapak
2025-07-04 6:18 ` [pve-devel] [PATCH qemu-server v2 1/1] fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs Dominik Csapak
2025-07-10 11:24 ` [pve-devel] applied-series: [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-07-04 6:18 UTC (permalink / raw)
To: pve-devel
so that we can use it from other modules/packages, such as qemu-server
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/PVE/SysFSTools.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/SysFSTools.pm b/src/PVE/SysFSTools.pm
index 9d87f82..a00fbcb 100644
--- a/src/PVE/SysFSTools.pm
+++ b/src/PVE/SysFSTools.pm
@@ -34,7 +34,8 @@ my $parse_pci_ids = sub {
return $ids;
};
-my sub normalize_pci_id {
+# normalizes pci ids so that they're always the full id such as '0000:01:00.0'
+sub normalize_pci_id {
my ($id) = @_;
$id = "0000:$id" if $id !~ m/^${domainregex}:/;
return $id;
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH qemu-server v2 1/1] fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs
2025-07-04 6:18 [pve-devel] [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other than 0000 for NVIDIA vGPUs Dominik Csapak
2025-07-04 6:18 ` [pve-devel] [PATCH common v2 1/1] sysfstools: make normalize_pci_id public Dominik Csapak
@ 2025-07-04 6:18 ` Dominik Csapak
2025-07-10 11:24 ` [pve-devel] applied-series: [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-07-04 6:18 UTC (permalink / raw)
To: pve-devel
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>
---
src/PVE/QemuServer.pm | 2 +-
src/PVE/QemuServer/PCI.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 92c8fad6..d36fd1d0 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -5882,7 +5882,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/src/PVE/QemuServer/PCI.pm b/src/PVE/QemuServer/PCI.pm
index ddf2f028..b713f532 100644
--- a/src/PVE/QemuServer/PCI.pm
+++ b/src/PVE/QemuServer/PCI.pm
@@ -540,7 +540,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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied-series: [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other than 0000 for NVIDIA vGPUs
2025-07-04 6:18 [pve-devel] [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other than 0000 for NVIDIA vGPUs Dominik Csapak
2025-07-04 6:18 ` [pve-devel] [PATCH common v2 1/1] sysfstools: make normalize_pci_id public Dominik Csapak
2025-07-04 6:18 ` [pve-devel] [PATCH qemu-server v2 1/1] fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs Dominik Csapak
@ 2025-07-10 11:24 ` Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-07-10 11:24 UTC (permalink / raw)
To: pve-devel, Dominik Csapak
On Fri, 04 Jul 2025 08:18:50 +0200, Dominik Csapak wrote:
> by reusing the normalization of pci ids from SysFSTools
>
> qemu-server patch depends on a pve-common patch
>
> patches are developed on master, but should (currently) apply cleanly on
> stable-bookworm too (or could be cherry-picked)
>
> [...]
Applied, thanks!
[1/1] fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs
commit: 6c0cce85acabbf5808f3218eebc1a7599bcea8ba
[1/1] sysfstools: make normalize_pci_id public
(no commit info)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-10 11:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-04 6:18 [pve-devel] [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other than 0000 for NVIDIA vGPUs Dominik Csapak
2025-07-04 6:18 ` [pve-devel] [PATCH common v2 1/1] sysfstools: make normalize_pci_id public Dominik Csapak
2025-07-04 6:18 ` [pve-devel] [PATCH qemu-server v2 1/1] fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs Dominik Csapak
2025-07-10 11:24 ` [pve-devel] applied-series: [PATCH common/qemu-server v2 0/2] fix #6400: allow pci domains other " Thomas Lamprecht
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.