mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 17:20:30 +00:00
hostpci: bring back multifunction pass-through shortcut
This commit is contained in:
parent
2af848a2da
commit
a3139f90dc
@ -1674,7 +1674,12 @@ sub parse_hostpci {
|
|||||||
delete $res->{host};
|
delete $res->{host};
|
||||||
foreach my $id (@idlist) {
|
foreach my $id (@idlist) {
|
||||||
if ($id =~ /^$PCIRE$/) {
|
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 {
|
} else {
|
||||||
# should have been caught by parse_property_string already
|
# should have been caught by parse_property_string already
|
||||||
die "failed to parse PCI id: $id\n";
|
die "failed to parse PCI id: $id\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user