From patchwork Mon Mar 7 19:22:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rita Sinha X-Patchwork-Id: 8521731 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 E774E9F7CA for ; Mon, 7 Mar 2016 19:22:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DCBF2027D for ; Mon, 7 Mar 2016 19:22:30 +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 9FAA620254 for ; Mon, 7 Mar 2016 19:22:29 +0000 (UTC) Received: from localhost ([::1]:57862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad0jc-000234-Pn for patchwork-qemu-devel@patchwork.kernel.org; Mon, 07 Mar 2016 14:22:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad0jP-00021j-9B for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:22:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ad0jM-0002we-1D for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:22:15 -0500 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]:34690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad0jL-0002wM-Pn for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:22:11 -0500 Received: by mail-pa0-x243.google.com with SMTP id hj7so8228152pac.1 for ; Mon, 07 Mar 2016 11:22:11 -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=obIiyKGV0qAvBYezRJkpR3rLlp7ebu05Mjo/ZADnXnc=; b=sB1G7JlkpjCQJynAzrhwffssYFeRKaP5FPdtQMG+CQuPOC5SBI/uGSz2sWE0NPZSn6 NgLeY1+rjS5ZwRvNtHWz1S5YYtMe44uirBO51PGNV/pNUFakxeiZWhGa0YpK0NYS2kpv DmnqUAIpbogrHd9E1bZ7qo51YPJv7R7qNap2ZTNdd6wFtW486irvWH4O4Y/3sslcsy4L At7QEfCzSL5qZIrHLDlhbgXUrn0F3o0XhtDJwXJqvnq8Y+VcQnkGuuQitbewGewInPyv FnooDsKJZaBuipJ0odCiUJK6x60DgSAI73qW6kTtMnu5VUXXfRb1rjNNYYykmS5s5y7x rAVQ== 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=obIiyKGV0qAvBYezRJkpR3rLlp7ebu05Mjo/ZADnXnc=; b=XLl0f5aXrVUYMiLR5xSjsAS3P9rwm3KMhREgDJVzJY2LE4E0mcoXtK1EtSNKUT5lR/ rxdyV+nAE7q7AOfKlOkzsBAC0RUixnhFACtKeXrljqVnGvkHzbmXzdu/wHT4sybSqOyE GA+JH1BdtK+qgq16W0fLmpnUD8sXuJxZM0LG5U5VebESIOttkzvPXEvsGAMW58s5OkqI 2AVVpa3f/tpNBZNtaSp0kag321+mK5tduRghgSZbmhejP7uc1JaBBkMK3GElLWIDIE8G p0+Os2jmfLwEVMaiSHtTBfdE6wM/JDDfjaGRWqzOiS3uiwI1Q+Px7XubaZnmmzZWKG57 288g== X-Gm-Message-State: AD7BkJIIq3sldt/w+D5V2t4M+oj4a3xCaoVLPqdaZ1qaud64eMOk8E5TJKW6K5fkk7n0Lg== X-Received: by 10.66.102.106 with SMTP id fn10mr36316807pab.60.1457378530752; Mon, 07 Mar 2016 11:22:10 -0800 (PST) Received: from localhost.localdomain ([103.18.72.56]) by smtp.googlemail.com with ESMTPSA id 82sm12064895pfb.64.2016.03.07.11.22.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Mar 2016 11:22:10 -0800 (PST) From: Rita Sinha To: qemu-devel@nongnu.org Date: Tue, 8 Mar 2016 00:52:05 +0530 Message-Id: <1457378525-16455-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:c03::243 Cc: pbonzini@redhat.com, jan.kiszka@web.de Subject: [Qemu-devel] [PATCH v2] 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=-5.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,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 15eafc2e60 but was broken for q35. This patch makes kernel_irqchip=split functional for q35. Signed-off-by: Rita Sinha Reviewed-by: Jan Kiszka --- 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..fcc127b 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_pic_in_kernel()) { i8259 = kvm_i8259_init(isa_bus); } else if (xen_enabled()) { i8259 = xen_interrupt_controller_init();