linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Anastasio <shawn@anastas.io>
To: alex.williamson@redhat.com, kvm@vger.kernel.org
Cc: cohuck@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH RFC 0/1] VFIO: Region-specific file descriptors
Date: Mon, 30 Sep 2019 18:55:32 -0500	[thread overview]
Message-ID: <20190930235533.2759-1-shawn@anastas.io> (raw)

This patch adds region file descriptors to VFIO, a simple file descriptor type
that allows read/write/mmap operations on a single region of a VFIO device.

This feature is particularly useful for privileged applications that use VFIO
and wish to share file descriptors with unprivileged applications without
handing over full control of the device. It also allows applications to use
regular offsets in read/write/mmap instead of the region index + offset that
must be used with device file descriptors.

The current implementation is very raw (PCI only, no reference counting which
is probably wrong), but I wanted to get a sense to see if this feature is
desired. If it is, tips on how to implement this more correctly are
appreciated.

Comments welcome!


Shawn Anastasio (1):
  vfio/pci: Introduce region file descriptors

 drivers/vfio/pci/vfio_pci.c         | 105 ++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci_private.h |   5 ++
 include/uapi/linux/vfio.h           |  14 ++++
 3 files changed, 124 insertions(+)

-- 
2.20.1


             reply	other threads:[~2019-10-01  0:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 23:55 Shawn Anastasio [this message]
2019-09-30 23:55 ` [PATCH RFC 1/1] vfio/pci: Introduce region file descriptors Shawn Anastasio
2019-10-01 15:38 ` [PATCH RFC 0/1] VFIO: Region-specific " Alex Williamson
2019-10-02 21:57   ` Shawn Anastasio

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=20190930235533.2759-1-shawn@anastas.io \
    --to=shawn@anastas.io \
    --cc=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).