Skip to content

Set runstate to RUN_STATE_RESTORE_VM when started with "-loadvm"

Joelle van Dyne qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Revert "usbredir: avoid queuing hello packet on snapshot restore"hw/usb/redirect.c+1 -21 reply
2/3vl: on -loadvm set run state to "restore-vm"softmmu/runstate.c softmmu/vl.c+4 -02 replies
3/3usbredir: avoid queuing hello packet on snapshot restorehw/usb/redirect.c+2 -15 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJán Tomko
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Set runstate to RUN_STATE_RESTORE_VM when started with "-loadvm"

Previously, there was a bug in usbredir which prevented "-loadvm" from working because libusbredir's usbredirparser_unserialize() fails when a HELLO packet is sent as part of the device's initalization.

The fix was to not send HELLO when in the RUN_STATE_PRELAUNCH state. However, recently we found that this breaks when QEMU is started with "-S" because it is in the RUN_STATE_PRELAUNCH state while halted before boot as well.

This patch attempts to re-fix the issue by setting the run state to RUN_STATE_RESTORE_VM when started with "-loadvm" and recognizing that state in usbredir's initalization.

To make sure there's no unintended side effects, we searched for "RUN_STATE_RESTORE_VM" in the code base and found only references in migration/savevm.c, monitor/hmp-cmds.c, and replay/replay-debugging.c. None of these seems to be affected by RUN_STATE_RESTORE_VM before RUN_STATE_RUNNING.

Joelle van Dyne (3):
Revert "usbredir: avoid queuing hello packet on snapshot restore"
vl: on -loadvm set run state to "restore-vm"
usbredir: avoid queuing hello packet on snapshot restore

 hw/usb/redirect.c  | 2 +-
 softmmu/runstate.c | 1 +
 softmmu/vl.c       | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.28.0