[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 01/11] hw/isa: Explode pci_create_simple() calls
From: |
Markus Armbruster |
Subject: |
Re: [RFC PATCH 01/11] hw/isa: Explode pci_create_simple() calls |
Date: |
Fri, 21 May 2021 09:09:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Philippe Mathieu-Daudé <philmd@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é <philmd@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.
[...]
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, (continued)
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, BALATON Zoltan, 2021/05/18
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, John Snow, 2021/05/19
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, BALATON Zoltan, 2021/05/19
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, Stefan Hajnoczi, 2021/05/20
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, Mark Cave-Ayland, 2021/05/20
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, BALATON Zoltan, 2021/05/20
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, Mark Cave-Ayland, 2021/05/20
- Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, Mark Cave-Ayland, 2021/05/20
[RFC PATCH 03/11] hw/ide/piix: Set the ISA-bus QOM link, Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 01/11] hw/isa: Explode pci_create_simple() calls, Philippe Mathieu-Daudé, 2021/05/18
- Re: [RFC PATCH 01/11] hw/isa: Explode pci_create_simple() calls,
Markus Armbruster <=
[RFC PATCH 04/11] hw/ide/via: Set the ISA-bus QOM link, Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 05/11] hw/isa: Extract isa_bus_get_irq() from isa_get_irq(), Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 06/11] hw/ide: Replace isa_get_irq() by isa_bus_get_irq(), Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 07/11] hw/isa: Simplify isa_get_irq(), Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 09/11] hw/ide: Let ide_init_ioport() take an ISA bus argument instead of device, Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 08/11] hw/isa: Extract bus part from isa_register_portio_list(), Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 10/11] hw/isa: Remove use of global isa bus, Philippe Mathieu-Daudé, 2021/05/18
[RFC PATCH 11/11] hw/isa: Rename isabus singleton as 'g_isabus', Philippe Mathieu-Daudé, 2021/05/18