From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org,
"Richard Henderson" <richard.henderson@linaro.org>,
"Frédéric Barrat" <fbarrat@linux.ibm.com>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Cédric Le Goater" <clg@kaod.org>,
"LIU Zhiwei" <zhiwei_liu@linux.alibaba.com>,
"Daniel Henrique Barboza" <danielhb413@gmail.com>
Subject: Re: [PATCH v2 1/7] hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it
Date: Thu, 19 Oct 2023 17:41:23 +0200 [thread overview]
Message-ID: <769ff32b-779e-4460-966f-00d7343ee8cb@redhat.com> (raw)
In-Reply-To: <20231019131305.19157-2-philmd@linaro.org>
On 19/10/2023 15.12, Philippe Mathieu-Daudé wrote:
> qbus_new() should not be called on unrealized device.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/ppc/spapr_vio.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
> index 9d4fec2c04..f8ef2b6fa8 100644
> --- a/hw/ppc/spapr_vio.c
> +++ b/hw/ppc/spapr_vio.c
> @@ -574,13 +574,14 @@ SpaprVioBus *spapr_vio_bus_init(void)
>
> /* Create bridge device */
> dev = qdev_new(TYPE_SPAPR_VIO_BRIDGE);
> - sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>
> /* Create bus on bridge device */
> qbus = qbus_new(TYPE_SPAPR_VIO_BUS, dev, "spapr-vio");
> bus = SPAPR_VIO_BUS(qbus);
> bus->next_reg = SPAPR_VIO_REG_BASE;
>
> + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
> +
> /* hcall-vio */
> spapr_register_hypercall(H_VIO_SIGNAL, h_vio_signal);
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2023-10-19 15:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 13:12 [PATCH v2 0/7] hw/ppc: SysBus simplifications Philippe Mathieu-Daudé
2023-10-19 13:12 ` [PATCH v2 1/7] hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it Philippe Mathieu-Daudé
2023-10-19 15:41 ` Thomas Huth [this message]
2023-10-19 13:13 ` [PATCH v2 2/7] hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv_xscom_init() Philippe Mathieu-Daudé
2023-10-19 13:13 ` [PATCH v2 3/7] hw/ppc/pnv_xscom: Move sysbus_mmio_map() call within pnv_xscom_init() Philippe Mathieu-Daudé
2023-10-19 13:13 ` [PATCH v2 4/7] hw/ppc/pnv_xscom: Do not use SysBus API to map local MMIO region Philippe Mathieu-Daudé
2023-10-19 13:13 ` [PATCH v2 5/7] hw/ppc/pnv: " Philippe Mathieu-Daudé
2023-10-19 13:13 ` [PATCH v2 6/7] hw/intc/spapr_xive: Move sysbus_init_mmio() calls around Philippe Mathieu-Daudé
2023-10-19 13:13 ` [PATCH v2 7/7] hw/intc/spapr_xive: Do not use SysBus API to map local MMIO region Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=769ff32b-779e-4460-966f-00d7343ee8cb@redhat.com \
--to=thuth@redhat.com \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=fbarrat@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).