kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Elena Afanasova <eafanasova@gmail.com>
Cc: kvm@vger.kernel.org, jag.raman@oracle.com,
	elena.ufimtseva@oracle.com, "Michael S. Tsirkin" <mst@redhat.com>,
	jasowang@redhat.com
Subject: Re: [RFC 0/2] Introduce MMIO/PIO dispatch file descriptors (ioregionfd)
Date: Tue, 29 Dec 2020 12:06:35 +0000	[thread overview]
Message-ID: <20201229120635.GD55616@stefanha-x1.localdomain> (raw)
In-Reply-To: <cover.1609231373.git.eafanasova@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1723 bytes --]

On Tue, Dec 29, 2020 at 01:02:42PM +0300, Elena Afanasova wrote:
> This patchset introduces a KVM dispatch mechanism which can be used 
> for handling MMIO/PIO accesses over file descriptors without returning 
> from ioctl(KVM_RUN). This allows device emulation to run in another task 
> separate from the vCPU task.
> 
> This is achieved through KVM vm ioctl for registering MMIO/PIO regions and 
> a wire protocol that KVM uses to communicate with a task handling an 
> MMIO/PIO access.
> 
> ioregionfd relies on kmemcg in order to limit the amount of kernel memory 
> that userspace can consume. Can NR_IOBUS_DEVS hardcoded limit be enforced 
> only in case kmemcg is disabled?

Thanks for sharing this! Can you describe the todos? I noticed some in
Patch 1 and highlighted them. In addition:
 * Signal handling when the vCPU thread is interrupted in
   kernel_read()/kernel_write()

> Elena Afanasova (2):
>   KVM: add initial support for KVM_SET_IOREGION
>   KVM: add initial support for ioregionfd blocking read/write operations
> 
>  arch/x86/kvm/Kconfig     |   1 +
>  arch/x86/kvm/Makefile    |   1 +
>  arch/x86/kvm/x86.c       |   1 +
>  include/linux/kvm_host.h |  17 ++
>  include/uapi/linux/kvm.h |  23 +++
>  virt/kvm/Kconfig         |   3 +
>  virt/kvm/eventfd.c       |  25 +++
>  virt/kvm/eventfd.h       |  14 ++
>  virt/kvm/ioregion.c      | 390 +++++++++++++++++++++++++++++++++++++++
>  virt/kvm/ioregion.h      |  15 ++
>  virt/kvm/kvm_main.c      |  20 +-
>  11 files changed, 507 insertions(+), 3 deletions(-)
>  create mode 100644 virt/kvm/eventfd.h
>  create mode 100644 virt/kvm/ioregion.c
>  create mode 100644 virt/kvm/ioregion.h
> 
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2020-12-29 12:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 10:02 [RFC 0/2] Introduce MMIO/PIO dispatch file descriptors (ioregionfd) Elena Afanasova
2020-12-29 10:02 ` [RFC 1/2] KVM: add initial support for KVM_SET_IOREGION Elena Afanasova
2020-12-29 11:36   ` Stefan Hajnoczi
2020-12-30 12:14     ` Elena Afanasova
2020-12-31  3:45   ` Jason Wang
2021-01-03 20:32     ` Elena Afanasova
2021-01-04  5:34       ` Jason Wang
2021-01-05  0:02         ` Elena Afanasova
2021-01-05  3:53           ` Jason Wang
2021-01-05 10:25             ` Stefan Hajnoczi
2021-01-06  5:21               ` Jason Wang
2021-01-06 15:05                 ` Stefan Hajnoczi
2021-01-07  3:30                   ` Jason Wang
2021-01-07 17:53                     ` Stefan Hajnoczi
2021-01-13  2:38                       ` Jason Wang
2021-01-13 15:52                         ` Stefan Hajnoczi
2021-01-14  4:05                           ` Jason Wang
2021-01-14 16:16                             ` Stefan Hajnoczi
2021-01-15  3:41                               ` Jason Wang
2020-12-29 10:02 ` [RFC 2/2] KVM: add initial support for ioregionfd blocking read/write operations Elena Afanasova
2020-12-29 12:00   ` Stefan Hajnoczi
2020-12-30 12:24     ` Elena Afanasova
2020-12-31  3:46   ` Jason Wang
2021-01-03 20:37     ` Elena Afanasova
2021-01-04  5:37       ` Jason Wang
2021-01-05  0:06         ` Elena Afanasova
2020-12-29 12:06 ` Stefan Hajnoczi [this message]
2020-12-30 17:56   ` [RFC 0/2] Introduce MMIO/PIO dispatch file descriptors (ioregionfd) Elena Afanasova

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=20201229120635.GD55616@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=eafanasova@gmail.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=jag.raman@oracle.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    /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).