Skip to content

virtio migration: Flip outer layer to vmstate

Dr. David Alan Gilbert (git) qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 6 repliesIn review
  2. v213 patches 6 repliesSuperseded
  3. v113 patches 27 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14virtio-net: Remove old migration version supporthw/net/virtio-net.c+34 -530 replies
2/14virtio-serial: Remove old migration version supporthw/char/virtio-serial-bus.c+15 -220 replies
3/14virtio: Migration helper function and macrohw/virtio/virtio.c include/hw/virtio/virtio.h+26 -00 replies
4/14virtio-scsi: Wrap in vmstatehw/scsi/virtio-scsi.c+6 -150 replies
5/14virtio-blk: Wrap in vmstatehw/block/virtio-blk.c+6 -100 replies
6/14virtio-rng: Wrap in vmstatehw/virtio/virtio-rng.c+5 -150 replies
7/14virtio-balloon: Wrap in vmstatehw/virtio/virtio-balloon.c+5 -140 replies
8/14virtio-net: Wrap in vmstatehw/net/virtio-net.c+7 -100 replies
9/14virtio-serial: Wrap in vmstatehw/char/virtio-serial-bus.c+6 -210 replies
10/149pfs: Wrap in vmstatehw/9pfs/virtio-9p-device.c+5 -90 replies
11/14virtio-input: Wrap in vmstatehw/input/virtio-input.c+6 -201 reply
12/14virtio-gpu: Use migrate_add_blocker for virgl migration blockinghw/display/virtio-gpu.c include/hw/virtio/virtio-gpu.h+15 -62 replies
13/14virtio-gpu: Wrap in vmstatehw/display/virtio-gpu.c+7 -101 reply
14/14virtio: Update migration docsdocs/virtio-migration.txt+4 -20 replies

Reviews trailers per patch

All 14 patches have a Reviewed-by or Acked-by.

PatchAmit ShahCornelia HuckGreg KurzGerd Hoffmann
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14R-b R-b
11/14R-b R-b
12/14R-b R-b
13/14R-b R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/14] virtio migration: Flip outer layer to vmstate

From: "Dr. David Alan Gilbert" <[email protected]>

Hi,
This series converts the outer most layer of virtio to
use VMState macros; this is the easy bit, but I'm hoping that having done that, the next trick is to nibble away at the virtio_save/load functions and all of the zillions of device/bus helpers.

I think the first two patches are the most controversial;
they remove migration support for old version of virtio-net and virtio-serial; (for virtio-net versions prior to 0.11 and for virtio-serial prior to 0.13). I'm working on the basis that migration has bit rotted enough so that the streams aren't migration compatible for that long back on upstream - but if anyone knows otherwise please shout.

The reason for doing those is that the virtio structure makes it a bit tricky to pass the outer device version number down through VMState to the device specific code (I can do it as a hack if necessary using a dummy is_needed function); and with -net and -serial compatibility sorted I think every other device just supports a single version.

My main reason for doing this is to get rid of the
calls to register_savevm ('going to disappear as soon..' since 2010)

It's lightly tested using the magic line:
./x86_64-softmmu/qemu-system-x86_64 -nographic -machine pc-i440fx-2.6,accel=kvm -cpu qemu64 -m 2048M -drive file=/home/vmimages/f20.img,if=none,id=drivea -device virtio-scsi,id=scsi -device scsi-hd,drive=drivea -device virtio-rng -device virtio-serial -chardev file,id=test,path=/tmp/testfile -device virtconsole,chardev=test,name=foo -virtfs local,path=/home,security_model=passthrough,mount_tag=host_share -device virtio-gpu -drive file=/home/vmimages/jeos-19-64.qcow2,id=jeos,if=none -device virtio-blk,drive=jeos -device virtio-balloon

Thoughts?

Dave

v3
Change virtio-gpu to use migrate_add_blocker instead of dummy vmstate,
avoiding the problem of ending up with two vmstates for the one device.

Dr. David Alan Gilbert (14):
virtio-net: Remove old migration version support
virtio-serial: Remove old migration version support
virtio: Migration helper function and macro
virtio-scsi: Wrap in vmstate
virtio-blk: Wrap in vmstate
virtio-rng: Wrap in vmstate
virtio-balloon: Wrap in vmstate
virtio-net: Wrap in vmstate
virtio-serial: Wrap in vmstate
9pfs: Wrap in vmstate
virtio-input: Wrap in vmstate
virtio-gpu: Use migrate_add_blocker for virgl migration blocking
virtio-gpu: Wrap in vmstate
virtio: Update migration docs

 docs/virtio-migration.txt      |   6 ++-
 hw/9pfs/virtio-9p-device.c     |  14 ++----
 hw/block/virtio-blk.c          |  16 +++----
 hw/char/virtio-serial-bus.c    |  62 ++++++++-----------------
 hw/display/virtio-gpu.c        |  36 ++++++++-------
 hw/input/virtio-input.c        |  26 +++--------
 hw/net/virtio-net.c            | 102 ++++++++++++++++-------------------------
 hw/scsi/virtio-scsi.c          |  21 +++------
 hw/virtio/virtio-balloon.c     |  19 ++------
 hw/virtio/virtio-rng.c         |  20 ++------
 hw/virtio/virtio.c             |   6 +++
 include/hw/virtio/virtio-gpu.h |   2 +
 include/hw/virtio/virtio.h     |  20 ++++++++
 13 files changed, 145 insertions(+), 205 deletions(-)
Signature · 1 line
2.7.4