From nobody Mon Feb 9 22:38:43 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=1574298223; cv=none; d=zoho.com; s=zohoarc; b=od/+7CAssMM4mjWSjieK/8PXJ0KqQ1pWjRdNuu5B1hxaeNtrxyKKNiqTCKOkPsk+i2Dd9LzozhHM2IDaBp0rDSnXr1x67EteilzrUDhdIZrOJiSKefr1JlI/Mqm77li08ameAZE6hrk0nae9PamykYV7L4M2MzSoLqe6ZWwP24g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574298223; 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=RO7Z+h2z43hgvwBb7quSczqwIsy25yLkz8LevHbSwAk=; b=fOoRCwAffc3XxCKSEXMTBi75GozSTQJH9XaB2P4ww6vR9WQeP3g0UffaG9mDQGLDAHGlImUsQz+H3mjVGanydnow+hm2+P55JvBpX1L2bhs1JzV+UvhBR36/R/lz25IaJHT12hbiLtiPPOG6h/oNVkAX5qVp2sZ2pbJ2Y2lQ5U0= 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 1574298223292781.0133668670188; Wed, 20 Nov 2019 17:03:43 -0800 (PST) Received: from localhost ([::1]:35514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXash-0005am-61 for importer@patchew.org; Wed, 20 Nov 2019 20:03:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33969) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXao7-0001R3-9h for qemu-devel@nongnu.org; Wed, 20 Nov 2019 19:58:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iXao6-0001tO-AP for qemu-devel@nongnu.org; Wed, 20 Nov 2019 19:58:51 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:45307) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iXao6-0001sA-0Q; Wed, 20 Nov 2019 19:58:50 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 47JLm44S9lz9sR2; Thu, 21 Nov 2019 11:58:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1574297924; bh=uy06rYtNsupoZ3y3vcdSdik4ZpqVFHNbtPoj6Ji6YFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GH/ey9I17WPcqhxnfntIjzp89v+GocZFviNoVj5tc/u1wRv9nZRm70g0d6H7E4huG Ko5wf/5H1AmADYpIy9Xxx7C+drHdYhuzBZcJJdM9B/L1KHZaBNVIE79jAeczsA/ns9 js14uu6SHHwCWZDkUy0PdzSRpEXyti5fXNxUYejc= From: David Gibson To: Alex Williamson , clg@kaod.org Subject: [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices Date: Thu, 21 Nov 2019 11:56:06 +1100 Message-Id: <20191121005607.274347-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191121005607.274347-1-david@gibson.dropbear.id.au> References: <20191121005607.274347-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 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: kvm@vger.kernel.org, qemu-devel@nongnu.org, Jason Wang , Riku Voipio , Laurent Vivier , groug@kaod.org, Alexey Kardashevskiy , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , philmd@redhat.com, David Gibson 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" 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 Reviewed-by: C=C3=A9dric Le Goater --- 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 168044be85..1d27034962 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -508,6 +508,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.23.0