Skip to content

Commit

Permalink
migration/ram: Add check and info message to nvdimm post copy.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
HeJunyan authored and mstsirkin committed Aug 10, 2018
1 parent faf8a13 commit 469dd51
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions migration/ram.c
Expand Up @@ -3906,6 +3906,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();
}

Expand Down

0 comments on commit 469dd51

Please sign in to comment.