[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-back
From: |
Dan Williams |
Subject: |
Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file |
Date: |
Wed, 31 Jan 2018 14:25:44 -0800 |
On Tue, Jan 30, 2018 at 10:02 PM, Haozhong Zhang
<address@hidden> wrote:
> Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to
> guarantee the write persistence to mmap'ed files supporting DAX (e.g.,
> files on ext4/xfs file system mounted with '-o dax').
Wait, MAP_SYNC does not guarantee persistence. It makes sure that the
metadata is in sync after a fault. However, that does not make
filesystem-DAX safe for use with QEMU, because we still need to
coordinate DMA with fileystem operations. There is no way to do that
coordination from within a guest. QEMU needs to use device-dax if the
guest might ever perform DMA to a virtual-pmem range. See this patch
set for more details on the DAX vs DMA problem [1]. I think we need to
enforce this in the host kernel. I.e. do not allow file backed DAX
pages to be mapped in EPT entries unless / until we have a solution to
the DMA synchronization problem. Apologies for not noticing this
earlier.
[1]: https://lists.01.org/pipermail/linux-nvdimm/2017-December/013704.html
- [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Haozhong Zhang, 2018/01/31
- [Qemu-devel] [PATCH v4 5/6] hostmem: add more information in error messages, Haozhong Zhang, 2018/01/31
- [Qemu-devel] [PATCH v4 3/6] memory: switch memory_region_init_ram_from_file() to 'flags' parameter, Haozhong Zhang, 2018/01/31
- [Qemu-devel] [PATCH v4 4/6] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap(), Haozhong Zhang, 2018/01/31
- [Qemu-devel] [PATCH v4 1/6] util/mmap-alloc: switch qemu_ram_mmap() to 'flags' parameter, Haozhong Zhang, 2018/01/31
- [Qemu-devel] [PATCH v4 2/6] exec: switch qemu_ram_alloc_from_{file, fd} to the 'flags' parameter, Haozhong Zhang, 2018/01/31
- [Qemu-devel] [PATCH v4 6/6] hostmem-file: add 'sync' option, Haozhong Zhang, 2018/01/31
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file,
Dan Williams <=
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Haozhong Zhang, 2018/01/31
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Dan Williams, 2018/01/31
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Haozhong Zhang, 2018/01/31
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Dan Williams, 2018/01/31
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Haozhong Zhang, 2018/01/31
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Dan Williams, 2018/01/31
- Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file, Dan Williams, 2018/01/31