From: Paolo Bonzini <pbonzini@redhat.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>
Cc: Amit Shah <amit.shah@redhat.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] mptsas: Fix a migration compatible issue
Date: Tue, 2 Aug 2016 06:03:32 -0400 (EDT) [thread overview]
Message-ID: <587982650.13014038.1470132212957.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <57A060EC.8080305@cn.fujitsu.com>
> 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
prev parent reply other threads:[~2016-08-02 10:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 9:03 [Qemu-devel] [PATCH] mptsas: Fix a migration compatible issue Cao jin
2016-07-26 11:51 ` Amit Shah
2016-08-01 8:16 ` Paolo Bonzini
2016-08-01 15:29 ` Amit Shah
2016-08-02 8:59 ` Cao jin
2016-08-02 10:03 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=587982650.13014038.1470132212957.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=caoj.fnst@cn.fujitsu.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).