Skip to content

RFC vl: Explore redesign of startup

Markus Armbruster qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11vl: Cut off the CLI with an axesoftmmu/vl.c+13 -26810 replies
2/11vl: Drop x-exit-preconfighmp-commands.hx monitor/hmp-cmds.c qapi/misc.json +1 more+19 -840 replies
3/11vl: Hardcode a QMP monitor on stdio for nowsoftmmu/vl.c+16 -00 replies
4/11vl: Hardcode a VGA device for nowsoftmmu/vl.c+3 -00 replies
5/11vl: Demonstrate (bad) CLI wrapped around QMPsoftmmu/vl.c+26 -00 replies
6/11vl: Factor qemu_until_phase() out of qemu_init()hw/core/qdev.c include/hw/qdev-core.h softmmu/vl.c+18 -40 replies
7/11vl: Implement qemu_until_phase() running from arbitrary phasesoftmmu/vl.c+18 -10 replies
8/11vl: Implement qemu_until_phase() running to arbitrary phasesoftmmu/vl.c+18 -30 replies
9/11vl: New QMP command until-phaseMAINTAINERS hw/core/machine-qmp-cmds.c hw/core/machine.c +12 more+59 -320 replies
10/11vl: Disregard lack of 'allow-preconfig': truesoftmmu/qdev-monitor.c+2 -00 replies
11/11vl: Enter main loop in phase @machine-initializedsoftmmu/vl.c+6 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RFC 00/11] vl: Explore redesign of startup

These patches are meant to back the memo "Redesign of QEMU startup & initial configuration" I just posted. Read that first, please.

My running example for initial configuration via QMP is cold plug. It works at the end of the series.

I'm taking a number of shortcuts:

* I hack up qemu-system-FOO instead of creating an alternate program. Just so I don't have to mess with Meson.

* Instead of creating QAPI/CLI infrastructure, I use QMP as CLI: each argument is interpreted as QMP command. This is certainly bad CLI, but should suffice to demonstrate things.

* Instead of feeding the CLI's QMP commands to the main loop via a quasi-monitor, I send them directly to the QMP dispatcher. Simpler, but I'm not sure that's going to work for all QMP commands we want.

* Phase advance is by explicit command @until-phase only. Carelessly named. We may want some other commands to advance the phase automatically.

* There are no safeguards. You *can* run QMP commands in phases where they crash. Data corruption is left as an exercise for the reader.

* Possibly more I can't remember right now :)

Markus Armbruster (11):
vl: Cut off the CLI with an axe
vl: Drop x-exit-preconfig
vl: Hardcode a QMP monitor on stdio for now
vl: Hardcode a VGA device for now
vl: Demonstrate (bad) CLI wrapped around QMP
vl: Factor qemu_until_phase() out of qemu_init()
vl: Implement qemu_until_phase() running from arbitrary phase
vl: Implement qemu_until_phase() running to arbitrary phase
vl: New QMP command until-phase
vl: Disregard lack of 'allow-preconfig': true
vl: Enter main loop in phase @machine-initialized

 qapi/misc.json             |   27 -
 qapi/phase.json            |   31 +
 qapi/qapi-schema.json      |    1 +
 include/hw/qdev-core.h     |   31 -
 hw/core/machine-qmp-cmds.c |    1 +
 hw/core/machine.c          |    1 +
 hw/core/qdev.c             |    7 +
 hw/pci/pci.c               |    1 +
 hw/usb/core.c              |    1 +
 hw/virtio/virtio-iommu.c   |    1 +
 monitor/hmp-cmds.c         |    8 -
 monitor/hmp.c              |    1 +
 softmmu/qdev-monitor.c     |    3 +
 softmmu/vl.c               | 2833 ++----------------------------------
 ui/console.c               |    1 +
 MAINTAINERS                |    1 +
 hmp-commands.hx            |   18 -
 qapi/meson.build           |    1 +
 18 files changed, 180 insertions(+), 2788 deletions(-)
 create mode 100644 qapi/phase.json
Signature · 1 line
2.31.1