Skip to content

: Introduce the RunState type

Luiz Capitulino qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 3 repliesIn review
  2. v49 patches 4 repliesSuperseded
  3. v38 patches 7 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v28 patches5 repliesSuperseded
v17 patches23 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Move vm_state_notify() prototype from cpus.h to sysemu.hcpus.h sysemu.h+1 -10 replies
2/9Replace the VMSTOP macros with a proper state typeaudio/audio.c cpus.c gdbstub.c +21 more+88 -740 replies
3/9RunState: Add additional statescpus.c migration.c sysemu.h +1 more+36 -20 replies
4/9runstate_set(): Check for valid transitionssysemu.h vl.c+74 -13 replies
5/9Drop the incoming_expected global variablemigration.c monitor.c vl.c+1 -50 replies
6/9Drop the vm_running global variablecpus.c gdbstub.c hw/etraxfs_dma.c +11 more+29 -270 replies
7/9Monitor/QMP: Don't allow cont on bad VM statemonitor.c qerror.c qerror.h +1 more+16 -00 replies
8/9QMP: query-status: Introduce 'status' keymonitor.c qmp-commands.hx sysemu.h +1 more+43 -30 replies
9/9HMP: info status: Print the VM statemonitor.c+6 -00 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [Qemu-devel] [PATCH v5 0/9]: Introduce the RunState type

It replaces the VMSTOP macros and allows us to drop some global variables.

Additionally, the problem with issuing 'cont' when the VM is in bad state is addressed and we make the current state available in QMP and HMP.

** IMPORTANT: patch 04/09 is a new addition, it needs careful review.

This is breaking every few days due to changes in master, let's try to review and merge it ASAP.

changelog
---------

v5

o Rebase on top of latest master
o Use the state transition table as suggested by Lluís Vilanova
o Minor reorg in the code to accommodate the new tables

v4

o Rebase on top of latest master
o Fix qemu_system_vmstop_request() to take a RunState argument
o Drop RSTATE_RESTORE_FAILED, it's not currently used
o Check for valid transitions (will abort on invalid ones)

v3

o Rebase on top of latest master
o Fix a spice VM change state handler which hasn't been converted
o Turn runstate_get() into runstate_check()
o Rename vm_is_running() to runstate_is_running()
o Other minor renames and log improvements

v2

o Rename the new type from QemuState to RunState
(also renames related functions)
o Rename the enum values to contain proper word seperation
o Redo patch 'Monitor: Don't allow cont on bad VM state' to not use a global variable
o Make the current VM state also available in HMP
o Improve some commit logs a bit

 audio/audio.c      |    2 +-
 cpus.c             |   20 +++---
 cpus.h             |    1 -
 gdbstub.c          |   34 ++++++------
 hw/etraxfs_dma.c   |    2 +-
 hw/ide/ahci.c      |    2 +-
 hw/ide/core.c      |    4 +-
 hw/ide/internal.h  |    3 +-
 hw/ide/pci.c       |    2 +-
 hw/kvmclock.c      |    5 +-
 hw/qxl.c           |    5 +-
 hw/scsi-disk.c     |    4 +-
 hw/virtio-blk.c    |    5 +-
 hw/virtio.c        |    4 +-
 hw/watchdog.c      |    2 +-
 kvm-all.c          |    2 +-
 migration.c        |   14 +++--
 monitor.c          |   22 +++++--
 qemu-timer.c       |    9 ++-
 qerror.c           |    4 +
 qerror.h           |    3 +
 qmp-commands.hx    |   19 ++++++-
 savevm.c           |    8 +-
 sysemu.h           |   42 +++++++++-----
 target-i386/kvm.c  |    4 +-
 ui/sdl.c           |    6 +-
 ui/spice-display.c |    3 +-
 ui/spice-display.h |    4 +-
 vl.c               |  156 ++++++++++++++++++++++++++++++++++++++++++++++------
 xen-all.c          |    8 ++-
 30 files changed, 290 insertions(+), 109 deletions(-)