[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 14/14] spapr-pci: enable irqfd for INTx
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-devel] [PATCH v5 14/14] spapr-pci: enable irqfd for INTx |
Date: |
Thu, 26 Sep 2013 16:18:48 +1000 |
This enables IRQFD for LSI (level triggered INTx interrupts) by adding
a spapr_route_intx_pin_to_irq() callback to the sPAPR PCI host bus. This
callback is called to know the global interrupt number to link resampling fd
with IRQFD's fd in KVM.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
hw/ppc/spapr_pci.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 9b6ee32..edb4cb0 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -432,6 +432,17 @@ static void pci_spapr_set_irq(void *opaque, int irq_num,
int level)
qemu_set_irq(spapr_phb_lsi_qirq(phb, irq_num), level);
}
+static PCIINTxRoute spapr_route_intx_pin_to_irq(void *opaque, int pin)
+{
+ sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(opaque);
+ PCIINTxRoute route;
+
+ route.mode = PCI_INTX_ENABLED;
+ route.irq = sphb->lsi_table[pin].irq;
+
+ return route;
+}
+
/*
* MSI/MSIX memory region implementation.
* The handler handles both MSI and MSIX.
@@ -610,6 +621,8 @@ static int spapr_phb_init(SysBusDevice *s)
pci_setup_iommu(bus, spapr_pci_dma_iommu, sphb);
+ pci_bus_set_route_irq_fn(bus, spapr_route_intx_pin_to_irq);
+
QLIST_INSERT_HEAD(&spapr->phbs, sphb, list);
/* Initialize the LSI table */
--
1.8.4.rc4
- [Qemu-devel] [PATCH v5 00/14] xics: reworks and in-kernel support, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 10/14] xics-kvm: Support for in-kernel XICS interrupt controller, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 01/14] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 05/14] xics: add pre_save/post_load dispatchers, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 09/14] xics: add cpu_setup callback, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 03/14] spapr: move cpu_setup after kvmppc_set_papr, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 14/14] spapr-pci: enable irqfd for INTx,
Alexey Kardashevskiy <=
- [Qemu-devel] [PATCH v5 07/14] xics: add missing const specifiers to TypeInfo, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 04/14] xics: replace fprintf with error_report, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 06/14] xics: convert init() to realize(), Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 02/14] xics: move reset and cpu_setup, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 08/14] xics: split to xics and xics-common, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 11/14] xics: Implement H_IPOLL, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 12/14] xics: Implement H_XIRR_X, Alexey Kardashevskiy, 2013/09/26
- [Qemu-devel] [PATCH v5 13/14] xics-kvm: enable irqfd for MSI, Alexey Kardashevskiy, 2013/09/26