Blame SOURCES/kvm-migration-ram-Add-check-and-info-message-to-nvdimm-p.patch

ae23c9
From 1f0ccebc1a1ed974fe13841c06742f52589c6064 Mon Sep 17 00:00:00 2001
ae23c9
From: "plai@redhat.com" <plai@redhat.com>
ae23c9
Date: Mon, 7 Jan 2019 17:02:21 +0000
ae23c9
Subject: [PATCH 20/22] migration/ram: Add check and info message to nvdimm
ae23c9
 post copy.
ae23c9
ae23c9
RH-Author: plai@redhat.com
ae23c9
Message-id: <1546880543-24860-9-git-send-email-plai@redhat.com>
ae23c9
Patchwork-id: 83891
ae23c9
O-Subject: [RHEL8.0 qemu-kvm PATCH v7 08/10] migration/ram: Add check and info message to nvdimm post copy.
ae23c9
Bugzilla: 1539285
ae23c9
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
ae23c9
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ae23c9
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
ae23c9
ae23c9
From: Junyan He <junyan.he@intel.com>
ae23c9
ae23c9
The nvdimm kind memory does not support post copy now.
ae23c9
We disable post copy if we have nvdimm memory and print some
ae23c9
log hint to user.
ae23c9
ae23c9
Signed-off-by: Junyan He <junyan.he@intel.com>
ae23c9
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
ae23c9
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
ae23c9
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
ae23c9
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ae23c9
(cherry picked from commit 469dd51bc664979f159d47885997d482991394b8)
ae23c9
Signed-off-by: Paul Lai <plai@redhat.com>
ae23c9
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ae23c9
---
ae23c9
 migration/ram.c | 9 +++++++++
ae23c9
 1 file changed, 9 insertions(+)
ae23c9
ae23c9
diff --git a/migration/ram.c b/migration/ram.c
ae23c9
index 04b5df5..f850fd0 100644
ae23c9
--- a/migration/ram.c
ae23c9
+++ b/migration/ram.c
ae23c9
@@ -3120,6 +3120,15 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
ae23c9
 
ae23c9
 static bool ram_has_postcopy(void *opaque)
ae23c9
 {
ae23c9
+    RAMBlock *rb;
ae23c9
+    RAMBLOCK_FOREACH_MIGRATABLE(rb) {
ae23c9
+        if (ramblock_is_pmem(rb)) {
ae23c9
+            info_report("Block: %s, host: %p is a nvdimm memory, postcopy"
ae23c9
+                         "is not supported now!", rb->idstr, rb->host);
ae23c9
+            return false;
ae23c9
+        }
ae23c9
+    }
ae23c9
+
ae23c9
     return migrate_postcopy_ram();
ae23c9
 }
ae23c9
 
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9