From: Wei Yang <richardw.yang@linux.intel.com>
To: quintela@redhat.com, dgilbert@redhat.com
Cc: qemu-devel@nongnu.org, Wei Yang <richardw.yang@linux.intel.com>
Subject: [PATCH 1/4] migration/ram: only possible bit set in invalid_flags is RAM_SAVE_FLAG_COMPRESS_PAGE
Date: Sun, 6 Oct 2019 06:05:14 +0800 [thread overview]
Message-ID: <20191005220517.24029-2-richardw.yang@linux.intel.com> (raw)
In-Reply-To: <20191005220517.24029-1-richardw.yang@linux.intel.com>
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;
break;
}
--
2.17.1
next prev parent reply other threads:[~2019-10-05 22: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 ` Wei Yang [this message]
2019-10-08 17:38 ` [PATCH 1/4] migration/ram: only possible bit set in invalid_flags is RAM_SAVE_FLAG_COMPRESS_PAGE Dr. David Alan Gilbert
2019-10-09 1:11 ` Wei Yang
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=20191005220517.24029-2-richardw.yang@linux.intel.com \
--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).