public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] RFC: virtual device as irq injection interface
@ 2009-05-31 18:58 Michael S. Tsirkin
  2009-05-31 19:40 ` Avi Kivity
  0 siblings, 1 reply; 9+ messages in thread
From: Michael S. Tsirkin @ 2009-05-31 18:58 UTC (permalink / raw)
  To: Gregory Haskins, kvm, avi, mtosatti

As promised, here's a (compile-tested only) patchset that proposes
an alternative interrupt injection interface, not using eventfd.

The idea here is that we give user the ability to create "virtual
device" file descriptors from kvm context, and bind them to in-kernel
drivers. One kind of such device would be virt_irq which let the user
inject interrupts. This seems to solve all potential lifetime
and locking issues because we control file_operations for both kvm fd
and the device(irq) fd.

Another kind of device could be kernel-level virtio_net_host implementation
(which is really why I started writing this code).

As an attempt to make virtual devices more useful, they actually use an
abstract virt_hypervisor interface.  I have currently only implemented
it in kvm, but it will be possible to have lguest implement it as well,
and then lguest will be able to use e.g. in-kernel virtio-net.

Let's discuss whether we want this, or eventfd, or both.

-- 
MST


Michael S. Tsirkin (3):
  virt-core: binding together drivers and hypervisors
  kvm: virtual device support
  virt_irq: virtual device for injecting interrupts

 arch/x86/kvm/Kconfig     |    1 +
 drivers/Makefile         |    1 +
 drivers/virt/Kconfig     |   11 +++++
 drivers/virt/Makefile    |    2 +
 drivers/virt/virt_core.c |  111 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/virt/virt_irq.c  |   78 ++++++++++++++++++++++++++++++++
 include/linux/kvm.h      |   13 +++++
 include/linux/kvm_host.h |    3 +
 include/linux/virt.h     |   94 +++++++++++++++++++++++++++++++++++++++
 include/linux/virt_irq.h |   19 ++++++++
 virt/kvm/kvm_main.c      |   47 +++++++++++++++++++
 11 files changed, 380 insertions(+), 0 deletions(-)
 create mode 100644 drivers/virt/Kconfig
 create mode 100644 drivers/virt/Makefile
 create mode 100644 drivers/virt/virt_core.c
 create mode 100644 drivers/virt/virt_irq.c
 create mode 100644 include/linux/virt.h
 create mode 100644 include/linux/virt_irq.h

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-06-01 12:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-31 18:58 [PATCH 0/3] RFC: virtual device as irq injection interface Michael S. Tsirkin
2009-05-31 19:40 ` Avi Kivity
2009-05-31 20:10   ` Michael S. Tsirkin
2009-05-31 20:30     ` Avi Kivity
2009-06-01  4:18       ` Michael S. Tsirkin
2009-06-01  7:45         ` Avi Kivity
2009-06-01 12:00         ` Gregory Haskins
2009-06-01 12:04           ` Avi Kivity
2009-06-01 12:14             ` Gregory Haskins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox