All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Eugenio Perez Martin <eperezma@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	mst@redhat.com, virtualization@lists.linux.dev,
	linux-kernel@vger.kernel.org, Hanna Reitz <hreitz@redhat.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	German Maglione <gmaglione@redhat.com>
Subject: Re: [PATCH] vduse: add virtio_fs to allowed dev id
Date: Thu, 23 Jan 2025 15:00:06 -0500	[thread overview]
Message-ID: <20250123200006.GB238888@fedora> (raw)
In-Reply-To: <CAJaqyWdC-Tte+ao6pk22fq-mUym8C9guQFThSnG5gMxWNqWyXw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

On Thu, Jan 23, 2025 at 08:26:57AM +0100, Eugenio Perez Martin wrote:
> On Thu, Jan 23, 2025 at 2:50 AM Jason Wang <jasowang@redhat.com> wrote:
> >
> > On Wed, Jan 22, 2025 at 11:49 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > >
> > > On Tue, Jan 21, 2025 at 11:33:46AM +0100, Eugenio Pérez wrote:
> > > > A VDUSE device that implements virtiofs device works fine just by
> > > > adding the device id to the whitelist.
> > >
> > > The virtiofs DAX Window feature might require extra work. It is not
> > > widely enabled though, so must virtiofs devices will work fine with just
> > > virtqueue and configuration space support.
> >
> > +1.
> >
> > The DAX Window may help to reduce the bounce buffer copying and fit
> > for the case where an AI application just accesses one single large
> > file.
> >
> > We need to consider implementing this via VDUSE.
> >
> > Thanks
> >
> >
> 
> I thought DAX can only be applied in the VM case. Is it possible to
> apply it using virtio_vdpa?

Hardware could implement the DAX Window feature. In virtio-pci it's
implemented as a range within a BAR on the PCI device.

> Is it possible to detect that the device is trying to use DAX so it
> fails the negotiation?

Yes, DAX is optional. It's only available when the device reports a
Shared Memory Region with ID 0:
https://github.com/oasis-tcs/virtio-spec/blob/master/device-types/fs/description.tex#L233

Just to let you know, the QEMU vhost-user implementation of the DAX
Window is not complete. In the past David Gilbert had out-of-tree
patches to enable it in QEMU.

The guest driver support is in Linux.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-01-23 20:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 10:33 [PATCH] vduse: add virtio_fs to allowed dev id Eugenio Pérez
2025-01-22 15:49 ` Stefan Hajnoczi
2025-01-23  1:49   ` Jason Wang
2025-01-23  7:26     ` Eugenio Perez Martin
2025-01-23 20:00       ` Stefan Hajnoczi [this message]
2025-02-24 21:51 ` Michael S. Tsirkin
2025-02-25 12:17   ` Eugenio Perez Martin
2025-02-25 12:31     ` Michael S. Tsirkin
2025-03-05  4:32       ` Jason Wang

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=20250123200006.GB238888@fedora \
    --to=stefanha@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=gmaglione@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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.