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 A29633B27C5; Fri, 21 Aug 2026 08:50:49 +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=1787302250; cv=none; b=kqAHz+6p4fSAw34nqX3SYIEuf+u1I6Mx7JVSpATW/bwJ/0X2YZh3wUznY2NTRdb4nEPsykdPhAFCU34Lw5ud98QFHem62Iwe9/iliLldNKl2GgGRGZ56ES1SJeEGImk4Pna3YOVoIj4rxqfkRaABcejvQ6rae1rBFYZr5yEVfOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302250; c=relaxed/simple; bh=OkzltVv+ABtF/oGd78tcIw2ZIY50wJZN51YfDAw092c=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=QYsuV52Ly7PxSMoIsjmrFwxqwuiFmct50DqD29M2Yf/Lg7R+3MkuMLOLFfGVKaXPRdDFv8x4OvXVUhJdDN//WKSqKInuO1eJ0PQjM3ioDZmWt6/lmgHnr4VgQa741xYgIZ9mrSSS9qPAE5PjvJPxevW46eox+/XZacOGMNE9yPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=duuINzBg; 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="duuINzBg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36C961F000E9; Fri, 21 Aug 2026 08:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787302249; bh=IXpIOjvkqq7uB7w6rbmfK/rjuA5uuwEWnZt5pTLJEg4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=duuINzBg0BgcphFlSCZ/OGFmwJ3Oiq20q4ZmR1nWt/6/IpOCyBvz3cetNwwOdKMEN sL4fNuk9ECxbrZNB0xc12HVTu7tyeJ2IiuOOSU7mdb9WNkHS429p1HRHSQGo2Ttr4q 1+m1GJq2n/sAFxjd6/f0CNFX5OOK1xz7jI4l5g9UE3OJJzPAZEtRy9l7JWvgVmxNe6 /024S5CyQDd6uJA9njj9mTgyFkwM1NHYICdNkrrWKTZpn6vneIylELjrzhb8nDXxcL nOstEZpC8ZUeZAqKDWLeqg6hwlZjtr0e5Y1zwzi8GbNk2ExQ3i1+eKGawSOU6XWJJ1 GoYLj/e9flS7A== 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 1wxKxb-0000000HY0o-1LnQ; Fri, 21 Aug 2026 08:50:47 +0000 Date: Fri, 21 Aug 2026 09:50:47 +0100 Message-ID: <861pbr6emw.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba Cc: sashiko-reviews@lists.linux.dev, Oliver Upton , kvmarm@lists.linux.dev Subject: Re: [PATCH v2 1/4] KVM: arm64: vgic-its: Free the caches when GITS_BASER changes In-Reply-To: References: <20260821064445.615838-1-fuad.tabba@linux.dev> <20260821064445.615838-2-fuad.tabba@linux.dev> <20260821065743.3563C1F000E9@smtp.kernel.org> 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: fuad.tabba@linux.dev, sashiko-reviews@lists.linux.dev, oupton@kernel.org, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Fri, 21 Aug 2026 08:37:24 +0100, Fuad Tabba wrote: > > Sashiko, this one is real. > > On Fri, 21 Aug 2026 at 07:57, wrote: > > > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > > > > Pre-existing issues: > > - [High] Pre-existing race condition in ITS MMIO handler allows MSI injection while ITS is disabled due to a stale translation cache entry. > > -- > > > > --- Patch [1]: [PATCH v2 1/4] KVM: arm64: vgic-its: Free the caches when GITS_BASER changes --- > > commit 98c89973da07ed23e9bd8348bfd2cf61333c4e66 > > Author: Fuad Tabba > > > > KVM: arm64: vgic-its: Free the caches when GITS_BASER changes > > > > A guest that disables the ITS and changes GITS_BASER with VALID still set > > keeps the mapped devices and collections. This patch frees the list and > > drops the translation cache whenever the stored value changes. > > > > Link: https://lore.kernel.org/all/87ecg9owwa.wl-maz@kernel.org/ > > > > > diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c > > > index 9e782a4fea7e5..ab89b0138efd0 100644 > > > --- a/arch/arm64/kvm/vgic/vgic-its.c > > > +++ b/arch/arm64/kvm/vgic/vgic-its.c > > > > [ ... ] > > > > > @@ -1702,6 +1705,8 @@ static void vgic_mmio_write_its_baser(struct kvm *kvm, > > > vgic_its_free_collection_list(kvm, its); > > > break; > > > } > > > + /* A concurrent injection may have cached a translation. */ > > > + vgic_its_invalidate_cache(its); > > > > [Severity: High] > > This is a pre-existing issue, but the commit message explicitly notes that > > an injection can still cache an entry after the ITS is disabled. > > > > Is it possible for a subsequent MSI to trigger an unexpected LPI injection? > > Yes, and it violates the spec: with GITS_CTLR.Enabled == 0 writes to > GITS_TRANSLATER are ignored, so nothing should be injected. > > It was reported in June [1] and is being worked on. Is it? I'm worried this has stalled. I'll have a look... M. -- Without deviation from the norm, progress is not possible.