From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Damien Hedde <damien.hedde@greensocs.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Thomas Huth <thuth@redhat.com>,
berrange@redhat.com, ehabkost@redhat.com, cohuck@redhat.com,
mark.burton@greensocs.com, qemu-s390x@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
edgari@xilinx.com, qemu-arm@nongnu.org, pbonzini@redhat.com,
david@gibson.dropbear.id.au
Subject: Re: [PATCH v5 11/13] hw/s390x/ipl: replace deprecated qdev_reset_all registration
Date: Fri, 1 Nov 2019 00:38:26 +0100 [thread overview]
Message-ID: <29cfdbcc-3e83-a980-f753-dae8549e5853@redhat.com> (raw)
In-Reply-To: <20191018150630.31099-12-damien.hedde@greensocs.com>
On 10/18/19 5:06 PM, Damien Hedde wrote:
> Replace deprecated qdev_reset_all by resettable_cold_reset_fn for
> the ipl registration in the main reset handlers.
>
> This does not impact the behavior for the following reasons:
> + at this point resettable just call the old reset methods of devices
> and buses in the same order than qdev/qbus.
> + resettable handlers registered with qemu_register_reset are
> serialized; there is no interleaving.
> + eventual explicit calls to legacy reset API (device_reset or
> qdev/qbus_reset) inside this reset handler will not be masked out
> by resettable mechanism; they do not go through resettable api.
>
> Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
> ---
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: qemu-s390x@nongnu.org
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Thomas Huth <thuth@redhat.com>
> ---
> hw/s390x/ipl.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> index ca544d64c5..2689f7a017 100644
> --- a/hw/s390x/ipl.c
> +++ b/hw/s390x/ipl.c
> @@ -237,7 +237,15 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
> */
> ipl->compat_start_addr = ipl->start_addr;
> ipl->compat_bios_start_addr = ipl->bios_start_addr;
> - qemu_register_reset(qdev_reset_all_fn, dev);
> + /*
> + * Because this Device is not on any bus in the qbus tree (it is
> + * not a sysbus device and it's not on some other bus like a PCI
> + * bus) it will not be automatically reset by the 'reset the
> + * sysbus' hook registered by vl.c like most devices. So we must
> + * manually register a reset hook for it.
:)
> + * TODO: there should be a better way to do this.
:(
> + */
> + qemu_register_reset(resettable_cold_reset_fn, dev);
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> error:
> error_propagate(errp, err);
> }
>
next prev parent reply other threads:[~2019-10-31 23:40 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 15:06 [PATCH v5 00/13] Multi-phase reset mechanism Damien Hedde
2019-10-18 15:06 ` [PATCH v5 01/13] add device_legacy_reset function to prepare for reset api change Damien Hedde
2019-10-19 17:35 ` Richard Henderson
2019-12-03 10:55 ` Cornelia Huck
2019-10-18 15:06 ` [PATCH v5 02/13] hw/core/qdev: add trace events to help with resettable transition Damien Hedde
2019-10-19 17:44 ` Richard Henderson
2019-10-31 23:23 ` Philippe Mathieu-Daudé
2019-11-04 12:16 ` Damien Hedde
2019-11-04 14:33 ` Philippe Mathieu-Daudé
2019-12-03 10:57 ` Cornelia Huck
2019-10-18 15:06 ` [PATCH v5 03/13] hw/core: create Resettable QOM interface Damien Hedde
2019-11-29 18:32 ` Peter Maydell
2019-12-02 11:07 ` Damien Hedde
2019-12-02 11:14 ` Peter Maydell
2019-12-03 11:16 ` Cornelia Huck
2019-10-18 15:06 ` [PATCH v5 04/13] hw/core: add Resettable support to BusClass and DeviceClass Damien Hedde
2019-10-19 18:49 ` Richard Henderson
2019-11-29 18:36 ` Peter Maydell
2019-12-02 11:38 ` Damien Hedde
2019-10-18 15:06 ` [PATCH v5 05/13] hw/core/resettable: add support for changing parent Damien Hedde
2019-11-29 18:38 ` Peter Maydell
2019-12-02 11:43 ` Damien Hedde
2019-10-18 15:06 ` [PATCH v5 06/13] hw/core/qdev: handle parent bus change regarding resettable Damien Hedde
2019-11-29 18:41 ` Peter Maydell
2019-12-03 11:37 ` Cornelia Huck
2019-10-18 15:06 ` [PATCH v5 07/13] hw/core/qdev: update hotplug reset " Damien Hedde
2019-11-08 15:14 ` Damien Hedde
2019-10-18 15:06 ` [PATCH v5 08/13] hw/core: deprecate old reset functions and introduce new ones Damien Hedde
2019-10-31 23:35 ` Philippe Mathieu-Daudé
2019-11-04 12:01 ` Damien Hedde
2019-11-04 15:42 ` Philippe Mathieu-Daudé
2019-11-29 18:42 ` Peter Maydell
2019-10-18 15:06 ` [PATCH v5 09/13] docs/devel/reset.txt: add doc about Resettable interface Damien Hedde
2019-11-29 19:00 ` Peter Maydell
2019-12-06 15:40 ` Damien Hedde
2019-12-06 16:21 ` Damien Hedde
2019-10-18 15:06 ` [PATCH v5 10/13] vl: replace deprecated qbus_reset_all registration Damien Hedde
2019-11-29 19:01 ` Peter Maydell
2019-10-18 15:06 ` [PATCH v5 11/13] hw/s390x/ipl: replace deprecated qdev_reset_all registration Damien Hedde
2019-10-31 23:38 ` Philippe Mathieu-Daudé [this message]
2019-11-29 19:02 ` Peter Maydell
2019-12-03 11:41 ` Cornelia Huck
2019-10-18 15:06 ` [PATCH v5 12/13] hw/gpio/bcm2835_gpio: Isolate sdbus reparenting Damien Hedde
2019-11-29 19:05 ` Peter Maydell
2019-12-02 12:27 ` Damien Hedde
2019-12-02 12:33 ` Peter Maydell
2019-12-02 13:05 ` Damien Hedde
2019-12-02 13:10 ` Peter Maydell
2019-10-18 15:06 ` [PATCH v5 13/13] hw/gpio/bcm2835_gpio: Update to resettable Damien Hedde
2019-11-29 19:02 ` Peter Maydell
2019-10-19 9:01 ` [PATCH v5 00/13] Multi-phase reset mechanism no-reply
2019-10-29 15:53 ` Damien Hedde
2019-11-08 15:26 ` Damien Hedde
2019-11-08 15:28 ` Peter Maydell
2019-11-08 15:58 ` Damien Hedde
2019-11-29 19:07 ` Peter Maydell
2019-12-03 11:44 ` Cornelia Huck
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=29cfdbcc-3e83-a980-f753-dae8549e5853@redhat.com \
--to=philmd@redhat.com \
--cc=berrange@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=damien.hedde@greensocs.com \
--cc=david@gibson.dropbear.id.au \
--cc=edgari@xilinx.com \
--cc=ehabkost@redhat.com \
--cc=mark.burton@greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.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).