qemu-devel
[Top][All Lists]
Advanced

[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.

[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]