From nobody Thu Nov 13 22:08:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=1582757596; cv=none; d=zohomail.com; s=zohoarc; b=TNbQyAs2XgbycKOYtj4MuXOiDj7bMT0RUtvbBhCOWxcPW5RJim58ZuTEs2rDqF38s8OWwjXhWGxv4W+viPm+k+rO1yXatz+nGTsmCQW2gxqSReybeCGGyzJ0MWHYxaygHGo6mls9FOquUh7JuujLhowMXsJ/IPgVd8BQ9kAIwXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582757596; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Y3sVHPpC5z7VoY7e/tsZvRp+0nd3/grkPunmOWyrVZc=; b=dQeTGUFa8ib2KOJDzmS+I/k5J+IS/p6iTXRsBavhvXkgck2HE/6ULMQVWOlUfPcmn2cgrupDTyltVJVCM1F6lDxNxG4Ukuab6mE6vFDHzV80TQauy6X/7HOnnPNkMFmxmvOvzlr2hIqu36H2GwCzUxiW6IU1YeopT1YL4YlKtpI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1582757596357701.1416347410752; Wed, 26 Feb 2020 14:53:16 -0800 (PST) Received: from localhost ([::1]:51199 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j75YJ-0003tv-A5 for importer@patchew.org; Wed, 26 Feb 2020 17:53:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38502) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j75W6-0001LO-QG for qemu-devel@nongnu.org; Wed, 26 Feb 2020 17:50:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j75W4-0002oc-EP for qemu-devel@nongnu.org; Wed, 26 Feb 2020 17:50:57 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:59166 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j75W4-0002mS-5S for qemu-devel@nongnu.org; Wed, 26 Feb 2020 17:50:56 -0500 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-494-Dly1K89EPuKsWaSamnmV-g-1; Wed, 26 Feb 2020 17:50:53 -0500 Received: by mail-qk1-f199.google.com with SMTP id a10so1268150qkg.11 for ; Wed, 26 Feb 2020 14:50:53 -0800 (PST) Received: from xz-x1.redhat.com (CPEf81d0fb19163-CMf81d0fb19160.cpe.net.fido.ca. [72.137.123.47]) by smtp.gmail.com with ESMTPSA id t23sm1859140qtp.82.2020.02.26.14.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 14:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582757454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y3sVHPpC5z7VoY7e/tsZvRp+0nd3/grkPunmOWyrVZc=; b=WKUKiSq0b6sno1zpA9TPCfV2Y273LZMiNeHlgnXETrDuR7KgGuLDC4jMyC1CB7GxWAS4XU Qw+Ct+tCbC2Gt73mKGUXyph/4gDNueSm3o9LVDT5PERr4x4YF6VMr2RW6hZpfPgDPQWS/C wJPStZOWTx1Ops21G5b+wjEJVVLK2Y8= X-MC-Unique: Dly1K89EPuKsWaSamnmV-g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q/wVcbMiAF3eKq8v1pcoDKE6nDvgoEVVFIvpT7KHpuA=; b=VBBayYo5Jfrqm7RQUF7Ukyxqdiby9nUqgG9YWFhq9c+oxlS4dAuVmQAsyc49tRSOMg K20z9JGa8ph0Hn+nXnQyAUfTZdWhkqRBgrRCB9ESiQhJVL8zpYzTWs0tFnO2nZw0fbQy z4sAS4wkxKJdS8Aqs0YgVsJipUwjYxeavxlOR8UK3MePpr3ZH0UnI4adkGn7WHxvfqC1 drklK8Wf/z+OiPqbdrbgOSM6vuZ8/RS4kg3zJZf4COyV0KPYXZkL+1Lep0t0UIg4SNZu 4DSxb3rahAeMEEIkPFlXshYB7WDAokxh5NAFPCCR8erPN5titK8SatRo8sCNdBcW191H XyJQ== X-Gm-Message-State: APjAAAXxYXcg1ntJECjl5C3ptGGsxlubOAwbLA5lqUYQCmewmanGgdxn cvscccfhG/CK4B/Epyx6w9KhYEP5dQTvls0bh+0LAmOApMyiGlJCO7BFm8eelFeU8ybyY6aPmx1 57gq7NsZkLBQK4Qk= X-Received: by 2002:a0c:f412:: with SMTP id h18mr1668493qvl.124.1582757452537; Wed, 26 Feb 2020 14:50:52 -0800 (PST) X-Google-Smtp-Source: APXvYqyqiQt88tzWWSEvvGiPwIE/00Rrnh9cUeayh/0UanbySLq51p4WPcsRYDcBSSDI3Ln2XphYKw== X-Received: by 2002:a0c:f412:: with SMTP id h18mr1668470qvl.124.1582757452312; Wed, 26 Feb 2020 14:50:52 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Subject: [PATCH 1/5] vfio/pci: Disable INTx fast path if using split irqchip Date: Wed, 26 Feb 2020 17:50:44 -0500 Message-Id: <20200226225048.216508-2-peterx@redhat.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200226225048.216508-1-peterx@redhat.com> References: <20200226225048.216508-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Auger , Alex Williamson , Cornelia Huck , peterx@redhat.com, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" It's currently broken. Let's use the slow path to at least make it functional. Signed-off-by: Peter Xu Reviewed-by: Eric Auger Tested-by: Eric Auger --- hw/vfio/pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 5e75a95129..98e0e0c994 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -128,6 +128,18 @@ static void vfio_intx_enable_kvm(VFIOPCIDevice *vdev, = Error **errp) return; } =20 + if (kvm_irqchip_is_split()) { + /* + * VFIO INTx is currently not working with split kernel + * irqchip for level triggered interrupts. Go the slow path + * as long as split is enabled so we can be at least + * functional (even with poor performance). + * + * TODO: Remove this after all things fixed up. + */ + return; + } + /* Get to a known interrupt state */ qemu_set_fd_handler(irqfd.fd, NULL, NULL, vdev); vfio_mask_single_irqindex(&vdev->vbasedev, VFIO_PCI_INTX_IRQ_INDEX); --=20 2.24.1