qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] mptsas: Fix a migration compatible issue


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] mptsas: Fix a migration compatible issue
Date: Tue, 2 Aug 2016 06:03:32 -0400 (EDT)

> Before I send the fix, I did a quick test on linux as following:
> 
> #include <stdio.h>
> #include <stdbool.h>
> 
> int main()
> {
>      printf("bool size = %d\n", sizeof(bool));
> }
> 
> 
> then:
> ./a.out
> bool size = 1
> 
> and there is mptsas.c #include "qemu/osdep.h", osdep.h #include <stdbool.h>
> 
> So, am I missing something?

You are missing that the patch is: 1) not portable, because there's no guarantee
that sizeof(bool)==1; 2) wrong, because using sizeof within VMSTATE_UNUSED would
suggest a dependency of the migration stream on the host---and such a dependency
should not be there at all.

In fact, the patch is also wrong because old versions of QEMU _do_ need 
msi_in_use
so you need to either generate it or bump the migration version.  I'm sending a
patch now.

Paolo



reply via email to

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