From patchwork Sun Feb 28 11:52:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rita Sinha X-Patchwork-Id: 8446001 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 B92399F314 for ; Sun, 28 Feb 2016 11:52:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1172A2034A for ; Sun, 28 Feb 2016 11:52:46 +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 6A48B20340 for ; Sun, 28 Feb 2016 11:52:45 +0000 (UTC) Received: from localhost ([::1]:58529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZzu0-0007cN-HW for patchwork-qemu-devel@patchwork.kernel.org; Sun, 28 Feb 2016 06:52:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZzts-0007c1-Ez for qemu-devel@nongnu.org; Sun, 28 Feb 2016 06:52:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZztp-0000nV-9Q for qemu-devel@nongnu.org; Sun, 28 Feb 2016 06:52:36 -0500 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]:35280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZztp-0000nM-1d for qemu-devel@nongnu.org; Sun, 28 Feb 2016 06:52:33 -0500 Received: by mail-pf0-x22d.google.com with SMTP id w128so30429651pfb.2 for ; Sun, 28 Feb 2016 03:52:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=get96dTDvWpqs7zenYKyR5CPGM6EPVfntFY4SGRTyjg=; b=hgkvnUtievx1Kmmk3i9vS1cbwrVAES6RuPd3W8ALIgnmg9Pil8tcloaZAoIvZ08T9I IK/shbZQqqPzRts1Bba4s2+GfSiTIbDmGsveqEA8O+2/WvlMFyo1LeR9RWFe72iq/GyU PYCGjg1CPleCKXE6gyN9/Ju0z2NJpZ0oDCmonxE2s+1uGB2LC1EsWCBgYFexZyyDCXJ3 vvYOVyqt48bdT8Hti20jrjir++Kxve892JJAyXSe9NWBhWxLb9WuQMg4fKx+uxGiiiq0 nDjb+oATbBcFBXRJ1GIR9PWo+D1/UNLMMsKf8/B3lNHJEvRoScx6iQjpRpH1bcwD9PuN yk0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=get96dTDvWpqs7zenYKyR5CPGM6EPVfntFY4SGRTyjg=; b=ER7IQZT3PHnjQeSICWz+x/za951knGyj4GveXkj6e1AloasLpyZ90GowVexNsowjQU +IVj1mWCFPyQS5mevbXAv2rH5s4Lg40U5s809NI4auB/uAieMfBlvZuJ/Via6GSDx/xU 4hAzfiLrwv2UxFao56vQvxqpJehGg9Zpg4bhT+ugZYTRmUUDEGIzYOoAdRcAiTsWDR60 g4bRIU2osXYxyhuYsm6iR+Boy2XUYCuQiTf0kl36pUSGZisEgzhFkzmR8hY/rmXQWqaZ ZIy+ZcAxSpyuQM8zUAUbi/om8+DtKDCrHutq+VHD/uESBvQbr4wpEsnXIJQHR6ffhNf+ B8ig== X-Gm-Message-State: AD7BkJLD0vdhSyHKZE9A69HiCd29D7I5whpup3wNmjF2zDUlCdxIlMH8yfelXIftgOSq7Q== X-Received: by 10.98.69.78 with SMTP id s75mr15107183pfa.102.1456660351884; Sun, 28 Feb 2016 03:52:31 -0800 (PST) Received: from localhost.localdomain ([103.18.72.56]) by smtp.googlemail.com with ESMTPSA id p9sm31039149pfa.11.2016.02.28.03.52.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Feb 2016 03:52:31 -0800 (PST) From: Rita Sinha To: qemu-devel@nongnu.org Date: Sun, 28 Feb 2016 17:22:26 +0530 Message-Id: <1456660346-29148-1-git-send-email-rita.sinha89@gmail.com> X-Mailer: git-send-email 2.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22d Cc: pbonzini@redhat.com, jan.kiszka@web.de, gingell@google.com, stefanha@gmail.com Subject: [Qemu-devel] [PATCH] 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 The split IRQ chip mode via KVM_CAP_SPLIT_IRQCHIP was introduced with commit 15eafc2e602ff8c37c6e132eb8c63fec8fc17175 but was broken for q35. This patch makes kernel_irqchip=split functional for q35. --- 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 46522c9..ff6a5af 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" @@ -145,7 +146,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); @@ -192,7 +193,7 @@ static void pc_q35_init(MachineState *machine) /*end early*/ isa_bus_irqs(isa_bus, gsi); - if (kvm_irqchip_in_kernel()) { + if (kvm_pit_in_kernel()) { i8259 = kvm_i8259_init(isa_bus); } else if (xen_enabled()) { i8259 = xen_interrupt_controller_init();