From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS Date: Tue, 05 Aug 2014 14:27:05 +0200 Message-ID: <53E0CD99.9020906@redhat.com> References: <1404125474-18611-1-git-send-email-paulus@samba.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , Alexander Graf , Eric Auger To: Paul Mackerras , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: Received: from mail-wi0-f175.google.com ([209.85.212.175]:35046 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752615AbaHEM1O (ORCPT ); Tue, 5 Aug 2014 08:27:14 -0400 In-Reply-To: <1404125474-18611-1-git-send-email-paulus@samba.org> Sender: kvm-owner@vger.kernel.org List-ID: Il 30/06/2014 12:51, Paul Mackerras ha scritto: > This series of patches provides a way to implement IRQFD support > without having to implement IRQ routing, and adds IRQFD support for > the XICS interrupt controller emulation. (XICS is the interrupt > controller defined for the pSeries machine type, used on IBM POWER > servers). > > The basic approach is to make it easy for code other than irqchip.c to > provide a mapping from a global interrupt number (GSI) to an irq > routing entry (struct kvm_kernel_irq_routing_entry). To make the > lifetime of this routing entry easier to manage, we change the IRQFD > code to keep a copy of the routing entry (for the MSI fast-path case) > rather than a pointer to the routing entry. Since the copy can't be > updated atomically, we add a seqcount_t to make sure that when reading > it we get a copy that hasn't been half-way updated. > > Next we replace the hard-coded accesses outside irqchip.c to the > fields of the kvm_irq_routing_table struct with calls to accessor > functions in irqchip.c, namely kvm_irq_map_gsi() and > kvm_irq_map_chip_pin(). That enables us to move all references to the > kvm_irq_routing_table struct, and the definition of that struct, into > irqchip.c. > > Then we move the irq notifier implementation from irqchip.c into > eventfd.c and add a separate Kconfig option to enable IRQFD. With > that we can enable IRQFD without irq routing, which we achieve by > compiling in eventfd.c but not irqchip.c, and providing an alternative > implementation of kvm_irq_map_gsi() and kvm_irq_map_chip_pin(). > > The last patch does that for XICS. With this series I can use > vhost-net with KVM guests, and I see the TCP bandwidth between guest > and host on a POWER8 machine go from around 700MB/s to over 2GB/s. > > I would like to see this go into 3.17. > > arch/ia64/kvm/Kconfig | 1 + > arch/powerpc/kvm/Kconfig | 3 + > arch/powerpc/kvm/book3s_hv_rm_xics.c | 5 ++ > arch/powerpc/kvm/book3s_xics.c | 55 +++++++++++--- > arch/powerpc/kvm/book3s_xics.h | 2 + > arch/powerpc/kvm/mpic.c | 4 +- > arch/s390/kvm/Kconfig | 1 + > arch/s390/kvm/interrupt.c | 3 +- > arch/x86/kvm/Kconfig | 1 + > include/linux/kvm_host.h | 43 ++++------- > virt/kvm/Kconfig | 3 + > virt/kvm/eventfd.c | 134 ++++++++++++++++++++++++++--------- > virt/kvm/irq_comm.c | 24 +++---- > virt/kvm/irqchip.c | 98 ++++++++++--------------- > virt/kvm/kvm_main.c | 2 +- > 15 files changed, 227 insertions(+), 152 deletions(-) > Applied for 3.17, thanks Eric and Cornelia for testing. Paolo