From: Elena Afanasova <eafanasova@gmail.com>
To: kvm@vger.kernel.org
Cc: stefanha@redhat.com, jag.raman@oracle.com,
elena.ufimtseva@oracle.com,
Elena Afanasova <eafanasova@gmail.com>
Subject: [RFC 0/2] Introduce MMIO/PIO dispatch file descriptors (ioregionfd)
Date: Tue, 29 Dec 2020 13:02:42 +0300 [thread overview]
Message-ID: <cover.1609231373.git.eafanasova@gmail.com> (raw)
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?
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
next reply other threads:[~2020-12-29 10:10 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-29 10:02 Elena Afanasova [this message]
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 ` [RFC 0/2] Introduce MMIO/PIO dispatch file descriptors (ioregionfd) Stefan Hajnoczi
2020-12-30 17:56 ` 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=cover.1609231373.git.eafanasova@gmail.com \
--to=eafanasova@gmail.com \
--cc=elena.ufimtseva@oracle.com \
--cc=jag.raman@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=stefanha@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