From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlIkF-00055W-LT for qemu-devel@nongnu.org; Thu, 23 Apr 2015 11:08:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlIkB-0002xB-6t for qemu-devel@nongnu.org; Thu, 23 Apr 2015 11:08:51 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:37468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlIkB-0002x3-16 for qemu-devel@nongnu.org; Thu, 23 Apr 2015 11:08:47 -0400 Received: by widdi4 with SMTP id di4so96020356wid.0 for ; Thu, 23 Apr 2015 08:08:46 -0700 (PDT) From: Eric Auger Date: Thu, 23 Apr 2015 16:08:34 +0100 Message-Id: <1429801716-8027-1-git-send-email-eric.auger@linaro.org> Subject: [Qemu-devel] [PATCH v2 0/2] add qemu_irq/gsi hashtable 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, peter.maydell@linaro.org, agraf@suse.de, pbonzini@redhat.com Cc: alex.williamson@redhat.com, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, patches@linaro.org 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