X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=blobdiff_plain;f=PVE%2FQemuServer.pm;h=6267cae09538413f2b014c8a80d94e9c508e5da3;hp=76146ca22f43d5ae31e60d9aa77d02d53f8625cd;hb=844b55fb8968f05efb1520fdf90b8b03ca485458;hpb=0360faadc70332ea060d67fe02e515ed078049f4 diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 76146ca..6267cae 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2246,13 +2246,11 @@ sub parse_hostpci { my @idlist = split(/;/, $res->{host}); delete $res->{host}; foreach my $id (@idlist) { - if ($id =~ m/\./) { # full id 00:00.1 - push @{$res->{pciid}}, { - id => $id, - }; - } else { # partial id 00:00 - $res->{pciid} = PVE::SysFSTools::lspci($id); + my $devs = PVE::SysFSTools::lspci($id); + if (!scalar(@$devs)) { + die "no pci device found for '$id'\n"; } + push @{$res->{pciid}}, @$devs; } return $res; } @@ -5369,7 +5367,6 @@ sub vm_start { my $pcidevices = $d->{pciid}; foreach my $pcidevice (@$pcidevices) { my $pciid = $pcidevice->{id}; - $pciid = "0000:$pciid" if $pciid !~ m/^[0-9a-f]{4}:/; my $info = PVE::SysFSTools::pci_device_info("$pciid"); die "IOMMU not present\n" if !PVE::SysFSTools::check_iommu_support();