From: Marc Zyngier <maz@kernel.org>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Oliver Upton <oupton@kernel.org>, Eric Auger <eauger@redhat.com>,
Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>, Will Deacon <will@kernel.org>,
Sascha Bischoff <sascha.bischoff@arm.com>,
Sebastian Ene <sebastianene@google.com>,
Fuad Tabba <tabba@google.com>,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] KVM: arm64: vgic-its: Make the ITS table save reliable
Date: Sat, 22 Aug 2026 09:02:30 +0100 [thread overview]
Message-ID: <86wlti4m7d.wl-maz@kernel.org> (raw)
In-Reply-To: <20260821064445.615838-1-fuad.tabba@linux.dev>
On Fri, 21 Aug 2026 07:44:41 +0100,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
>
> Hi folks,
>
> Changes since v1 [1]:
> - Free the LPI translation cache in vgic_mmio_write_its_baser() too,
> inside the its_lock section. (Eric)
> - Reworded patch 1 to name the register the write is to. (Eric)
> - Rebased onto kvmarm/next.
>
> Marc pointed out on the v2 ITS series [2] that patch 3 fixed the wrong
> end of the problem: KVM should drop the collections when the guest
> changes the table that described them, rather than validating them at
> save time. He also called that patch's -EINVAL a mistake, since it
> aborts a save userspace has to be able to issue. This series does both,
> following his answers [3] to the two open questions: purge the whole
> list, and skip the offending device rather than fail.
>
> vgic_mmio_write_its_baser() now frees the cached devices or collections
> whenever the stored register value changes, not only when VALID is
> cleared, and drops the translation cache with them. It tests for a
> change rather than a write because the ITS driver rewrites an unchanged
> GITS_BASER<n> on resume. With that in place the check patch 3 added is
> unreachable, so it is reverted, and vgic_its_save_device_tables() skips
> a device the table can no longer address instead of failing the save.
>
> compute_next_devid_offset() now calls vgic_its_check_id(), which reads
> guest memory for an indirect table, so the save does 2n reads rather
> than n. It stays linear, as the scan stops at the first
> reachable successor. Patch 1's Fixes: tag names a v4.15 commit, so it
> will be picked up for stable. Drop the tag if that is not wanted.
>
> Patches 1 and 3 apply to v7.2 unchanged, but patch 2 reverts a commit
> only in kvmarm/next, so the series is based there.
>
> Tested on QEMU: the new selftest, vgic_irq, vgic_lpi_stress and boots.
> Both cases of the new selftest reset and restore the tables they saved,
> and both fail without the series.
>
> Based on kvmarm/next (aa8e5dc6a7a2a).
Reviewed-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2026-08-22 8:02 UTC|newest]
Thread overview: 6+ 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: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-22 8:02 ` Marc Zyngier [this message]
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=86wlti4m7d.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=eauger@redhat.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oupton@kernel.org \
--cc=sascha.bischoff@arm.com \
--cc=sebastianene@google.com \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/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