diff mbox

[V6,6/7] migration/ram: Add check and info message to nvdimm post copy.

Message ID 1527840629-18648-7-git-send-email-junyan.he@gmx.com (mailing list archive)
State New, archived
Headers show

Commit Message

junyan.he@gmx.com June 1, 2018, 8:10 a.m. UTC
From: Junyan He <junyan.he@intel.com>

The nvdimm kind memory does not support post copy now.
We disable post copy if we have nvdimm memory and print some
log hint to user.

Signed-off-by: Junyan He <junyan.he@intel.com>
---
 migration/ram.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Stefan Hajnoczi June 5, 2018, 11:44 a.m. UTC | #1
On Fri, Jun 01, 2018 at 04:10:28PM +0800, junyan.he@gmx.com wrote:
> From: Junyan He <junyan.he@intel.com>
> 
> The nvdimm kind memory does not support post copy now.
> We disable post copy if we have nvdimm memory and print some
> log hint to user.
> 
> Signed-off-by: Junyan He <junyan.he@intel.com>
> ---
>  migration/ram.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox

Patch

diff --git a/migration/ram.c b/migration/ram.c
index c53e836..aa0c6f0 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3397,6 +3397,15 @@  static int ram_load(QEMUFile *f, void *opaque, int version_id)
 
 static bool ram_has_postcopy(void *opaque)
 {
+    RAMBlock *rb;
+    RAMBLOCK_FOREACH(rb) {
+        if (ramblock_is_pmem(rb)) {
+            info_report("Block: %s, host: %p is a nvdimm memory, postcopy"
+                         "is not supported now!", rb->idstr, rb->host);
+            return false;
+        }
+    }
+
     return migrate_postcopy_ram();
 }