From 4251549eca8b113b508f6bf6a7aaca2541acda61 Mon Sep 17 00:00:00 2001 From: "plai@redhat.com" Date: Fri, 31 Aug 2018 16:25:58 +0200 Subject: [PATCH 16/29] migration/ram: Add check and info message to nvdimm post copy. RH-Author: plai@redhat.com Message-id: <1535732759-22481-9-git-send-email-plai@redhat.com> Patchwork-id: 82009 O-Subject: [RHEL7.6 PATCH BZ 1539280 8/9] migration/ram: Add check and info message to nvdimm post copy. Bugzilla: 1539280 RH-Acked-by: Michael S. Tsirkin RH-Acked-by: Pankaj Gupta RH-Acked-by: Miroslav Rezanina From: Junyan He 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 Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit 469dd51bc664979f159d47885997d482991394b8) Signed-off-by: Paul Lai Signed-off-by: Miroslav Rezanina --- 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