diff mbox series

[02/11] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 southbridge

Message ID 20220713081735.112016-3-shentey@gmail.com (mailing list archive)
State New, archived
Headers show
Series QOM'ify PIIX3 southbridge | expand

Commit Message

Bernhard Beschow July 13, 2022, 8:17 a.m. UTC
The next patches will need to take advantage of it.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 hw/i386/pc_piix.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Peter Maydell July 14, 2022, 2:59 p.m. UTC | #1
On Wed, 13 Jul 2022 at 09:36, Bernhard Beschow <shentey@gmail.com> wrote:
>
> 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>

thanks
-- PMM
diff mbox series

Patch

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 7ad677e967..f129da29ac 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -209,7 +209,8 @@  static void pc_init1(MachineState *machine,
                               pci_memory, ram_memory);
         pcms->bus = pci_bus;
 
-        pci_dev = pci_create_simple_multifunction(pci_bus, -1, true, type);
+        pci_dev = pci_new_multifunction(-1, true, type);
+        pci_realize_and_unref(pci_dev, pci_bus, &error_fatal);
         piix3 = PIIX3_PCI_DEVICE(pci_dev);
         piix3->pic = x86ms->gsi;
         piix3_devfn = piix3->dev.devfn;