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
This commit is contained in:
parent
343e05f0ba
commit
6c0cce85ac
2 changed files with 2 additions and 2 deletions
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue