All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtio-fs@redhat.com, Miklos Szeredi <mszeredi@redhat.com>
Subject: Re: [Virtio-fs] [PATCH] fuse: implement FUSE_INIT map_alignment field
Date: Mon, 29 Jul 2019 08:48:16 -0400	[thread overview]
Message-ID: <20190729124816.GA630@redhat.com> (raw)
In-Reply-To: <20190729082149.GB3369@stefanha-x1.localdomain>

On Mon, Jul 29, 2019 at 09:21:49AM +0100, Stefan Hajnoczi wrote:
> 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.

Ok.

What about checking alignment constratins on inarg.moffset and
inarg.foffset in fuse_setup_one_mapping().

Thanks
Vivek

> 
> The guest can map the DAX window at any address compatible with its own
> virtual memory constraints (i.e. page size).
> 
> Stefan



  reply	other threads:[~2019-07-29 12:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  8:29 [Virtio-fs] [PATCH] fuse: implement FUSE_INIT map_alignment field Stefan Hajnoczi
2019-07-26 20:39 ` Vivek Goyal
2019-07-29  8:21   ` Stefan Hajnoczi
2019-07-29 12:48     ` Vivek Goyal [this message]
2019-07-29 15:21       ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729124816.GA630@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=mszeredi@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.