From patchwork Tue Mar 15 17:35:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8590841 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E28CE9F6E1 for ; Tue, 15 Mar 2016 17:36:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EA9F20204 for ; Tue, 15 Mar 2016 17:36:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2191C2021B for ; Tue, 15 Mar 2016 17:36:09 +0000 (UTC) Received: from localhost ([::1]:50276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afst6-0007D3-Gr for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Mar 2016 13:36:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afssI-0006Ea-74 for qemu-devel@nongnu.org; Tue, 15 Mar 2016 13:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afssG-0003lo-AH for qemu-devel@nongnu.org; Tue, 15 Mar 2016 13:35:18 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:34825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afssG-0003lc-3j for qemu-devel@nongnu.org; Tue, 15 Mar 2016 13:35:16 -0400 Received: by mail-wm0-x236.google.com with SMTP id l68so159973092wml.0 for ; Tue, 15 Mar 2016 10:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=39LxVWWcPIfCpcj8pchnwFt6d5/F5j9NouplqX46V/8=; b=jOChGGhpD3d0l1uXzbNzozASOGlhkdVf65rWwDVhIjUvFL4gU3T/YIrNyp2g7KDM6r p6j4o8dwJV/amSYvWTH7k9++oDt0GNh18wWgYnurJmqHV3R7g1Nnii4mSk2UhdbB5z+k k0obKFvFYGVJHbETSHViZ4fKHJwGYM468UyANbMSRyx7qTR7zUlCgY5yVXj2KyGi7GfQ R6KhxuzsO1MWrEKHY/zMOWtwieT0oqqfyyVsyvyCZf4LrFe3NFi55OKXVITbx2PEwSsy UkUXgXQyoDD0OI20TQb1Al3nYIlUzJbg1d0HBMItJwRpjLQ1gFrIHF7piM9iVAaHmNtG UA+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=39LxVWWcPIfCpcj8pchnwFt6d5/F5j9NouplqX46V/8=; b=NQvTxuA2j9J0PipC2Y0mntkRthWaQBYwl9AIKauM9YkKtkdOmpyk30KSFg3hiJz5Iu 0WTUZp+Y7f2mLW4N+iIT/jOGWC9OP/Z5eYxWYJmQ001elxPE+NMefsyAQjUQnKkjhTVs w2P8NjOyJfKWP5Znl91ITlmgkvEKxx+Ii3iV2eAe7VIyoaKLyKLF9+H8oeRwPTA9yK9Y nVnnEXlujmll7Cs1ncpehFfneXSsGKfsTu0h8OHCP+ZgDvfASimuTqtop7Xs7BXgEuOx fTNQsvGiLt7sS1cL8gk+GFJakGY9K/0JoMk/d8HRnfYEtiHNfgpPdQ9wZdpk6l/a//N7 HS8Q== X-Gm-Message-State: AD7BkJIGFzPga+BL3gxykmRkB7hrfA+IpQM4043WtJd2smp4ifQ06xFkpb8n2pXvbJa1FA== X-Received: by 10.194.60.200 with SMTP id j8mr31326973wjr.124.1458063315472; Tue, 15 Mar 2016 10:35:15 -0700 (PDT) Received: from 640k.lan (94-39-161-17.adsl-ull.clienti.tiscali.it. [94.39.161.17]) by smtp.gmail.com with ESMTPSA id z127sm21827680wme.5.2016.03.15.10.35.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Mar 2016 10:35:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 15 Mar 2016 18:35:03 +0100 Message-Id: <1458063310-128525-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1458063310-128525-1-git-send-email-pbonzini@redhat.com> References: <1458063310-128525-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::236 Cc: Rita Sinha Subject: [Qemu-devel] [PULL 1/8] kvm: x86: q35: Add support for -machine kernel_irqchip=split for q35 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rita Sinha The split IRQ chip mode via KVM_CAP_SPLIT_IRQCHIP was introduced with commit 15eafc2e60 but was broken for q35. This patch makes kernel_irqchip=split functional for q35. Signed-off-by: Rita Sinha Message-Id: <1457378525-16455-1-git-send-email-rita.sinha89@gmail.com> Reviewed-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- hw/i386/pc_q35.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 17915b0..9ee939b 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -39,6 +39,7 @@ #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" #include "exec/address-spaces.h" +#include "hw/i386/pc.h" #include "hw/i386/ich9.h" #include "hw/smbios/smbios.h" #include "hw/ide/pci.h" @@ -146,7 +147,7 @@ static void pc_q35_init(MachineState *machine) /* irq lines */ gsi_state = g_malloc0(sizeof(*gsi_state)); - if (kvm_irqchip_in_kernel()) { + if (kvm_ioapic_in_kernel()) { kvm_pc_setup_irq_routing(pcmc->pci_enabled); gsi = qemu_allocate_irqs(kvm_pc_gsi_handler, gsi_state, GSI_NUM_PINS); @@ -193,7 +194,7 @@ static void pc_q35_init(MachineState *machine) /*end early*/ isa_bus_irqs(isa_bus, gsi); - if (kvm_irqchip_in_kernel()) { + if (kvm_pic_in_kernel()) { i8259 = kvm_i8259_init(isa_bus); } else if (xen_enabled()) { i8259 = xen_interrupt_controller_init();