mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-05 22:17:40 -07:00
hw/pci: Add pci_bus_add_fw_cfg_extra_pci_roots() helper
pci_bus_add_fw_cfg_extra_pci_roots() calls the fw_cfg API with PCI bus specific arguments. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20241206181352.6836-5-philmd@linaro.org>
This commit is contained in:
parent
59c5eea5c7
commit
14f1f86d51
2 changed files with 19 additions and 0 deletions
16
hw/pci/pci.c
16
hw/pci/pci.c
|
|
@ -217,6 +217,22 @@ static uint16_t pcibus_numa_node(PCIBus *bus)
|
|||
return NUMA_NODE_UNASSIGNED;
|
||||
}
|
||||
|
||||
bool pci_bus_add_fw_cfg_extra_pci_roots(FWCfgState *fw_cfg,
|
||||
PCIBus *bus,
|
||||
Error **errp)
|
||||
{
|
||||
Object *obj;
|
||||
|
||||
if (!bus) {
|
||||
return true;
|
||||
}
|
||||
obj = OBJECT(bus);
|
||||
|
||||
return fw_cfg_add_file_from_generator(fw_cfg, obj->parent,
|
||||
object_get_canonical_path_component(obj),
|
||||
"etc/extra-pci-roots", errp);
|
||||
}
|
||||
|
||||
static GByteArray *pci_bus_fw_cfg_gen_data(Object *obj, Error **errp)
|
||||
{
|
||||
PCIBus *bus = PCI_BUS(obj);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue