From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6zTS-0005Ym-9g for qemu-devel@nongnu.org; Wed, 07 Aug 2013 04:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6zTJ-00017r-Kr for qemu-devel@nongnu.org; Wed, 07 Aug 2013 04:52:06 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6zTJ-00017C-FF for qemu-devel@nongnu.org; Wed, 07 Aug 2013 04:51:57 -0400 Received: by mail-pa0-f41.google.com with SMTP id bj1so1921652pad.0 for ; Wed, 07 Aug 2013 01:51:56 -0700 (PDT) From: Alexey Kardashevskiy Date: Wed, 7 Aug 2013 18:51:33 +1000 Message-Id: <1375865493-19143-3-git-send-email-aik@ozlabs.ru> In-Reply-To: <1375865493-19143-1-git-send-email-aik@ozlabs.ru> References: <1375865493-19143-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH 2/2] pseries: enable irqfd for pci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , "Michael S . Tsirkin" , Alexey Kardashevskiy , Alexander Graf , Alex Williamson , qemu-ppc@nongnu.org, Paolo Bonzini , Paul Mackerras Signed-off-by: Alexey Kardashevskiy --- 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