The VFIO platform needs to setup irqfd but it does not know the gsi associated
to the sysbus device qemu_irq.

With PCI there is a PCIINTxRoute bus lookup mechanism that enables to
retrieve the gsi from the PCI host controller/bridge pin. The conversion
is implemented by the PCI host controller. With platform devices, this
conversion function is implemented by the interrupt controller.

This series implements a hash table in kvm-all that stores the mapping
between qemu_irq and gsi. A setter is introduced for the interrupt controller
to insert mappings. Also functions are added to setup/tear down irqfd directly
from a qemu_irq. Those functions now can be used by the VFIO platform device
to setup VFIO signaling.

v1 -> v2:
- series renamed from "irq: add get_gsi callback"
- follow implementation suggested by Paolo (hope I fully understood it)

Eric Auger (2):
  kvm-all.c: add qemu_irq/gsi hash table and utility routines
  intc: arm_gic_kvm: set the qemu_irq/gsi mapping

 hw/intc/arm_gic_kvm.c |  5 +++++
 include/sysemu/kvm.h  |  6 ++++++
 kvm-all.c             | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+)

-- 
1.8.3.2

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Reply via email to