QEMU intercepts guest writes to vNVDIMM labels, and then stores them
to the backend. When the backend is a real NVDIMM device, QEMU needs
to ensure the write persistence before returning to guest, so that the
guest labels will not be lost if QEMU exits abnormally.
Haozhong Zhang (2):
util/pmem: add function to make writes to pmem persistent
mem/nvdimm: ensure persistence of QEMU writes to real NVDIMM device
hw/mem/nvdimm.c | 3 ++
include/qemu/pmem.h | 25 ++++++++++
util/Makefile.objs | 1 +
util/pmem.c | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 161 insertions(+)
create mode 100644 include/qemu/pmem.h
create mode 100644 util/pmem.c
--
2.14.1