diff mbox series

[PULL,v2,39/78] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge

Message ID 07779d2a500af6a47d8638da6f404f9f70b917e2.1697739629.git.mst@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,v2,01/78] vdpa: Use iovec for vhost_vdpa_net_cvq_add() | expand

Commit Message

Michael S. Tsirkin Oct. 19, 2023, 6:22 p.m. UTC
From: Bernhard Beschow <shentey@gmail.com>

The next patches will need to take advantage of it.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20231007123843.127151-3-shentey@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/i386/pc_piix.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e36a3262b2..6d2f5509e6 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -264,7 +264,8 @@  static void pc_init1(MachineState *machine,
         PIIX3State *piix3;
         PCIDevice *pci_dev;
 
-        pci_dev = pci_create_simple_multifunction(pci_bus, -1, TYPE_PIIX3_DEVICE);
+        pci_dev = pci_new_multifunction(-1, TYPE_PIIX3_DEVICE);
+        pci_realize_and_unref(pci_dev, pci_bus, &error_fatal);
 
         if (xen_enabled()) {
             pci_device_set_intx_routing_notifier(