Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: sashiko-reviews@lists.linux.dev, Oliver Upton <oupton@kernel.org>,
	kvmarm@lists.linux.dev
Subject: Re: [PATCH v2 1/4] KVM: arm64: vgic-its: Free the caches when GITS_BASER changes
Date: Fri, 21 Aug 2026 09:50:47 +0100	[thread overview]
Message-ID: <861pbr6emw.wl-maz@kernel.org> (raw)
In-Reply-To: <CA+EHjTy6Qb8dv_apBg4RVU+V-LsP1Z+BkDYfRKLX0f6PnbKpeg@mail.gmail.com>

On Fri, 21 Aug 2026 08:37:24 +0100,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
> 
> Sashiko, this one is real.
> 
> On Fri, 21 Aug 2026 at 07:57, <sashiko-bot@kernel.org> 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 <fuad.tabba@linux.dev>
> >
> > KVM: arm64: vgic-its: Free the caches when GITS_BASER changes
> >
> > A guest that disables the ITS and changes GITS_BASER<n> 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.

  reply	other threads:[~2026-08-21  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  6:44 [PATCH v2 0/4] KVM: arm64: vgic-its: Make the ITS table save reliable Fuad Tabba
2026-08-21  6:44 ` [PATCH v2 1/4] KVM: arm64: vgic-its: Free the caches when GITS_BASER changes Fuad Tabba
2026-08-21  6:57   ` sashiko-bot
2026-08-21  7:37     ` Fuad Tabba
2026-08-21  8:50       ` Marc Zyngier [this message]
2026-08-21  8:55         ` Fuad Tabba
2026-08-21  6:44 ` [PATCH v2 2/4] Revert "KVM: arm64: vgic-its: Don't save collections the table cannot hold" Fuad Tabba
2026-08-21  6:44 ` [PATCH v2 3/4] KVM: arm64: vgic-its: Skip unreachable devices instead of failing the save Fuad Tabba
2026-08-21  6:44 ` [PATCH v2 4/4] KVM: arm64: selftests: Add ITS table save tests Fuad Tabba
2026-08-21  7:00   ` sashiko-bot
2026-08-21  7:51     ` Fuad Tabba
2026-08-22  8:02 ` [PATCH v2 0/4] KVM: arm64: vgic-its: Make the ITS table save reliable Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=861pbr6emw.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=fuad.tabba@linux.dev \
    --cc=kvmarm@lists.linux.dev \
    --cc=oupton@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox