Re: [RFC v2 0/4] Introduce MMIO/PIO dispatch file descriptors (ioregionfd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2021/1/29 上午2:32, 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.

TODOs:
* Implement KVM_EXIT_IOREGIONFD_FAILURE
* Add non-x86 arch support
* Add kvm-unittests


It would be better to log the changes between versions to ease the reviewers.

Tanks



Elena Afanasova (4):
   KVM: add initial support for KVM_SET_IOREGION
   KVM: x86: add support for ioregionfd signal handling
   KVM: add support for ioregionfd cmds/replies serialization
   KVM: enforce NR_IOBUS_DEVS limit if kmemcg is disabled

  arch/x86/kvm/Kconfig          |   1 +
  arch/x86/kvm/Makefile         |   1 +
  arch/x86/kvm/x86.c            | 216 ++++++++++++++-
  include/kvm/iodev.h           |  14 +
  include/linux/kvm_host.h      |  34 +++
  include/uapi/linux/ioregion.h |  32 +++
  include/uapi/linux/kvm.h      |  23 ++
  virt/kvm/Kconfig              |   3 +
  virt/kvm/eventfd.c            |  25 ++
  virt/kvm/eventfd.h            |  14 +
  virt/kvm/ioregion.c           | 479 ++++++++++++++++++++++++++++++++++
  virt/kvm/ioregion.h           |  15 ++
  virt/kvm/kvm_main.c           |  68 ++++-
  13 files changed, 905 insertions(+), 20 deletions(-)
  create mode 100644 include/uapi/linux/ioregion.h
  create mode 100644 virt/kvm/eventfd.h
  create mode 100644 virt/kvm/ioregion.c
  create mode 100644 virt/kvm/ioregion.h





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux