mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()
The loop over nd_table[] to add PCI NICs is repeated in quite a few places. Add a helper function to do it. Some platforms also try to instantiate a specific model in a specific slot, to match the real hardware. Add pci_init_nic_in_slot() for that purpose. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org>
This commit is contained in:
parent
93125e4b4f
commit
1785ae69ea
2 changed files with 48 additions and 1 deletions
|
@ -317,7 +317,9 @@ void pci_device_reset(PCIDevice *dev);
|
|||
PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,
|
||||
const char *default_model,
|
||||
const char *default_devaddr);
|
||||
|
||||
void pci_init_nic_devices(PCIBus *bus, const char *default_model);
|
||||
bool pci_init_nic_in_slot(PCIBus *rootbus, const char *default_model,
|
||||
const char *alias, const char *devaddr);
|
||||
PCIDevice *pci_vga_init(PCIBus *bus);
|
||||
|
||||
static inline PCIBus *pci_get_bus(const PCIDevice *dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue