[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/46] hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before ac
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 23/46] hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it |
Date: |
Thu, 19 Oct 2023 23:17:48 +0200 |
qbus_new() should not be called on unrealized device.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20231019131647.19690-2-philmd@linaro.org>
---
hw/ppc/spapr_vio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 9d4fec2c04..f8ef2b6fa8 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -574,13 +574,14 @@ SpaprVioBus *spapr_vio_bus_init(void)
/* Create bridge device */
dev = qdev_new(TYPE_SPAPR_VIO_BRIDGE);
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
/* Create bus on bridge device */
qbus = qbus_new(TYPE_SPAPR_VIO_BUS, dev, "spapr-vio");
bus = SPAPR_VIO_BUS(qbus);
bus->next_reg = SPAPR_VIO_REG_BASE;
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+
/* hcall-vio */
spapr_register_hypercall(H_VIO_SIGNAL, h_vio_signal);
--
2.41.0
- [PULL 13/46] hw/misc/mips_itu: Declare itc_reconfigure() in 'hw/misc/mips_itu.h', (continued)
- [PULL 13/46] hw/misc/mips_itu: Declare itc_reconfigure() in 'hw/misc/mips_itu.h', Philippe Mathieu-Daudé, 2023/10/19
- [PULL 14/46] hw/misc/mips_itu: Make MIPSITUState target agnostic, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 15/46] hw/pci-host/sh_pcic: Declare CPU QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 16/46] hw/pci-host/sh_pcic: Correct PCI host / devfn#0 function names, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 17/46] hw/pci-host/sh_pcic: Replace magic value by proper definition, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 18/46] hw/sparc64/ebus: Access memory regions via pci_address_space_io(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 19/46] hw/acpi/pcihp: Clean up global variable shadowing in acpi_pcihp_init(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 20/46] hw/pci: Clean up global variable shadowing of address_space_io variable, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 21/46] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 22/46] hw/intc/apic: Use ERRP_GUARD() in apic_common_realize(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 23/46] hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it,
Philippe Mathieu-Daudé <=
- [PULL 24/46] hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv_xscom_init(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 25/46] hw/ppc/pnv_xscom: Move sysbus_mmio_map() call within pnv_xscom_init(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 26/46] hw/ppc/pnv_xscom: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 27/46] hw/ppc/pnv: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 28/46] hw/intc/spapr_xive: Move sysbus_init_mmio() calls around, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 29/46] hw/intc/spapr_xive: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 30/46] hw/audio/pcspk: Inline pcspk_init(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 31/46] hw/i386/amd_iommu: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 32/46] hw/i386/intel_iommu: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 33/46] hw/misc/allwinner-dramc: Move sysbus_mmio_map call from init -> realize, Philippe Mathieu-Daudé, 2023/10/19