qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] pseries: enable irqfd for pci


From: Alexey Kardashevskiy
Subject: [Qemu-devel] [PATCH 2/2] pseries: enable irqfd for pci
Date: Wed, 7 Aug 2013 18:51:33 +1000

Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
 hw/intc/xics_kvm.c | 5 +++++
 hw/ppc/spapr_pci.c | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 1f078f3..9978a47 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -448,6 +448,11 @@ 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;
+
     return;
 
 fail:
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 6e14020..869ca43 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -457,6 +457,11 @@ static void spapr_msi_write(void *opaque, hwaddr addr,
     qemu_irq_pulse(xics_get_qirq(spapr->icp, irq));
 }
 
+static int spapr_pci_map_msi(KVMState *s, PCIBus *bus, MSIMessage msg)
+{
+    return msg.data;
+}
+
 static const MemoryRegionOps spapr_msi_ops = {
     /* There is no .read as the read result is undefined by PCI spec */
     .read = NULL,
@@ -631,6 +636,7 @@ static int spapr_phb_init(SysBusDevice *s)
 
         sphb->lsi_table[i].irq = irq;
     }
+    bus->map_msi = spapr_pci_map_msi;
 
     return 0;
 }
-- 
1.8.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]