qemu-kvm/SOURCES/kvm-migration-ram-Add-check...

57 lines
1.9 KiB
Diff

From 1f0ccebc1a1ed974fe13841c06742f52589c6064 Mon Sep 17 00:00:00 2001
From: "plai@redhat.com" <plai@redhat.com>
Date: Mon, 7 Jan 2019 17:02:21 +0000
Subject: [PATCH 20/22] migration/ram: Add check and info message to nvdimm
post copy.
RH-Author: plai@redhat.com
Message-id: <1546880543-24860-9-git-send-email-plai@redhat.com>
Patchwork-id: 83891
O-Subject: [RHEL8.0 qemu-kvm PATCH v7 08/10] migration/ram: Add check and info message to nvdimm post copy.
Bugzilla: 1539285
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 469dd51bc664979f159d47885997d482991394b8)
Signed-off-by: Paul Lai <plai@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
migration/ram.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index 04b5df5..f850fd0 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3120,6 +3120,15 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
static bool ram_has_postcopy(void *opaque)
{
+ RAMBlock *rb;
+ RAMBLOCK_FOREACH_MIGRATABLE(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();
}
--
1.8.3.1