[pve-devel] [PATCH qemu-server v3 02/13] PCI: make mediated device path independent of pci id
Dominik Csapak
d.csapak at proxmox.com
Tue Sep 20 14:50:17 CEST 2022
mdevs must have a host-unique uuid, and they appear in
/sys/bus/mdev/devices/<uuid>, so there is no need to reference the pciid
with it
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/QemuServer/PCI.pm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm
index 788ab2a..1b82aca 100644
--- a/PVE/QemuServer/PCI.pm
+++ b/PVE/QemuServer/PCI.pm
@@ -459,9 +459,8 @@ sub print_hostpci_devices {
my $sysfspath;
if ($d->{mdev} && scalar(@$pcidevices) == 1) {
- my $pci_id = $pcidevices->[0]->{id};
my $uuid = generate_mdev_uuid($vmid, $i);
- $sysfspath = "/sys/bus/pci/devices/$pci_id/$uuid";
+ $sysfspath = "/sys/bus/mdev/devices/$uuid";
} elsif ($d->{mdev}) {
warn "ignoring mediated device '$id' with multifunction device\n";
}
--
2.30.2
More information about the pve-devel
mailing list