qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [RFC 0/4] virtio: stabilize migration format
Date: Tue, 11 Dec 2012 10:02:10 +0100	[thread overview]
Message-ID: <20121211090210.GD23720@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <1355149790-8125-1-git-send-email-aliguori@us.ibm.com>

On Mon, Dec 10, 2012 at 08:29:46AM -0600, Anthony Liguori wrote:
> 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.

Is there a way to detect the endianness of the source host - by peaking
at a known multibyte value in the incoming stream?

That way we could even support cross-endian migration.

Not sure if this much magic makes sense since cross-endian migration is
probably used rarely.

Stefan

      parent reply	other threads:[~2012-12-11  9:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121211090210.GD23720@stefanha-thinkpad.muc.redhat.com \
    --to=stefanha@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).