From patchwork Thu Dec 20 05:40:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 10738539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C78536C2 for ; Thu, 20 Dec 2018 05:42:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEADF284D4 for ; Thu, 20 Dec 2018 05:42:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F2FF284F5; Thu, 20 Dec 2018 05:42:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 8DA4A284D4 for ; Thu, 20 Dec 2018 05:41:59 +0000 (UTC) Received: from localhost ([::1]:35400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZr5q-0004Gq-PR for patchwork-qemu-devel@patchwork.kernel.org; Thu, 20 Dec 2018 00:41:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZr4j-0003UG-JM for qemu-devel@nongnu.org; Thu, 20 Dec 2018 00:40:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZr4g-0005hn-Db for qemu-devel@nongnu.org; Thu, 20 Dec 2018 00:40:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32964) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZr4g-0005gm-7l for qemu-devel@nongnu.org; Thu, 20 Dec 2018 00:40:46 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 566C3356E5 for ; Thu, 20 Dec 2018 05:40:45 +0000 (UTC) Received: from xz-x1.nay.redhat.com (dhcp-14-116.nay.redhat.com [10.66.14.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BDC560462; Thu, 20 Dec 2018 05:40:38 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Thu, 20 Dec 2018 13:40:34 +0800 Message-Id: <20181220054037.24320-1-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 20 Dec 2018 05:40:45 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 0/3] q35: change defaults for kernel irqchip and IR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Paolo Bonzini , Eduardo Habkost , peterx@redhat.com, "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP v2: - drop patch 1, so we don't even need to consider old kernels for the default value [Paolo, Eduardo] - fix up commit message of the split irqchip patch to mention that ============= Original cover letter ================ This only changes q35. Nothing else. Before this series, we have these default parameters: - machine kernel-irqchip: on - intel-iommu IR: off This series wants to change these default variables into: - machine kernel-irqchip: split - intel-iommu IR: on and at the meantime we should keep compatibility with old kernels and old versions of QEMU. For old versions of QEMU: we used machine compat properties. For old kernels (<4.4): if user didn't specify split kernel irqchip, we'll take it only as the first priority if it's supported by the kernel; otherwise, we will continue with complete kernel irqchip. Both of these parameters should be good to have (split irqchip gains more security, while IR gets it too but even more, like x2apic). So let's try to make them as default if capable. Tests ("split" stands for whether kernel split irqchip enabled, "IR" stands for whether IR is turned on): |--------------------------------------------------------+-------+----| | params | split | IR | |--------------------------------------------------------+-------+----| | -M q35 | 0 | / | | -M q35,accel=kvm | 1 | / | | -M pc-q35-3.1,accel=kvm | 0 | / | | -M q35,accel=kvm,kernel-irqchip=off | 0 | / | | -M q35,accel=kvm,kernel-irqchip=on | 0 | / | | -M q35 -device intel-iommu | 0 | 1 | | -M q35,accel=kvm -device intel-iommu | 1 | 1 | | -M q35,accel=kvm,kernel-irqchip=on -device intel-iommu | 0 | 0 | |--------------------------------------------------------+-------+----| I didn't try old kernels, though. Any comment would be welcomed, thanks. Peter Xu (3): q35: set split kernel irqchip as default x86-iommu: switch intr_supported to OnOffAuto type x86-iommu: turn on IR by default if proper hw/core/machine.c | 2 ++ hw/i386/acpi-build.c | 6 +++--- hw/i386/amd_iommu.c | 2 +- hw/i386/intel_iommu.c | 6 +++--- hw/i386/pc.c | 2 +- hw/i386/pc_q35.c | 2 ++ hw/i386/x86-iommu.c | 18 +++++++++++++++--- include/hw/boards.h | 1 + include/hw/i386/x86-iommu.h | 4 +++- 9 files changed, 31 insertions(+), 12 deletions(-) Acked-by: Paolo Bonzini