mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: make qemuComparePCIDevice aware of multiple buses
Bus and domain need to be checked as well, otherwise we might get false positives when searching for multi-function devices.
This commit is contained in:
parent
bcefb50792
commit
8e5928de98
@ -1999,7 +1999,9 @@ static int qemuComparePCIDevice(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
|||||||
info2->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
|
info2->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (info1->addr.pci.slot == info2->addr.pci.slot &&
|
if (info1->addr.pci.domain == info2->addr.pci.domain &&
|
||||||
|
info1->addr.pci.bus == info2->addr.pci.bus &&
|
||||||
|
info1->addr.pci.slot == info2->addr.pci.slot &&
|
||||||
info1->addr.pci.function != info2->addr.pci.function)
|
info1->addr.pci.function != info2->addr.pci.function)
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user