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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D5B0CC6B08 for ; Tue, 13 Oct 2026 10:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=B3KRNL7AZbCA4kJkWYYfzsHXsy+q+1VNr95bneYpC6w=; b=o5bRRGiHJFzR3nJky0b4nJ2qQD gLZ7mI4Cn9v+A0mXrMzSzV/6RbM/UKbX81H5KHFQgUGDY2jx65kqm7p+inbj0hTcjq5VTmp8m3RQg FVHpQB5up2a/eZElVM6a+syYvB+xNcK7hdQeYSwBIpkzctSimn9v/AeJ6vJJIaGQGJekbp5/OYhju 9KUxgCZdnawZZCDp+aHcsYrkGXsKMmo/oCxSpJfaJWwQn0kiW+Ng3aE0BwhKlnZZ5IG8QpnXQ2YFG XV/FLr8fww/pfydc+aEYFDNIX5MAm74GmZ/XkHr2aP5Ygmy6V/iKn1JpJd1K2pQogRqDb24k/OlcX K9yFAdXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xGZKS-0000000CW9j-3X7u; Tue, 13 Oct 2026 10:01:53 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xGZKO-0000000CW9E-3TRy for linux-arm-kernel@lists.infradead.org; Tue, 13 Oct 2026 10:01:49 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 56ED541388; Tue, 13 Oct 2026 10:01:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36BE41F000FF; Tue, 13 Oct 2026 10:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791885708; bh=B3KRNL7AZbCA4kJkWYYfzsHXsy+q+1VNr95bneYpC6w=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Jk06kKyGuoFy0AuuOAsyqvfTgqMKECiFMOf1bs2MPbwGXZieDzgOQAQs2UNXxvD88 8vMjHuhX9elbcatCkfpq1iYO9Np4DoLH6Y8+hQWMOVPS/JzNMfqaLfN+erUKJZuOlL aBFVCgFdlHJlCi8o2Uyy5/d0uoy8n+RjPR2Ddzeh8o4Qv+6SIqKbWKHx1N0y9tAUNi Z1V0GueI2c/3mAJBgZXeMwHQqGc0zo1BJhX0Kvm3xvtURuT5tzNN72V8TeaI3eXiMz wzH3ZK+ZjkC8SG9cJHaFoKYh14U+EWcNNMIwRb8lPzirQrJeawfxJfCrkZ4dCbDDV7 +Df3VL8Up+mXg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xGZKL-00000002IE3-2eKc; Tue, 13 Oct 2026 10:01:45 +0000 Date: Tue, 13 Oct 2026 11:01:44 +0100 Message-ID: <86wlrl2a2f.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Andre Przywara , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Fuad Tabba Subject: Re: [PATCH v2 0/2] KVM: arm64: vgic-its: Fix LPI double mapping and DISCARD In-Reply-To: References: <20261013081646.933312-1-fuad.tabba@linux.dev> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oupton@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, andre.przywara@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, tabba@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 13 Oct 2026 10:51:48 +0100, Oliver Upton wrote: > > On Tue, Oct 13, 2026 at 09:16:44AM +0100, Fuad Tabba wrote: > > Hi folks, > > > > Changes since v1 [1]: > > - Dropped the second mapping of an LPI at MAPTI, instead of keeping a > > doubly mapped LPI out of GICv4 forwarding. (Marc) > > - Keyed that check on whether an ITE maps the LPI, not on whether its > > vgic_irq exists. > > - Added a patch that makes DISCARD remove the pending state. (Marc) > > > > Two fixes to the ITS emulation. The first stops a guest from mapping > > one LPI from two events, which can oops a GICv4 host when the VMM then > > routes an assigned device's MSI to the second event. The second makes > > DISCARD remove the LPI's pending state, as the spec requires. > > > > Tested on QEMU, which emulates a GICv4 ITS. A local reproducer with two > > vCPUs DISCARDs an LPI that's pending in the other vCPU's list register. > > On rc3, and with patch 2 but without its halt, the guest still takes > > the LPI. With the series applied, it doesn't. > > > > Based on Linux 7.3-rc3 (fd73f4a665989). > > > > Cheers, > > /fuad > > > > [1] https://lore.kernel.org/all/20261012084743.2228612-1-fuad.tabba@linux.dev/ > > > > Fuad Tabba (2): > > KVM: arm64: vgic-its: Don't map an LPI from more than one event > > KVM: arm64: vgic-its: Remove the pending state of a discarded LPI > > Looks good. As all of these VGIC fixes depend on reliably synchronizing > hwstate I'll assume Marc will apply this patchset after his own series. Yeah, I now have a series that has the counting pause, your single vcpu pause (fixed to DTRT), and the LPI disabling fix. Patch #2 of this series can probably make use of the single-vcpu stunning. As for the OUTSIDE_GUEST discussion, I've had a long discussion with Will where we reversed engineered the synchronisation requirements, and concluded that there was nothing to fix on that front (the logic is incredibly subtle and counter-intuitive, but overall sound). This patch is therefore dropped. I'll post that today, and we can assemble a series. Thanks, M. -- Without deviation from the norm, progress is not possible.