From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67DB43E024B; Tue, 13 Oct 2026 10:01:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791885709; cv=none; b=metvPdN2YIExr2fRd17lWShLd7RNU5S/Cs+O6MElcGBAjTpdPjZnM5H7QktUUIYXpawPCXM+CsBxMmrKebQH53SDdj+KcUL2L5gTxpOeDE8Y97+A707JiukO94uFWym8jAaEqKBfCeHVc53Mka47haNSCaI1K/zAC0byZk5eZb8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791885709; c=relaxed/simple; bh=bSqWRS+oNbzfGzSTqwVOAZcthxcUCgPbR4fGQEtmJ04=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=pl67zvi+7kmmZALCOSHHuKcEGDy7rfoZkGKJuKrUdgGbVuXE+x2Z71R94Y3m8AxPHZPYZwdhe4yy2Uh2cecMRodK5AvkUsFE4XgKI7k7R7HcgPamdf7HTIRtIDH18oUm3ol6AuFXqM7kk2gM8NcEzgDjgnUIvh0cszwedE7cp9c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jk06kKyG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jk06kKyG" 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) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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.