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

Re: [libvirt] [PATCH] migrate VMs between different-endian hosts



On Mon, Apr 11, 2011 at 06:32:21AM -0400, Stefan Berger wrote:
> On 04/10/2011 11:09 PM, Daniel Veillard wrote:
> >On Sat, Apr 09, 2011 at 11:48:41AM -0400, Stefan Berger wrote:
> >>This patch enables the migration of Qemu VMs between hosts of
> >>different endianess. I tested this by migrating a i686 VM between a
> >>x86 and ppc64 host.
> >   OMG, there is really a use case for this :-) ?
> :-) There may be other architectures that run more efficiently than
> an x86 one.

  Haha, no doubt :-)

> Btw, my use case is 'testing'.

  Okay, I was wondering, thanks !

> >>@@ -3097,6 +3107,11 @@ qemuDomainSaveImageOpen(struct qemud_dri
> >>      }
> >>
> >>      if (header.version>  QEMUD_SAVE_VERSION) {
> >>+        /* convert endianess and try again */
> >>+        bswap_header(&header);
> >>+    }
> >   Hum, isn't there a more reliable way to detect the change of
> >endianness ? That's a bit fishy IMHO :-)
> The problem is that the header should not have been written in a
> hosts' native format. So what can go wrong? QEMUD_SAVE_VERSION is
> '2'. Either we find 1 or 2 here and go ahead and accept it 'as-is'.
> Otherwise anything bigger than 3 is not accepted and swapped. 3 then
> becomes 0x03 00 00 00 and is discarded. 0x 02 00 00 00 would be
> swapped to '2' and accepted.

  yeah, I understand, okay,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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