From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlCpR-0005ep-M2 for qemu-devel@nongnu.org; Thu, 23 Apr 2015 04:49:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlCpO-0001wd-CJ for qemu-devel@nongnu.org; Thu, 23 Apr 2015 04:49:49 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:34669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlCpO-0001wS-6C for qemu-devel@nongnu.org; Thu, 23 Apr 2015 04:49:46 -0400 Received: by wicmx19 with SMTP id mx19so7446666wic.1 for ; Thu, 23 Apr 2015 01:49:44 -0700 (PDT) From: Eric Auger Date: Thu, 23 Apr 2015 09:49:35 +0100 Message-Id: <1429778977-1632-1-git-send-email-eric.auger@linaro.org> Subject: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback 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, peter.maydell@linaro.org, agraf@suse.de, pbonzini@redhat.com Cc: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, patches@linaro.org This series introduces a new callback function in IRQState, named get_gsi_cb. It is supposed to be populated by the interrupt controller and its role is to convert the interrupt controller pin number into the global system interrupt (gsi) number. The gsi is used when setting irqfd up. 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. Besides the callback member, a setter is introduced. First user is arm_gic_kvm. A public function wraps the callback, qemu_irq_get_gsi. The first user of qemu_irq_get_gsi might be the VFIO platform device. This will come in the "KVM platform device passthrough" series. Eric Auger (2): irq: add get_gsi callback intc: arm_gic_kvm: set the get_gsi callback hw/core/irq.c | 20 ++++++++++++++++++++ hw/intc/arm_gic_kvm.c | 10 ++++++++++ include/hw/irq.h | 8 ++++++++ 3 files changed, 38 insertions(+) -- 1.8.3.2