qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, eric.auger@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 5/6] vfio/quirks: ioeventfd quirk acceleration
Date: Fri, 4 May 2018 10:17:22 +0800	[thread overview]
Message-ID: <20180504021722.GI29580@xz-mi> (raw)
In-Reply-To: <20180503214505.2749.34062.stgit@gimli.home>

On Thu, May 03, 2018 at 03:45:05PM -0600, Alex Williamson wrote:
> The NVIDIA BAR0 quirks virtualize the PCI config space mirrors found
> in device MMIO space.  Normally PCI config space is considered a slow
> path and further optimization is unnecessary, however NVIDIA uses a
> register here to enable the MSI interrupt to re-trigger.  Exiting to
> QEMU for this MSI-ACK handling can therefore rate limit our interrupt
> handling.  Fortunately the MSI-ACK write is easily detected since the
> quirk MemoryRegion otherwise has very few accesses, so simply looking
> for consecutive writes with the same data is sufficient, in this case
> 10 consecutive writes with the same data and size is arbitrarily
> chosen.  We configure the KVM ioeventfd with data match, so there's
> no risk of triggering for the wrong data or size, but we do risk that
> pathological driver behavior might consume all of QEMU's file
> descriptors, so we cap ourselves to 10 ioeventfds for this purpose.
> 
> In support of the above, generic ioeventfd infrastructure is added
> for vfio quirks.  This automatically initializes an ioeventfd list
> per quirk, disables and frees ioeventfds on exit, and allows
> ioeventfds marked as dynamic to be dropped on device reset.  The
> rationale for this latter feature is that useful ioeventfds may
> depend on specific driver behavior and since we necessarily place a
> cap on our use of ioeventfds, a machine reset is a reasonable point
> at which to assume a new driver and re-profile.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu

  reply	other threads:[~2018-05-04  2:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 21:44 [Qemu-devel] [PATCH v3 0/6] vfio/quirks: ioeventfd support Alex Williamson
2018-05-03 21:44 ` [Qemu-devel] [PATCH v3 1/6] scripts/update-linux-headers: Update handling of __aligned_u64 Alex Williamson
2018-05-22 14:04   ` Peter Maydell
2018-05-03 21:44 ` [Qemu-devel] [PATCH v3 2/6] linux-headers: Update to v4.17-rc3 Alex Williamson
2018-05-03 21:44 ` [Qemu-devel] [PATCH v3 3/6] vfio/quirks: Add common quirk alloc helper Alex Williamson
2018-05-03 21:44 ` [Qemu-devel] [PATCH v3 4/6] vfio/quirks: Add quirk reset callback Alex Williamson
2018-05-03 21:45 ` [Qemu-devel] [PATCH v3 5/6] vfio/quirks: ioeventfd quirk acceleration Alex Williamson
2018-05-04  2:17   ` Peter Xu [this message]
2018-05-04  7:51   ` Auger Eric
2018-05-03 21:45 ` [Qemu-devel] [PATCH v3 6/6] vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly Alex Williamson
2018-05-04  2:17   ` Peter Xu
2018-05-04  7:51   ` Auger Eric

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=20180504021722.GI29580@xz-mi \
    --to=peterx@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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).