qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 1/4] migration/ram: only possible bit set in invalid_flags is RAM


From: Wei Yang
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

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 <address@hidden>
---
 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




reply via email to

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