mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-04 20:13:52 +00:00
QemuServer: fix wrong binding of pci root ports, bridges or switches to vfio
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
This commit is contained in:
parent
515c82a9b7
commit
f8fa2ed734
@ -4600,6 +4600,11 @@ sub pci_dev_group_bind_to_vfio {
|
|||||||
|
|
||||||
foreach my $pciid (@devs) {
|
foreach my $pciid (@devs) {
|
||||||
$pciid =~ m/^([:\.\da-f]+)$/ or die "PCI ID $pciid not valid!\n";
|
$pciid =~ m/^([:\.\da-f]+)$/ or die "PCI ID $pciid not valid!\n";
|
||||||
|
|
||||||
|
# pci bridges, switches or root ports are not supported
|
||||||
|
# they have a pci_bus subdirectory so skip them
|
||||||
|
next if (-e "$pcisysfs/devices/$pciid/pci_bus");
|
||||||
|
|
||||||
my $info = pci_device_info($1);
|
my $info = pci_device_info($1);
|
||||||
pci_dev_bind_to_vfio($info) || die "Cannot bind $pciid to vfio\n";
|
pci_dev_bind_to_vfio($info) || die "Cannot bind $pciid to vfio\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user