[Virtio-fs] [PATCH] fuse: implement FUSE_INIT map_alignment field

Stefan Hajnoczi stefanha at redhat.com
Mon Jul 29 08:21:49 UTC 2019


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20190729/5348b42a/attachment.sig>


More information about the Virtio-fs mailing list