@@ -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:
@@ -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;
}
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> --- hw/intc/xics_kvm.c | 5 +++++ hw/ppc/spapr_pci.c | 6 ++++++ 2 files changed, 11 insertions(+)