Philippe Mathieu-Daudé <phi...@redhat.com> writes: > To be able to set a property on the ISA-IDE bridges objects > before they are realized, explode the pci_create_simple() > calls as pci_new() + pci_realize_and_unref(). > > Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> > --- > hw/i386/pc_piix.c | 5 +++-- > hw/isa/piix4.c | 3 ++- > hw/mips/fuloong2e.c | 3 ++- > hw/ppc/pegasos2.c | 3 ++- > 4 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > index 30b8bd6ea92..fb606c14768 100644 > --- a/hw/i386/pc_piix.c > +++ b/hw/i386/pc_piix.c > @@ -244,8 +244,9 @@ static void pc_init1(MachineState *machine, > if (pcmc->pci_enabled) { > PCIDevice *dev; > > - dev = pci_create_simple(pci_bus, piix3_devfn + 1, > - xen_enabled() ? "piix3-ide-xen" : > "piix3-ide"); > + dev = pci_new(piix3_devfn + 1, > + xen_enabled() ? "piix3-ide-xen" : "piix3-ide"); > + pci_realize_and_unref(dev, pci_bus, &error_abort); > pci_ide_create_devs(dev); > idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0"); > idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
This replaces pci_create_simple()'s &error_fatal by &error_abort. Intentional? If yes, the commit message should briefly explain why errors are not expected to happen. Same for the other hunks. [...]