linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alex Williamson <alex.williamson@redhat.com>, kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, qemu-devel@nongnu.org,
	peterx@redhat.com, eric.auger@redhat.com
Subject: Re: [PATCH v2 0/3] vfio/pci: ioeventfd support
Date: Mon, 19 Mar 2018 20:09:04 +1100	[thread overview]
Message-ID: <28b02805-fa03-7f7c-b603-fa8985b305aa@ozlabs.ru> (raw)
In-Reply-To: <20180315212634.15150.88094.stgit@gimli.home>

On 16/3/18 8:31 am, Alex Williamson wrote:
> A vfio ioeventfd will perform the pre-specified device write on
> triggering of an eventfd.  When coupled with KVM ioeventfds, this
> feature allows a VM to trap a device page for virtualization, while
> also registering targeted ioeventfds to maintain performance of high
> frequency register writes within the trapped range.  Much like the
> existing interrupt eventfd/irqfd coupling, such writes can be handled
> entirely in the host kernel.
> 
> The new VFIO device ioctl may be supported by any vfio bus driver,
> including mdev drivers, but the implementation here only enables
> vfio-pci.  This is intended as an acceleration path, bus drivers
> may choose which regions to support and userspace should always
> intend to fall back to non-accelerated handling when unavailable.
> 
> v1->v2:
>  * Peter & Eric Sign-offs on 1/3
>  * mutex_destroy() in 3/3
>  * Slight enhancement to uapi description
>  * sparse clean - Sparse didn't like that we dropped the __iomem
>    address space when calling iowriteXX, re-adding it via the opaque
>    and data pointers of the virq was crude, and that was not a 32-bit
>    friendly soluion anyway, so add the iomem address to our ioeventfd
>    struct, pass that, and use a more simple, common handler.
> 
> RFC->v1:
>  * An arbitrary limit is added for the number of ioeventfds supported
>    per device.  The intention is to set this high enough to allow any
>    reasonable use case, but limit malicious user behavior.
>  * Split patches, including adding a patch for endian neutral io reads
>    and writes.  This should be a nop for little-endian and avoid
>    redundant swap on big-endian, and hopefully resolves Alexey's
>    comments regarding the endian nature of this interface.
>  * Rebase to v4.16-rc3
> 
> Thanks,
> Alex
> 
> ---
> 
> Alex Williamson (3):
>       vfio/pci: Pull BAR mapping setup from read-write path
>       vfio/pci: Use endian neutral helpers
>       vfio/pci: Add ioeventfd support
> 
> 
>  drivers/vfio/pci/vfio_pci.c         |   35 +++++++
>  drivers/vfio/pci/vfio_pci_private.h |   19 ++++
>  drivers/vfio/pci/vfio_pci_rdwr.c    |  184 +++++++++++++++++++++++++++++++----
>  include/uapi/linux/vfio.h           |   27 +++++
>  4 files changed, 245 insertions(+), 20 deletions(-)
> 


LGTM, I gave it a try to make sure 2/3 does not break and it does not in
all combinations of le/be host <=> le/be guest but I did not try the actual
feature - cannot make up a test quickly...

Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>


-- 
Alexey

      parent reply	other threads:[~2018-03-19  9:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 21:31 [PATCH v2 0/3] vfio/pci: ioeventfd support Alex Williamson
2018-03-15 21:31 ` [PATCH v2 1/3] vfio/pci: Pull BAR mapping setup from read-write path Alex Williamson
2018-03-15 21:31 ` [PATCH v2 2/3] vfio/pci: Use endian neutral helpers Alex Williamson
2018-03-15 21:31 ` [PATCH v2 3/3] vfio/pci: Add ioeventfd support Alex Williamson
2018-03-16  4:40   ` Peter Xu
2018-03-19  9:09 ` Alexey Kardashevskiy [this message]

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=28b02805-fa03-7f7c-b603-fa8985b305aa@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.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).