pci related code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-10-11 08:39:28 +02:00
parent e2b42bee6d
commit 71cb8e0f87
2 changed files with 2 additions and 7 deletions

View File

@ -5385,11 +5385,8 @@ sub vm_start_nolock {
for (my $i = 0; $i < $PVE::QemuServer::PCI::MAX_HOSTPCI_DEVICES; $i++) {
my $d = parse_hostpci($conf->{"hostpci$i"});
next if !$d;
my $pcidevices = $d->{pciid};
foreach my $pcidevice (@$pcidevices) {
my $pciid = $pcidevice->{id};
PVE::QemuServer::PCI::prepare_pci_device($vmid, $pciid, $i, $d->{mdev});
for my $pcidevice ($d->{pciid}->@*) {
PVE::QemuServer::PCI::prepare_pci_device($vmid, $pcidevice->{id}, $i, $d->{mdev});
}
}

View File

@ -482,8 +482,6 @@ sub prepare_pci_device {
die "can't reset PCI device '$pciid'\n"
if $info->{has_fl_reset} && !PVE::SysFSTools::pci_dev_reset($info);
}
return;
}
1;