mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-08-02 00:21:54 +03:00
fix #6400: pci: allow other pci domains than 0000 for NVIDIA vGPUs
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>
Link: https://lore.proxmox.com/20250704061852.251189-3-d.csapak@proxmox.com
(cherry picked from commit 6c0cce85ac
)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
f6748361a5
commit
a85370076c
@ -6515,7 +6515,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";
|
||||
|
||||
|
@ -535,7 +535,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";
|
||||
|
||||
|
Reference in New Issue
Block a user