diff mbox

make migration work again

Message ID 1241813218-28435-1-git-send-email-glommer@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Glauber Costa May 8, 2009, 8:06 p.m. UTC
Due to a small messup in version checking, migration was not working.
fix it.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 migration-tcp.c       |    1 +
 savevm.c              |    1 +
 target-i386/helper.c  |    1 +
 target-i386/machine.c |    8 ++++----
 4 files changed, 7 insertions(+), 4 deletions(-)

Comments

Avi Kivity May 10, 2009, 12:51 p.m. UTC | #1
Glauber Costa wrote:
> Due to a small messup in version checking, migration was not working.
> fix it.
>
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
>  migration-tcp.c       |    1 +
>  savevm.c              |    1 +
>  target-i386/helper.c  |    1 +
>  target-i386/machine.c |    8 ++++----
>  4 files changed, 7 insertions(+), 4 deletions(-)
>
>   

Strange diffstat.

> diff --git a/target-i386/machine.c b/target-i386/machine.c
> index 7f75d31..c1e05c5 100644
> --- a/target-i386/machine.c
> +++ b/target-i386/machine.c
> @@ -194,11 +194,11 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
>      int32_t a20_mask;
>  
>      if (version_id != 3 && version_id != 4 && version_id != 5
> -        && version_id != 6 && version_id != 7 && version_id != 8)
> -        return -EINVAL;
> -    /* KVM cannot accept migrations from QEMU today */
> -    if (version_id != 9)
> +        && version_id != 6 && version_id != 7 && version_id != 8
> +        /* KVM cannot accept migrations from QEMU today */
> +        && version_id != 9)
>          return -EINVAL;
>   

I think you want to remove the first line as well?  Only accept 
version_id == 9?  And keep the comment.
Avi Kivity May 11, 2009, 8:31 a.m. UTC | #2
Avi Kivity wrote:
> Glauber Costa wrote:
>> Due to a small messup in version checking, migration was not working.
>> fix it.   
>
> I think you want to remove the first line as well?  Only accept 
> version_id == 9?  And keep the comment.
>

Meanwhile I've reverted the offending patch, 7b2e5aba.
diff mbox

Patch

diff --git a/target-i386/machine.c b/target-i386/machine.c
index 7f75d31..c1e05c5 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -194,11 +194,11 @@  int cpu_load(QEMUFile *f, void *opaque, int version_id)
     int32_t a20_mask;
 
     if (version_id != 3 && version_id != 4 && version_id != 5
-        && version_id != 6 && version_id != 7 && version_id != 8)
-        return -EINVAL;
-    /* KVM cannot accept migrations from QEMU today */
-    if (version_id != 9)
+        && version_id != 6 && version_id != 7 && version_id != 8
+        /* KVM cannot accept migrations from QEMU today */
+        && version_id != 9)
         return -EINVAL;
+
     for(i = 0; i < CPU_NB_REGS; i++)
         qemu_get_betls(f, &env->regs[i]);
     qemu_get_betls(f, &env->eip);