@@ -87,6 +87,11 @@ static void kvm_arm_gic_set_irq(void *opaque, int irq, int level)
kvm_set_irq(kvm_state, kvm_irq, !!level);
}
+static int kvm_gic_get_gsi(int pin)
+{
+ return pin;
+}
+
static bool kvm_arm_gic_can_save_restore(GICState *s)
{
return s->dev_fd >= 0;
@@ -554,6 +559,11 @@ static void kvm_arm_gic_realize(DeviceState *dev, Error **errp)
*/
i += (GIC_INTERNAL * s->num_cpu);
qdev_init_gpio_in(dev, kvm_arm_gic_set_irq, i);
+
+ for (i = 0; i < s->num_irq - GIC_INTERNAL; i++) {
+ qemu_irq irq = qdev_get_gpio_in(dev, i);
+ qemu_irq_set_get_gsi_cb(irq, kvm_gic_get_gsi);
+ }
/* We never use our outbound IRQ lines but provide them so that
* we maintain the same interface as the non-KVM GIC.
*/
The arm_gic_kvm now sets the get_gsi_cb callback so that the global system interrupt of a qemu_irq can be retrieved. This enables VFIO platform signaling to be setup. Signed-off-by: Eric Auger <eric.auger@linaro.org> --- hw/intc/arm_gic_kvm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)