Re: [Qemu-devel] [PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-30 Thread Haozhong Zhang
On 05/30/17 10:16 +0100, Stefan Hajnoczi wrote: > On Fri, May 26, 2017 at 10:24:38AM +0800, Haozhong Zhang wrote: > > file_ram_alloc() currently maps the backend file via mmap to a virtual > > address aligned to the value returned by qemu_fd_getpagesize(). When a > > DAX device (e.g. /dev/dax0.0) i

Re: [Qemu-devel] [PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-30 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 10:24:38AM +0800, Haozhong Zhang wrote: > file_ram_alloc() currently maps the backend file via mmap to a virtual > address aligned to the value returned by qemu_fd_getpagesize(). When a > DAX device (e.g. /dev/dax0.0) is used as the backend file, its kernel > mmap implementa

[Qemu-devel] [PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-25 Thread Haozhong Zhang
file_ram_alloc() currently maps the backend file via mmap to a virtual address aligned to the value returned by qemu_fd_getpagesize(). When a DAX device (e.g. /dev/dax0.0) is used as the backend file, its kernel mmap implementation may require an alignment larger than what qemu_fd_get_pagesize() re