qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 0/4] virtio: stabilize migration format


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC 0/4] virtio: stabilize migration format
Date: Tue, 11 Dec 2012 10:02:10 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]