From nobody Sat Feb 7 05:14:50 2026 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1571291221; cv=none; d=zoho.com; s=zohoarc; b=QnZj0/G+Vtgg6PIJtKuH9N6YywFPNM4NBouKMIhi7WUEdFJ1pxD2HyrxGEwOL5+H+P8d8dMdI9n1WX2aDr1cUP2byJK96ANco3LvB7hCLscy2Hy5jRFvGmgMltCtdnYzunKNgWVUTD/z/gB8cUPKATQEN34fNfrdjEfLHSfxPoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571291221; h=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=cN3cD/jv5NLMrBFGn0J6jF/Rz8J6wo+GiNWTy3X+sRw=; b=TMcruyUs2Ac7iXP4JgDOPkjCTud8AxNhpwurBif+SOQYYuWbc5USjkFOfZXT1yr0ihP3pM8ab/O7TgraH2wFFsOsHEDsnjz+tgVuk9fTHgtq6A/lnix5cbDvgbgVLnhsRP+vWKNMI7kHGHyADgFD8biKgNBhvx+RGu156+SQrts= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571291221014143.45406797614396; Wed, 16 Oct 2019 22:47:01 -0700 (PDT) Received: from localhost ([::1]:35584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKycl-0005zk-Sz for importer@patchew.org; Thu, 17 Oct 2019 01:46:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44387) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKyYQ-00016k-IQ for qemu-devel@nongnu.org; Thu, 17 Oct 2019 01:42:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKyYP-0005Jd-JT for qemu-devel@nongnu.org; Thu, 17 Oct 2019 01:42:30 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:41887 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKyYP-0005Ik-8L; Thu, 17 Oct 2019 01:42:29 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 46tyjT6m1bz9sPc; Thu, 17 Oct 2019 16:42:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1571290941; bh=mGl9erpGvqOrf7exLX2jon0zItJbqLirNCGx+VikJ1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d5nB3dZDlhZ2E1yiltlu72vEEnyFQTnFOMKueOq5If+DHT610AyiIbx0xp6GywPVq Nw0biffJMmE99WBz9ZmvmJocd/aMljYjUcCciVF9ETpHJbZv8xbpOH6NxgSSVoXizq oV/cU57lGpwD5J5yTZYnXbH748sl/lMvtbUATjEo= From: David Gibson To: alex.williamson@redhat.com, clg@kaod.org, groug@kaod.org Subject: [RFC 4/5] spapr: Handle irq backend changes with VFIO PCI devices Date: Thu, 17 Oct 2019 16:42:17 +1100 Message-Id: <20191017054218.8876-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191017054218.8876-1-david@gibson.dropbear.id.au> References: <20191017054218.8876-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 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: aik@ozlabs.ru, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) Content-Type: text/plain; charset="utf-8" pseries machine type can have one of two different interrupt controllers in use depending on feature negotiation with the guest. Usually this is invisible to devices, because they route to a common set of qemu_irqs which in turn dispatch to the correct back end. VFIO passthrough devices, however, wire themselves up directly to the KVM irqchip for performance, which means they are affected by this change in interrupt controller. To get them to adjust correctly for the change in irqchip, we need to fire the kvm irqchip change notifier. Cc: Alex Williamson Cc: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/ppc/spapr_irq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index 234d1073e5..45544b8976 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -480,6 +480,12 @@ static void set_active_intc(SpaprMachineState *spapr, } =20 spapr->active_intc =3D new_intc; + + /* + * We've changed the kernel irqchip, let VFIO devices know they + * need to readjust. + */ + kvm_irqchip_change_notify(); } =20 void spapr_irq_update_active_intc(SpaprMachineState *spapr) --=20 2.21.0