From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnnuO-0007jw-CA for qemu-devel@nongnu.org; Thu, 30 Apr 2015 08:49:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnnuJ-0006Fp-OP for qemu-devel@nongnu.org; Thu, 30 Apr 2015 08:49:40 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:33600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnnuJ-0006Fk-JW for qemu-devel@nongnu.org; Thu, 30 Apr 2015 08:49:35 -0400 Received: by wgin8 with SMTP id n8so61073734wgi.0 for ; Thu, 30 Apr 2015 05:49:35 -0700 (PDT) From: Eric Auger Date: Thu, 30 Apr 2015 13:49:13 +0100 Message-Id: <1430398155-11214-9-git-send-email-eric.auger@linaro.org> In-Reply-To: <1430398155-11214-1-git-send-email-eric.auger@linaro.org> References: <1430398155-11214-1-git-send-email-eric.auger@linaro.org> Subject: [Qemu-devel] [PATCH v15 08/10] intc: arm_gic_kvm: set the qemu_irq/gsi mapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, agraf@suse.de, pbonzini@redhat.com, peter.crosthwaite@xilinx.com Cc: peter.maydell@linaro.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, patches@linaro.org The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build the hash table storing qemu_irq/gsi mappings. From that point on irqfd can be setup directly from the qemu_irq using kvm_irqchip_add_irqfd_notifier. Signed-off-by: Eric Auger --- v2 -> v3: - kvm_irqchip_add_qemuirq_irqfd_notifier renamed into kvm_irqchip_add_irqfd_notifier --- hw/intc/arm_gic_kvm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index e1952ad..28506e3 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -554,6 +554,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); + kvm_irqchip_set_qemuirq_gsi(kvm_state, irq, i); + } /* We never use our outbound IRQ lines but provide them so that * we maintain the same interface as the non-KVM GIC. */ -- 1.8.3.2