This patch adds virtio-pmem Qemu device.
This device presents memory address range information to guest
which is backed by file backend type. It acts like persistent
memory device for KVM guest. Guest can perform read and persistent
write operations on this memory range with the help of DAX capable
filesystem.
Persistent guest writes are assured with the help of virtio based
flushing interface. When guest userspace space performs fsync on
file fd on pmem device, a flush command is send to Qemu over VIRTIO
and host side flush/sync is done on backing image file.
Changes from RFC v2:
- Use aio_worker() to avoid Qemu from hanging with blocking fsync
call - Stefan
- Use virtio_st*_p() for endianess - Stefan
- Correct indentation in qapi/misc.json - Eric
Signed-off-by: Pankaj Gupta <pagupta@xxxxxxxxxx>
---
+++ b/qapi/misc.json
@@ -2907,6 +2907,29 @@
}
}
+##
+# @VirtioPMemDeviceInfo:
+#
+# VirtioPMem state information
+#
+# @id: device's ID
+#
+# @start: physical address, where device is mapped
+#
+# @size: size of memory that the device provides
+#
+# @memdev: memory backend linked with device
+#
+# Since: 2.13