From: Damien Hedde <damien.hedde@greensocs.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, berrange@redhat.com,
ehabkost@redhat.com, cohuck@redhat.com,
mark.burton@greensocs.com, qemu-s390x@nongnu.org,
edgari@xilinx.com, qemu-arm@nongnu.org, pbonzini@redhat.com,
philmd@redhat.com, david@gibson.dropbear.id.au
Subject: Re: [PATCH v5 00/13] Multi-phase reset mechanism
Date: Tue, 29 Oct 2019 16:53:31 +0100 [thread overview]
Message-ID: <efef625a-8162-5454-128f-489d636563a1@greensocs.com> (raw)
In-Reply-To: <20191018150630.31099-1-damien.hedde@greensocs.com>
Hi,
Does anyone has comment about the interface / patch 3 ?
Should I try to split it ?
Thanks,
Damien
On 10/18/19 5:06 PM, Damien Hedde wrote:
> Hi all,
>
> The purpose of this series is to split the current reset procedure
> into multiple phases. This will help to solve some ordering
> difficulties we have during reset. Previous version can be found here:
> https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg04359.html
>
> This series adds resettable interface and transitions base Device and
> Bus classes (sysbus subclasses are ok too). It provides new reset
> functions but does not switch anymore the old functions
> (device_reset() and qdev/qbus_reset_all()) to resettable interface.
> These functions keep the exact same behavior as before.
>
> The series also transition the main reset handlers registration which
> has no impact until devices and buses are transitioned.
>
> I think this version is way better regarding the transition from the
> legacy to the resettable interface than the previous one.
> After this series, the plan is then to transition devices, buses and
> legacy reset call sites. Devices and buses have to be transitioned
> from mother class to daughter classes order but until the final
> (daughter) class is transitioned, old monolitic reset behavior will
> be kept for this class.
>
> Changes v4 -> v5:
> + various improvement in the resettable interface (regarding
> transition, robustness and several reset types)
> + better handling of transition from legacy reset to resettable
> + device hotplug and parent bus 'hot' change support
> + improved doc with examples and converted to rst format
>
> Regarding the Resettable interface changes and how to handle more
> reset types, please read patch 3 message.
>
> The series is organized as follows:
> Patch 1 is unmodified. Patch 2 adds some utility trace events.
> Patches 3 to 8 adds resettable api in devices and buses. Patch 9 adds
> some documentation. Patches 10 and 11 transition the call sites of
> qemu_register_reset(qdev/qbus_reset_all_fn, ...).
>
> Apart from patch 7 about hotplug which is really a rfc. I think other
> patches are in pretty good shape.
> Patch 3 and 4 are quite big but I don't think it make much sense to
> split them. I could give it a try if you think it will ease reviews.
> Note that depending on what name we choose for device/bus reset
> functions (see patch 8), we may finally don't need patch 1.
>
> I've also added patches 12 and 13 which handle the raspi sd card
> reparenting. I'm not sure they fit well in this series but at some
> point in this development I thought they had to be before patch 9
> (finally it is not the case). Since I had to develop some specific
> resettable support just for this case , I kept them as an example
> of what transition a device is. Note that patch 13 handle the only
> reset parent change (tricky) case I found (apart from hotplug).
>
> Thanks for your feedback,
> Damien
>
> Damien Hedde (13):
> add device_legacy_reset function to prepare for reset api change
> hw/core/qdev: add trace events to help with resettable transition
> hw/core: create Resettable QOM interface
> hw/core: add Resettable support to BusClass and DeviceClass
> hw/core/resettable: add support for changing parent
> hw/core/qdev: handle parent bus change regarding resettable
> hw/core/qdev: update hotplug reset regarding resettable
> hw/core: deprecate old reset functions and introduce new ones
> docs/devel/reset.txt: add doc about Resettable interface
> vl: replace deprecated qbus_reset_all registration
> hw/s390x/ipl: replace deprecated qdev_reset_all registration
> hw/gpio/bcm2835_gpio: Isolate sdbus reparenting
> hw/gpio/bcm2835_gpio: Update to resettable
>
> Makefile.objs | 1 +
> docs/devel/reset.rst | 282 ++++++++++++++++++++++++++++++++++++++
> hw/audio/intel-hda.c | 2 +-
> hw/core/Makefile.objs | 1 +
> hw/core/bus.c | 102 ++++++++++++++
> hw/core/qdev.c | 156 +++++++++++++++++++--
> hw/core/resettable.c | 289 +++++++++++++++++++++++++++++++++++++++
> hw/core/trace-events | 27 ++++
> hw/gpio/bcm2835_gpio.c | 31 +++--
> hw/hyperv/hyperv.c | 2 +-
> hw/i386/pc.c | 2 +-
> hw/ide/microdrive.c | 8 +-
> hw/intc/spapr_xive.c | 2 +-
> hw/ppc/pnv_psi.c | 2 +-
> hw/ppc/spapr_pci.c | 2 +-
> hw/ppc/spapr_vio.c | 2 +-
> hw/s390x/ipl.c | 10 +-
> hw/s390x/s390-pci-inst.c | 2 +-
> hw/scsi/vmw_pvscsi.c | 2 +-
> hw/sd/omap_mmc.c | 2 +-
> hw/sd/pl181.c | 2 +-
> include/hw/qdev-core.h | 58 +++++++-
> include/hw/resettable.h | 224 ++++++++++++++++++++++++++++++
> tests/Makefile.include | 1 +
> vl.c | 10 +-
> 25 files changed, 1185 insertions(+), 37 deletions(-)
> create mode 100644 docs/devel/reset.rst
> create mode 100644 hw/core/resettable.c
> create mode 100644 include/hw/resettable.h
>
next prev parent reply other threads:[~2019-10-29 15:56 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é
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 [this message]
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=efef625a-8162-5454-128f-489d636563a1@greensocs.com \
--to=damien.hedde@greensocs.com \
--cc=berrange@redhat.com \
--cc=cohuck@redhat.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=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/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).