From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu5Wg-0007gK-2u for qemu-devel@nongnu.org; Wed, 04 Nov 2015 16:23:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zu5Wc-0006Nu-4h for qemu-devel@nongnu.org; Wed, 04 Nov 2015 16:23:26 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:35540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu5Wb-0006Nn-U2 for qemu-devel@nongnu.org; Wed, 04 Nov 2015 16:23:22 -0500 Received: by wmll128 with SMTP id l128so125342084wml.0 for ; Wed, 04 Nov 2015 13:23:21 -0800 (PST) Sender: Paolo Bonzini References: From: Paolo Bonzini Message-ID: <563A7742.3020306@redhat.com> Date: Wed, 4 Nov 2015 22:23:14 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC v2] Add support for KVM_CAP_SPLIT_IRQCHIP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matt Gingell , qemu-devel@nongnu.org, jan.kiszka@web.de On 02/11/2015 22:19, Matt Gingell wrote: > Hi Jan, > > Would you be able to look this over? I’d like to get this into shape to commit, > either now or once the corresponding kernel patch goes in. > > Thanks, > Matt > > Add support for KVM_CAP_SPLIT_IRQCHIP > > Adds a new alternative 'split' to the -machine kernel-irqchip option. > When split mode is specified: > > 1.) KVM_CAP_SPLIT_IRQCHIP is enabled. > > 2.) The PIC, PIT, and IOAPIC are implemented in userspace while the > LAPIC is implemented by KVM. > > 3.) The software IOAPIC delivers interrupts to the KVM LAPIC via > kvm_set_irq. Interrupt delivery is configured via the MSI routing > table, for which routes are reserved in target-i386/kvm.c then > configured in hw/intc/ioapic.c > > 4.) KVM delivers IOAPIC EOIs via a new exit KVM_EXIT_IOAPIC_EOI, > which is handled in target-i386/kvm.c and relayed to the software > IOAPIC via ioapic_eoi_broadcast. I had looked at v1, and there was nothing surprising. I was travelling and couldn't comment immediately. I only have a couple of notes: 1) the kvm_*_in_kernel() rename should be a separate patch; 2) this: + if (machine_kernel_irqchip_split(machine)) { + ret = kvm_vm_enable_cap(s, KVM_CAP_SPLIT_IRQCHIP, 0, 24); + if (ret) { + error_report("Could not enable split irqchip mode: %s\n", + strerror(-ret)); and "bool kvm_split_irqchip" should go in target-i386/kvm.c, using the existing kvm_arch_irqchip_create hook; 3) other arches than i386 should reject kernel_irqchip=split. More importantly, I would like to understand what is the kernel issue that you are getting. It should be resolved before 4.4 goes out in two months, of course. Paolo