qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/4] virtio: stabilize migration format
@ 2012-12-10 14:29 Anthony Liguori
  2012-12-10 14:29 ` [Qemu-devel] [PATCH 1/4] savevm: introduce little endian variants of savevm routines Anthony Liguori
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Anthony Liguori @ 2012-12-10 14:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Rusty Russell, David Gibson, Michael S. Tsirkin

This series replaces:

    qemu_put_buffer(f, (unsigned char*)&req->elem, sizeof(req->elem));

With code that properly saves out each element of the structure using
a well defined endian format.  Migration is broken today from big endian to
little endian hosts.

There's no way to fix this problem without bumping the migration version
number and that's exactly what we do here.  By bumping the migration version
number, we do break new->old migration but that's unavoidable right now.

In order to support old->new, we assume that all incoming data is in little
endian.  The final patch adds a check to the load routines to fail old->new
on big endian hosts where this may not have been true.

I've not tested this thoroughly enough to apply yet but wanted to share.

---
 hw/virtio-blk.c        |   22 +++++---
 hw/virtio-serial-bus.c |   19 +++----
 hw/virtio.c            |  123 +++++++++++++++++++++++++++++++++++++++++++++++++
 hw/virtio.h            |    4 +
 qemu-file.h            |    7 ++
 savevm.c               |   45 +++++++++++++++++
 6 files changed, 201 insertions(+), 19 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-12-14 13:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 14:29 [Qemu-devel] [RFC 0/4] virtio: stabilize migration format Anthony Liguori
2012-12-10 14:29 ` [Qemu-devel] [PATCH 1/4] savevm: introduce little endian variants of savevm routines Anthony Liguori
2012-12-10 14:33   ` Peter Maydell
2012-12-10 15:24     ` Anthony Liguori
2012-12-10 14:29 ` [Qemu-devel] [PATCH 2/4] virtio: add wrapper for saving/restoring virtqueue elements Anthony Liguori
2012-12-14 11:46   ` Paolo Bonzini
2012-12-14 13:54     ` Anthony Liguori
2012-12-10 14:29 ` [Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format Anthony Liguori
2012-12-11  0:32   ` Rusty Russell
2012-12-11  0:54     ` Anthony Liguori
2012-12-14  0:57       ` Rusty Russell
2012-12-14 11:50         ` Paolo Bonzini
2012-12-14 13:59           ` Anthony Liguori
2012-12-10 14:29 ` [Qemu-devel] [PATCH 4/4] virtio: bump migration version number Anthony Liguori
2012-12-11  9:02 ` [Qemu-devel] [RFC 0/4] virtio: stabilize migration format Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).