All of lore.kernel.org
 help / color / mirror / Atom feed
From: junyan.he@gmx.com
To: qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, imammedo@redhat.com, pbonzini@redhat.com,
	crosthwaite.peter@gmail.com, rth@twiddle.net,
	xiaoguangrong.eric@gmail.com, mst@redhat.com,
	quintela@redhat.com, dgilbert@redhat.com, stefanha@redhat.com,
	Junyan He <junyan.he@intel.com>
Subject: [Qemu-devel] [PATCH 6/7 V9] migration/ram: Add check and info message to nvdimm post copy.
Date: Tue, 10 Jul 2018 18:30:19 +0800	[thread overview]
Message-ID: <1531218620-14645-7-git-send-email-junyan.he@gmx.com> (raw)
In-Reply-To: <1531218620-14645-1-git-send-email-junyan.he@gmx.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>
---
 migration/ram.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/migration/ram.c b/migration/ram.c
index 1cd98d6..9c03e2b 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3895,6 +3895,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();
 }
 
-- 
2.7.4

  parent reply	other threads:[~2018-07-10 10:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 10:30 [Qemu-devel] [PATCH 0/7 V9] nvdimm: guarantee persistence of QEMU writes to persistent memory junyan.he
2018-07-10 10:30 ` [Qemu-devel] [PATCH 1/7 V9] memory, exec: Expose all memory block related flags junyan.he
2018-07-10 10:30 ` [Qemu-devel] [PATCH 2/7 V9] memory, exec: switch file ram allocation functions to 'flags' parameters junyan.he
2018-07-10 10:30 ` [Qemu-devel] [PATCH 3/7 V9] configure: add libpmem support junyan.he
2018-07-10 10:30 ` [Qemu-devel] [PATCH 4/7 V9] hostmem-file: add the 'pmem' option junyan.he
2018-07-16 12:50   ` Igor Mammedov
2018-07-10 10:30 ` [Qemu-devel] [PATCH 5/7 V9] mem/nvdimm: ensure write persistence to PMEM in label emulation junyan.he
2018-07-10 10:30 ` junyan.he [this message]
2018-07-10 10:30 ` [Qemu-devel] [PATCH 7/7 V9] migration/ram: ensure write persistence on loading all data to PMEM junyan.he

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1531218620-14645-7-git-send-email-junyan.he@gmx.com \
    --to=junyan.he@gmx.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=junyan.he@intel.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=xiaoguangrong.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.