From: Wei Yang <richardw.yang@linux.intel.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, Wei Yang <richardw.yang@linux.intel.com>,
quintela@redhat.com
Subject: Re: [PATCH 1/4] migration/ram: only possible bit set in invalid_flags is RAM_SAVE_FLAG_COMPRESS_PAGE
Date: Wed, 9 Oct 2019 09:11:34 +0800 [thread overview]
Message-ID: <20191009011134.GE26203@richard> (raw)
In-Reply-To: <20191008173825.GI3441@work-vm>
On Tue, Oct 08, 2019 at 06:38:25PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.yang@linux.intel.com) wrote:
>> The only possible bit set in invalid_flags is
>> RAM_SAVE_FLAG_COMPRESS_PAGE at the beginning of function
>> ram_load_precopy(), which means it is not necessary to do
>> another check for RAM_SAVE_FLAG_COMPRESS_PAGE bit.
>>
>> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
>> ---
>> migration/ram.c | 5 +----
>> 1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/migration/ram.c b/migration/ram.c
>> index 31051935c8..769d3f6454 100644
>> --- a/migration/ram.c
>> +++ b/migration/ram.c
>> @@ -4263,10 +4263,7 @@ static int ram_load_precopy(QEMUFile *f)
>> addr &= TARGET_PAGE_MASK;
>>
>> if (flags & invalid_flags) {
>> - if (flags & invalid_flags & RAM_SAVE_FLAG_COMPRESS_PAGE) {
>> - error_report("Received an unexpected compressed page");
>> - }
>> -
>> + error_report("Received an unexpected compressed page");
>> ret = -EINVAL;
>
>I'd rather keep this one; I think Juan's idea is that we might make
>other flags illegal here and then it's easy to add to invalid_flags at
>the top.
>
Reasonable.
>Dave
>> break;
>> }
>> --
>> 2.17.1
>>
>--
>Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2019-10-09 1:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-05 22:05 [PATCH 0/4] migration: trivial cleanup and refine Wei Yang
2019-10-05 22:05 ` [PATCH 1/4] migration/ram: only possible bit set in invalid_flags is RAM_SAVE_FLAG_COMPRESS_PAGE Wei Yang
2019-10-08 17:38 ` Dr. David Alan Gilbert
2019-10-09 1:11 ` Wei Yang [this message]
2019-10-05 22:05 ` [PATCH 2/4] migration/postcopy: fix typo in mark_postcopy_blocktime_begin's comment Wei Yang
2019-10-07 10:08 ` Philippe Mathieu-Daudé
2019-10-05 22:05 ` [PATCH 3/4] migration: pass in_postcopy instead of check state again Wei Yang
2019-10-08 17:57 ` Dr. David Alan Gilbert
2019-10-05 22:05 ` [PATCH 4/4] migration: report SaveStateEntry id and name on failure Wei Yang
2019-10-07 10:08 ` Philippe Mathieu-Daudé
2019-10-11 13:32 ` [PATCH 0/4] migration: trivial cleanup and refine Dr. David Alan Gilbert
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=20191009011134.GE26203@richard \
--to=richardw.yang@linux.intel.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).