From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUVua-0000Mh-Im for qemu-devel@nongnu.org; Tue, 02 Aug 2016 05:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUVuT-0001b0-NL for qemu-devel@nongnu.org; Tue, 02 Aug 2016 05:22:54 -0400 Received: from [59.151.112.132] (port=27307 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUVuS-0000wv-Rv for qemu-devel@nongnu.org; Tue, 02 Aug 2016 05:22:49 -0400 References: <1469523803-12194-1-git-send-email-caoj.fnst@cn.fujitsu.com> <71a5de12-993f-4e45-9201-797710cb5638@redhat.com> <20160801152905.GB24341@grmbl.mre> From: Cao jin Message-ID: <57A060EC.8080305@cn.fujitsu.com> Date: Tue, 2 Aug 2016 16:59:24 +0800 MIME-Version: 1.0 In-Reply-To: <20160801152905.GB24341@grmbl.mre> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] mptsas: Fix a migration compatible issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah , Paolo Bonzini Cc: qemu-devel@nongnu.org, Markus Armbruster , Marcel Apfelbaum , "Michael S. Tsirkin" Hi On 08/01/2016 11:29 PM, Amit Shah wrote: > On (Mon) 01 Aug 2016 [10:16:50], Paolo Bonzini wrote: >>> @@ -1370,7 +1370,7 @@ static const VMStateDescription vmstate_mptsas = { >>> .post_load = mptsas_post_load, >>> .fields = (VMStateField[]) { >>> VMSTATE_PCI_DEVICE(dev, MPTSASState), >>> - >>> + VMSTATE_UNUSED(sizeof(bool)), /* Was msi_in_use */ >> >> This needs to be "1", not sizeof(bool), because vmstate_info_bool writes >> a single byte. I'll fix this and queue the patch (removing Amit's >> reviewed-by since it's effectively a different change). > > Eeks, yes. > > This patch was merged in the meantime, so Cao Jin, please post a > revert and a fix, thanks! > > Amit > Before I send the fix, I did a quick test on linux as following: #include #include 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 So, am I missing something? -- Yours Sincerely, Cao jin