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

2011-04-14 Thread Stefan Berger
On 04/12/2011 02:05 AM, Daniel Veillard wrote: On Mon, Apr 11, 2011 at 11:46:55AM -0600, Eric Blake wrote: On 04/11/2011 07:36 AM, Daniel Veillard wrote: @@ -3097,6 +3107,11 @@ qemuDomainSaveImageOpen(struct qemud_dri } if (header.version QEMUD_SAVE_VERSION) { +/*

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

2011-04-14 Thread Eric Blake
On 04/09/2011 09:48 AM, 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. I am converting the 'int's in the VM's state header to uint32_t assuming this doesn't break

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

2011-04-14 Thread Eric Blake
On 04/14/2011 06:28 AM, Stefan Berger wrote: The thing I'm worried about is that by bumping older versions won't be able to restore the new dumps, and that could be a serious issue on shared storage. We are not introducing a new feature, so I thin we need to preserve forward compatibility.

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

2011-04-14 Thread Stefan Berger
On 04/14/2011 12:53 PM, Eric Blake wrote: On 04/09/2011 09:48 AM, 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. I am converting the 'int's in the VM's state header to

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

2011-04-14 Thread Eric Blake
On 04/14/2011 11:50 AM, Stefan Berger wrote: +++ libvirt-acl/src/qemu/qemu_driver.c @@ -43,6 +43,7 @@ #includesys/wait.h #includesys/ioctl.h #includesys/un.h +#includebyteswap.h This won't work unless you also modify bootstrap.conf to include the gnulib byteswap module. ACK with

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

2011-04-14 Thread Stefan Berger
On 04/14/2011 02:20 PM, Eric Blake wrote: On 04/14/2011 11:50 AM, Stefan Berger wrote: +++ libvirt-acl/src/qemu/qemu_driver.c @@ -43,6 +43,7 @@ #includesys/wait.h #includesys/ioctl.h #includesys/un.h +#includebyteswap.h This won't work unless you also modify bootstrap.conf to include

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

2011-04-12 Thread Daniel Veillard
On Mon, Apr 11, 2011 at 11:46:55AM -0600, Eric Blake wrote: On 04/11/2011 07:36 AM, Daniel Veillard wrote: @@ -3097,6 +3107,11 @@ qemuDomainSaveImageOpen(struct qemud_dri } if (header.version QEMUD_SAVE_VERSION) { +/* convert endianess and try again */ +

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

2011-04-11 Thread Daniel Veillard
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

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

2011-04-11 Thread Eric Blake
On 04/11/2011 07:36 AM, Daniel Veillard wrote: @@ -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

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

2011-04-11 Thread Stefan Berger
On 04/11/2011 01:46 PM, Eric Blake wrote: On 04/11/2011 07:36 AM, Daniel Veillard wrote: @@ -3097,6 +3107,11 @@ qemuDomainSaveImageOpen(struct qemud_dri } if (header.version QEMUD_SAVE_VERSION) { +/* convert endianess and try again */ +bswap_header(header); +}

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

2011-04-10 Thread Daniel Veillard
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 :-) ? I am converting the 'int's in

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

2011-04-09 Thread Stefan Berger
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. I am converting the 'int's in the VM's state header to uint32_t assuming this doesn't break compatibility with existing deployments other than