On Fri, Jul 26, 2019 at 04:39:41PM -0400, Vivek Goyal wrote: > On Fri, Jul 26, 2019 at 09:29:33AM +0100, Stefan Hajnoczi wrote: > > The device communicates FUSE_SETUPMAPPING/FUSE_REMOVMAPPING alignment > > constraints via the FUST_INIT map_alignment field. Parse this field and > > ensure our DAX mappings meet the alignment constraints. > > Hi Stefan, > > To meet alignment constraints, we also need to make sure dax window > start/end address is 2MB aligned as well?
No, because the mmap on the host is independent of the guest virtual address at which the BAR is mapped inside the guest. QEMU hw/virtio/vhost-user-fs.c:vuf_device_realize() mmaps the DAX window on the host side and that's where the mmap alignment requirement is in effect. The guest can map the DAX window at any address compatible with its own virtual memory constraints (i.e. page size). Stefan
signature.asc
Description: PGP signature
