kvm-all.c: add qemu_irq/gsi hash table and utility routines
commit197e35249a7360534e1aea0f2268ad0e1aa27121
authorEric Auger <eric.auger@linaro.org>
Mon, 6 Jul 2015 18:15:13 +0000 (6 12:15 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 6 Jul 2015 18:15:13 +0000 (6 12:15 -0600)
tree7c64000a44ac3e30564fa60e90070bb3c44666be
parent1c9b71a7311ed99635a2d007fc8a856879537a05
kvm-all.c: add qemu_irq/gsi hash table and utility routines

VFIO platform device needs to setup irqfd but it does not know the
gsi corresponding to the device qemu_irq. This patch proposes to
store a hash table in kvm_state using the qemu_irq as key and the gsi
as a value.

kvm_irqchip_set_qemuirq_gsi allows to insert such a pair. The interrupt
controller is supposed to use it.

kvm_irqchip_[add, remove]_irqfd_notifier allows to setup/tear down
irqfd directly from the qemu_irq.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Tested-by: Vikram Sethi <vikrams@codeaurora.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
include/sysemu/kvm.h
kvm-all.c