Commit 469dd51b authored by Junyan He's avatar Junyan He Committed by Michael S. Tsirkin
Browse files

migration/ram: Add check and info message to nvdimm post copy.



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: default avatarJunyan He <junyan.he@intel.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent faf8a13d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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();
}