Implement this get_primary_pci_bus() which returns the root bus. Signed-off-by: Eric Auger <eric.au...@redhat.com> --- hw/i386/pc.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 55686bf..00f4623 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -2337,6 +2337,13 @@ static void x86_nmi(NMIState *n, int cpu_index, Error **errp) } } +static PCIBus *pc_machine_get_primary_pci_bus(const MachineState *ms) +{ + PCMachineState *pcms = PC_MACHINE(ms); + + return pcms->bus; +} + static void pc_machine_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); @@ -2376,6 +2383,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) hc->unplug = pc_machine_device_unplug_cb; nc->nmi_monitor_handler = x86_nmi; mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE; + mc->get_primary_pci_bus = pc_machine_get_primary_pci_bus; object_class_property_add(oc, PC_MACHINE_MEMHP_REGION_SIZE, "int", pc_machine_get_hotplug_memory_region_size, NULL, -- 1.9.1