yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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