From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51FD2C432C0 for ; Thu, 21 Nov 2019 16:38:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 272EE20672 for ; Thu, 21 Nov 2019 16:38:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 272EE20672 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXpTl-0007DB-BG for qemu-devel@archiver.kernel.org; Thu, 21 Nov 2019 11:38:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60917) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXpQS-0003Ng-K6 for qemu-devel@nongnu.org; Thu, 21 Nov 2019 11:35:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iXpQR-00046I-I8 for qemu-devel@nongnu.org; Thu, 21 Nov 2019 11:35:24 -0500 Received: from 6.mo178.mail-out.ovh.net ([46.105.53.132]:40263) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iXpQR-00045e-BY for qemu-devel@nongnu.org; Thu, 21 Nov 2019 11:35:23 -0500 Received: from player759.ha.ovh.net (unknown [10.108.54.94]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id A5C4482E53 for ; Thu, 21 Nov 2019 17:35:21 +0100 (CET) Received: from kaod.org (deibp9eh1--blueice1n4.emea.ibm.com [195.212.29.166]) (Authenticated sender: clg@kaod.org) by player759.ha.ovh.net (Postfix) with ESMTPSA id 30959C6C33A6; Thu, 21 Nov 2019 16:35:03 +0000 (UTC) Subject: Re: [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices To: David Gibson , Alex Williamson References: <20191121005607.274347-1-david@gibson.dropbear.id.au> <20191121005607.274347-5-david@gibson.dropbear.id.au> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <30d4fd1d-61f7-ebe2-a593-0917d187cab5@kaod.org> Date: Thu, 21 Nov 2019 17:35:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20191121005607.274347-5-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Ovh-Tracer-Id: 13603122676374014965 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrudehvddgleefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdqfffguegfifdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepveorughrihgtpgfnvggpifhorghtvghruceotghlgheskhgrohgurdhorhhgqeenucfkpheptddrtddrtddrtddpudelhedrvdduvddrvdelrdduieeinecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejheelrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtohepqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedv 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: 46.105.53.132 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_Lureau?= , Paolo Bonzini , philmd@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 21/11/2019 01:56, David Gibson wrote: > pseries machine type can have one of two different interrupt controller= s 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 w= hich > in turn dispatch to the correct back end. >=20 > VFIO passthrough devices, however, wire themselves up directly to the K= VM > irqchip for performance, which means they are affected by this change i= n > interrupt controller. To get them to adjust correctly for the change i= n > irqchip, we need to fire the kvm irqchip change notifier. >=20 > Cc: Alex Williamson > Cc: Alexey Kardashevskiy >=20 > Signed-off-by: David Gibson Reviewed-by: C=C3=A9dric Le Goater > --- > hw/ppc/spapr_irq.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > 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 *spa= pr, > } > =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