mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
pci: show id info when pci BDF conflict
During qemu init stage, when there is pci BDF conflicts, qemu print a warning but not showing which device the BDF is occupied by. E.x: "PCI: slot 2 function 0 not available for virtio-scsi-pci, in use by virtio-scsi-pci" To facilitate user knowing the offending device and fixing it, showing the id info in the warning. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Message-Id: <20220223094435.64495-1-zhenzhong.duan@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
45d8c0520b
commit
ad003b9e68
1 changed files with 2 additions and 2 deletions
|
@ -1099,9 +1099,9 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev,
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (!pci_bus_devfn_available(bus, devfn)) {
|
} else if (!pci_bus_devfn_available(bus, devfn)) {
|
||||||
error_setg(errp, "PCI: slot %d function %d not available for %s,"
|
error_setg(errp, "PCI: slot %d function %d not available for %s,"
|
||||||
" in use by %s",
|
" in use by %s,id=%s",
|
||||||
PCI_SLOT(devfn), PCI_FUNC(devfn), name,
|
PCI_SLOT(devfn), PCI_FUNC(devfn), name,
|
||||||
bus->devices[devfn]->name);
|
bus->devices[devfn]->name, bus->devices[devfn]->qdev.id);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (dev->hotplugged &&
|
} else if (dev->hotplugged &&
|
||||||
!pci_is_vf(pci_dev) &&
|
!pci_is_vf(pci_dev) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue