Skip to content

Threaded MSI interrupt for VFIO PCI device

Yunhong Jiang kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: Extract the irqfd_wakeup_pollin/irqfd_wakeup_pollupvirt/kvm/eventfd.c+51 -350 replies
2/5VIRT: Support runtime irq_bypass consumerinclude/linux/irqbypass.h virt/lib/irqbypass.c+69 -211 reply
3/5VFIO: Support threaded interrupt handling on VFIOdrivers/vfio/pci/vfio_pci_intrs.c+34 -51 reply
4/5KVM: Add the irq handling consumerinclude/linux/kvm_irqfd.h virt/kvm/eventfd.c+43 -00 replies
5/5KVM: Expose x86 kvm_arch_set_irq_inatomic()arch/x86/kvm/Kconfig include/linux/kvm_host.h virt/kvm/Kconfig +1 more+20 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Threaded MSI interrupt for VFIO PCI device

When assigning a VFIO device to a KVM guest with low latency requirement, it is better to handle the interrupt in the hard interrupt context, to reduce the context switch to/from the IRQ thread.

Based on discussion on https://lkml.org/lkml/2015/10/26/764, the VFIO msi interrupt is changed to use request_threaded_irq(). The primary interrupt handler tries to set the guest interrupt atomically. If it fails to achieve it, a threaded interrupt handler will be invoked.

The irq_bypass manager is extended for this purpose. The KVM eventfd will provide a irqbypass consumer to handle the interrupt at hard interrupt context. The producer will invoke the consumer's handler then.

Yunhong Jiang (5):
Extract the irqfd_wakeup_pollin/irqfd_wakeup_pollup Support runtime irq_bypass consumer
Support threaded interrupt handling on VFIO Add the irq handling consumer
Expose x86 kvm_arch_set_irq_inatomic()

 arch/x86/kvm/Kconfig              |   1 +
 drivers/vfio/pci/vfio_pci_intrs.c |  39 ++++++++++--
 include/linux/irqbypass.h         |   8 +++
 include/linux/kvm_host.h          |  19 +++++-
 include/linux/kvm_irqfd.h         |   1 +
 virt/kvm/Kconfig                  |   3 +
 virt/kvm/eventfd.c                | 131 ++++++++++++++++++++++++++------------
 virt/lib/irqbypass.c              |  82 ++++++++++++++++++------
 8 files changed, 214 insertions(+), 70 deletions(-)
Signature · 1 line
1.8.3.1