hostmem-file: add the 'pmem' option
authorJunyan He <junyan.he@intel.com>
Wed, 18 Jul 2018 07:48:00 +0000 (15:48 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 10 Aug 2018 10:29:39 +0000 (13:29 +0300)
commita4de8552b2580adf6fa4874439217b65d3bdd88b
tree0cfd280873e9c1a616d17d88a06bc9f32863e2d4
parent17824406fa55b303379f2e4af715c1e876c3535f
hostmem-file: add the 'pmem' option

When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it
needs to know whether the backend storage is a real persistent memory,
in order to decide whether special operations should be performed to
ensure the data persistence.

This boolean option 'pmem' allows users to specify whether the backend
storage of memory-backend-file is a real persistent memory. If
'pmem=on', QEMU will set the flag RAM_PMEM in the RAM block of the
corresponding memory region. If 'pmem' is set while lack of libpmem
support, a error is generated.

Signed-off-by: Junyan He <junyan.he@intel.com>
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
backends/hostmem-file.c
docs/nvdimm.txt
exec.c
include/exec/memory.h
include/exec/ram_addr.h
qemu-options.hx