Patchwork [v5,13/14] xics-kvm: enable irqfd for MSI

login
register
mail settings
Submitter Alexey Kardashevskiy
Date Sept. 26, 2013, 6:18 a.m.
Message ID <1380176328-21320-14-git-send-email-aik@ozlabs.ru>
Download mbox | patch
Permalink /patch/278125/
State New
Headers show

Comments

Alexey Kardashevskiy - Sept. 26, 2013, 6:18 a.m.
This enables IRQFD support for sPAPR. The feature decreases the latency
of interrupt handling.

To enable IRQFD for MSI, this sets kvm_gsi_direct_mapping to true which
enables direct MSI mapping.

To enable IRQFD for LSI (level triggered INTx interrupts), a PCI host bus
callback is required. The patch for that is coming next.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/intc/xics_kvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index a2ccafa..c203646 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -441,6 +441,12 @@  static void xics_kvm_realize(DeviceState *dev, Error **errp)
             goto fail;
         }
     }
+
+    kvm_kernel_irqchip = true;
+    kvm_irqfds_allowed = true;
+    kvm_msi_via_irqfd_allowed = true;
+    kvm_gsi_direct_mapping = true;
+
     return;
 
 fail: