On 3/11/20 2:20 AM, Stefan Hajnoczi wrote: > Please try: > > $ git grep pmem > > backends/hostmem-file.c is the backend that can be used and the > pmem_persist() API can be used to flush writes.
I've reworked this patch into hostmem-file type of backend. >From simple tests in virtual machine: writing to PMR region and then reading from it after VM power cycle I have observed that there is no persistency. I guess that persistent behavior can be achieved if memory backend file resides on actual persistent memory in VMM. I haven't found mechanism to persist memory backend file when it resides in the file system on block storage. My original mmap + msync based solution worked well there. I believe that main problem with mmap was with "ifdef _WIN32" that made it platform specific and w/o it patchew CI complained. Is there a way that I could rework mmap + msync solution so it would fit into qemu design?