From a3139f90dc8e02beefe885520ff3f5cbc0d29b0b Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 24 Aug 2016 09:55:49 +0200 Subject: [PATCH] hostpci: bring back multifunction pass-through shortcut --- PVE/QemuServer.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 46f8fdcc..af8a15c7 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -1674,7 +1674,12 @@ sub parse_hostpci { delete $res->{host}; foreach my $id (@idlist) { if ($id =~ /^$PCIRE$/) { - push @{$res->{pciid}}, { id => $1, function => ($2//'0') }; + if (defined($2)) { + push @{$res->{pciid}}, { id => $1, function => $2 }; + } else { + my $pcidevices = lspci($1); + $res->{pciid} = $pcidevices->{$1}; + } } else { # should have been caught by parse_property_string already die "failed to parse PCI id: $id\n";