From nobody Fri Apr 19 17:21:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557859916; cv=none; d=zoho.com; s=zohoarc; b=JZ+C1DvTtHygF10rgFk3pTLtCkg7ra5JHVpnznhUH0eR42eU5vkKto6Ze408WTnqU6DPZi3XRF+1Zur7hItg5QZhhTLMIgk+Su4U1BSMqZrBU1uxXO2yF9qddGJAhcb2jbbZAOwdWTZk4vWH/LmRf+ZUd0/g1wI9KnC/8xIi3Zk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557859916; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=HvTIJdKAFvYJY0f22/Ek24gZACmgswDzqtUG1dPJ/LQ=; b=XZStYEUg5BYWKsyjfaW/ArMT3JVoedZdI8YoP4eb9vWtPx+i61L48MhrS5Wav3WLeQUwymUTRNcj98PFfVUrzZYBERqi7GLgn7FdPw4rtshOtboim06q7cEckeDfvGnKJYTEUlN/953tldrZR4PqIvSdy8lNQJodVen+7zT1NBk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557859916839357.6063920212075; Tue, 14 May 2019 11:51:56 -0700 (PDT) Received: from localhost ([127.0.0.1]:52634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQcWn-0003uH-VH for importer@patchew.org; Tue, 14 May 2019 14:51:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQcS0-0000oE-Vb for qemu-devel@nongnu.org; Tue, 14 May 2019 14:46:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQcRz-00026D-VI for qemu-devel@nongnu.org; Tue, 14 May 2019 14:46:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49274) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQcRz-00025W-Q7 for qemu-devel@nongnu.org; Tue, 14 May 2019 14:46:55 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C84EF81F1B; Tue, 14 May 2019 18:46:54 +0000 (UTC) Received: from gimli.home (ovpn-117-92.phx2.redhat.com [10.3.117.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4DA625C28E; Tue, 14 May 2019 18:46:47 +0000 (UTC) From: Alex Williamson To: qemu-devel@nongnu.org Date: Tue, 14 May 2019 12:46:47 -0600 Message-ID: <155785957030.10526.15982471144880782730.stgit@gimli.home> User-Agent: StGit/0.19-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 14 May 2019 18:46:54 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-4.1] q35: Revert to kernel irqchip 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: ehabkost@redhat.com, mst@redhat.com, peterx@redhat.com, pbonzini@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed the default for the pc-q35-4.0 machine type to use split irqchip, which turned out to have disasterous effects on vfio-pci INTx support. KVM resampling irqfds are registered for handling these interrupts, but these are non-functional in split irqchip mode. We can't simply test for split irqchip in QEMU as userspace handling of this interrupt is a significant performance regression versus KVM handling (GeForce GPUs assigned to Windows VMs are non-functional without forcing MSI mode or re-enabling kernel irqchip). The resolution is to revert the change in default irqchip mode in the pc-q35-4.1 machine type. The qemu-q35-4.0 machine type should not be used in vfio-pci configurations for devices requiring legacy INTx support without explicitly modifying the VM configuration to use KVM irqchip. A new pc-q35-4.0.1 machine type is submitted to resolve this in the stable branch. Link: https://bugs.launchpad.net/qemu/+bug/1826422 Fixes: b2fc91db8447 ("q35: set split kernel irqchip as default") Signed-off-by: Alex Williamson --- hw/i386/pc_q35.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 37dd350511a9..9f90dc72a53f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -357,7 +357,7 @@ static void pc_q35_machine_options(MachineClass *m) m->units_per_default_bus =3D 1; m->default_machine_opts =3D "firmware=3Dbios-256k.bin"; m->default_display =3D "std"; - m->default_kernel_irqchip_split =3D true; + m->default_kernel_irqchip_split =3D false; m->no_floppy =3D 1; machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE); @@ -377,6 +377,7 @@ DEFINE_Q35_MACHINE(v4_1, "pc-q35-4.1", NULL, static void pc_q35_4_0_machine_options(MachineClass *m) { pc_q35_4_1_machine_options(m); + m->default_kernel_irqchip_split =3D true; m->alias =3D NULL; compat_props_add(m->compat_props, hw_compat_4_0, hw_compat_4_0_len); compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len);