kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Ilias Stamatis <ilstam@amazon.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, pdurrant@amazon.co.uk,
	 dwmw@amazon.co.uk, nh-open-source@amazon.com
Subject: Re: [PATCH v2 0/6] KVM: Improve MMIO Coalescing API
Date: Fri, 16 Aug 2024 17:40:41 -0700	[thread overview]
Message-ID: <Zr_xiTiDksyKUG7J@google.com> (raw)
In-Reply-To: <20240718193543.624039-1-ilstam@amazon.com>

On Thu, Jul 18, 2024, Ilias Stamatis wrote:
> The current MMIO coalescing design has a few drawbacks which limit its
> usefulness. Currently all coalesced MMIO zones use the same ring buffer.
> That means that upon a userspace exit we have to handle potentially
> unrelated MMIO writes synchronously. And a VM-wide lock needs to be
> taken in the kernel when an MMIO exit occurs.
> 
> Additionally, there is no direct way for userspace to be notified about
> coalesced MMIO writes. If the next MMIO exit to userspace is when the
> ring buffer has filled then a substantial (and unbounded) amount of time
> may have passed since the first coalesced MMIO.
> 
> This series adds new ioctls to KVM that allow for greater control by
> making it possible to associate different MMIO zones with different ring
> buffers. It also allows userspace to use poll() to check for coalesced
> writes in order to avoid userspace exits in vCPU threads (see patch 3
> for why this can be useful).
> 
> The idea of improving the API in this way originally came from Paul
> Durrant (pdurrant@amazon.co.uk) but the implementation is mine.
> 
> The first patch in the series is a bug in the existing code that I
> discovered while writing a selftest and can be merged independently.

Ya, I'll grab it, maybe for 6.11?  Doesn't seem urgent though.

Anyways, I gave this a *very* cursory review.  I'd go ahead and send v3 though,
you're going to need Paolo's eyeballs on this, and he's offline until September.

  parent reply	other threads:[~2024-08-17  0:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 19:35 [PATCH v2 0/6] KVM: Improve MMIO Coalescing API Ilias Stamatis
2024-07-18 19:35 ` [PATCH v2 1/6] KVM: Fix coalesced_mmio_has_room() Ilias Stamatis
2024-07-18 19:35 ` [PATCH v2 2/6] KVM: Add KVM_CREATE_COALESCED_MMIO_BUFFER ioctl Ilias Stamatis
2024-08-17  0:32   ` Sean Christopherson
2024-07-18 19:35 ` [PATCH v2 3/6] KVM: Support poll() on coalesced mmio buffer fds Ilias Stamatis
2024-07-20  1:35   ` kernel test robot
2024-07-22 14:26     ` Stamatis, Ilias
2024-07-20 21:10   ` kernel test robot
2024-07-18 19:35 ` [PATCH v2 4/6] KVM: Add KVM_(UN)REGISTER_COALESCED_MMIO2 ioctls Ilias Stamatis
2024-08-17  0:36   ` Sean Christopherson
2024-07-18 19:35 ` [PATCH v2 5/6] KVM: Documentation: Document v2 of coalesced MMIO API Ilias Stamatis
2024-07-18 19:35 ` [PATCH v2 6/6] KVM: selftests: Add coalesced_mmio_test Ilias Stamatis
2024-08-17  0:40 ` Sean Christopherson [this message]
2024-08-23 23:47 ` [PATCH v2 0/6] KVM: Improve MMIO Coalescing API Sean Christopherson
2024-08-27 10:35   ` Stamatis, Ilias
2024-08-27 13:45     ` Sean Christopherson

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=Zr_xiTiDksyKUG7J@google.com \
    --to=seanjc@google.com \
    --cc=dwmw@amazon.co.uk \
    --cc=ilstam@amazon.com \
    --cc=kvm@vger.kernel.org \
    --cc=nh-open-source@amazon.com \
    --cc=pbonzini@redhat.com \
    --cc=pdurrant@amazon.co.uk \
    /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).