mem/nvdimm: ensure write persistence to PMEM in label emulation
authorJunyan He <junyan.he@intel.com>
Wed, 18 Jul 2018 07:48:01 +0000 (15:48 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 10 Aug 2018 10:29:39 +0000 (13:29 +0300)
commitfaf8a13d80de98b43342a7ec9878b4fd76b18327
tree8e7b986e39302a19d659b628649a38901b6d1612
parenta4de8552b2580adf6fa4874439217b65d3bdd88b
mem/nvdimm: ensure write persistence to PMEM in label emulation

Guest writes to vNVDIMM labels are intercepted and performed on the
backend by QEMU. When the backend is a real persistent memort, QEMU
needs to take proper operations to ensure its write persistence on the
persistent memory. Otherwise, a host power failure may result in the
loss of guest label configurations.

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: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
hw/mem/nvdimm.c
include/qemu/pmem.h [new file with mode: 0644]