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.csa...@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to