All of lore.kernel.org
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.ibm.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>
Cc: virtio-dev@lists.oasis-open.org,
	Miklos Szeredi <mszeredi@redhat.com>,
	Steven Whitehouse <swhiteho@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Sage Weil <sweil@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Pierre Morel1 <Pierre.Morel1@ibm.com>
Subject: Re: [virtio-dev] [PATCH v8 2/2] virtio-fs: add DAX window
Date: Tue, 10 Sep 2019 14:00:46 +0200	[thread overview]
Message-ID: <20190910140046.57ba86e1.pasic@linux.ibm.com> (raw)
In-Reply-To: <20190829135206.24231-3-stefanha@redhat.com>

On Thu, 29 Aug 2019 14:52:06 +0100
Stefan Hajnoczi <stefanha@redhat.com> wrote:

> Describe how shared memory region ID 0 is the DAX window and how
> FUSE_SETUPMAPPING maps file ranges into the window.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> The FUSE_SETUPMAPPING message is part of the virtio-fs Linux patches:
> https://gitlab.com/virtio-fs/linux/blob/virtio-fs/include/uapi/linux/fuse.h
> 
> v8:
>  * Make language about using both FUSE_READ/FUSE_WRITE and the DAX
>    Window clearer [Cornelia]
> v7:
>  * Clarify that the DAX Window is optional and can be used together with
>    FUSE_READ/FUSE_WRITE requests [Cornelia]
> v6:
>  * Document timing side-channel attacks [Michael]
> ---
>  virtio-fs.tex | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 66 insertions(+)
> 
> diff --git a/virtio-fs.tex b/virtio-fs.tex
> index 1ae17f8..158d066 100644
> --- a/virtio-fs.tex
> +++ b/virtio-fs.tex
> @@ -179,6 +179,62 @@ \subsubsection{Device Operation: High Priority Queue}\label{sec:Device Types / F
>  
>  The driver MUST anticipate that request queues are processed concurrently with the hiprio queue.
>  
> +\subsubsection{Device Operation: DAX Window}\label{sec:Device Types / File System Device / Device Operation / Device Operation: DAX Window}
> +
> +FUSE\_READ and FUSE\_WRITE requests transfer file contents between the
> +driver-provided buffer and the device.  In cases where data transfer is
> +undesirable, the device can map file contents into the DAX window shared memory
> +region.  The driver then accesses file contents directly in device-owned memory
> +without a data transfer.
> +
> +The DAX Window is an alternative mechanism for accessing file contents.
> +FUSE\_READ/FUSE\_WRITE requests and DAX Window accesses are possible at the
> +same time.  Providing the DAX Window is optional for devices.  Using the DAX
> +Window is optional for drivers.
> +
> +Shared memory region ID 0 is called the DAX window.  Drivers map this shared
> +memory region with writeback caching as if it were regular RAM.  The contents
> +of the DAX window are undefined unless a mapping exists for that range.

This last paragraph is a bit concerning form s390x perspective. In case
of a PCI transport the shared memory region is a chunk of PCI memory (and
must be contained within the declared bar, as mandated by commit
855ad7af2bd6).

The PCI architecture on s390x is at the moment such, that PCI memory
*can't be accessed like regular RAM* but specialized instructions have
to be used. I've tried to rise concern about this multiple times. Thus
the virtio spec would contradict itself a little (at least on s390x).

Of course for virtual zPCI devices we can make this work. But including
this paragraph in the VIRTIO specification would mean if one were to
implement this in HW it would not work for s390.

I don't have a anything better to propose, so I intend to vote yes
for this. I just wanted to make sure, we all are aware of the
consequences.

Sorry for bringing this up again so late.

Adding Christian and Pierre as cc.

Regards,
Halil



---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  parent reply	other threads:[~2019-09-10 12:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 13:52 [virtio-dev] [PATCH v8 0/2] virtio-fs: add virtio file system device Stefan Hajnoczi
2019-08-29 13:52 ` [virtio-dev] [PATCH v8 1/2] content: " Stefan Hajnoczi
2019-08-29 13:52 ` [virtio-dev] [PATCH v8 2/2] virtio-fs: add DAX window Stefan Hajnoczi
2019-08-29 14:00   ` Cornelia Huck
2019-09-10 12:00   ` Halil Pasic [this message]
2019-09-10 13:09     ` Dr. David Alan Gilbert
2019-09-10 14:23       ` Halil Pasic
2019-09-10 14:31         ` Dr. David Alan Gilbert
2019-09-25 10:38           ` Michael S. Tsirkin
2019-10-09 10:13             ` Cornelia Huck
2019-09-09 15:27 ` [virtio-dev] Re: [PATCH v8 0/2] virtio-fs: add virtio file system device Stefan Hajnoczi
2019-09-09 15:43   ` Michael S. Tsirkin
2019-09-09 15:48   ` Michael S. Tsirkin

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=20190910140046.57ba86e1.pasic@linux.ibm.com \
    --to=pasic@linux.ibm.com \
    --cc=Pierre.Morel1@ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=mst@redhat.com \
    --cc=mszeredi@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=sweil@redhat.com \
    --cc=swhiteho@redhat.com \
    --cc=vgoyal@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    /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.