Skip to content

qdev: Ensure devices are fully realized when calling DeviceReset handler

Philippe Mathieu-Daudé qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hw/sd/omap_mmc: Do not reset SDCard until being fully realizedhw/arm/omap1.c hw/arm/omap2.c hw/sd/omap_mmc.c +1 more+15 -122 replies
2/2qdev: Ensure devices are fully realized when calling DeviceReset handlerhw/core/qdev.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] qdev: Ensure devices are fully realized when calling DeviceReset handler

In the process of clarifying QOM/QDev design, we want to enforce the QDev state machine, in particular RESET can only happens *after* REALIZE.

Besides CPUs (which are still particular), the only case I noticed is in a non-QDev type (OMAP MMC) accessing a QDev one (SD/MMC card).

The first patch first handle the OMAP MMC case doing minor surgery (passing a 'realized' state to omap_mmc_reset(), the function doing reset out of normal QDev RESET tree propagation).

The second patch add an assertion in QDev core code, in order to avoid further devices being added out of (QDev) order.

Please review,

Phil.

Philippe Mathieu-Daudé (2):
hw/sd/omap_mmc: Do not reset SDCard until being fully realized
qdev: Ensure devices are fully realized when calling DeviceReset
handler

 include/hw/arm/omap.h |  2 +-
 hw/arm/omap1.c        |  2 +-
 hw/arm/omap2.c        |  2 +-
 hw/core/qdev.c        |  3 +++
 hw/sd/omap_mmc.c      | 21 ++++++++++++---------
 5 files changed, 18 insertions(+), 12 deletions(-)
Signature · 1 line
2.41.0