Re: [PATCH v3] KVM: arm64: selftests: Test VNCR translation invalidation
From: Marc Zyngier
Date: Mon Oct 26 2026 - 04:38:43 EST
On Mon, 26 Oct 2026 03:10:10 +0000,
Itaru Kitayama <itaru.kitayama@xxxxxxxxxxx> wrote:
>
> Add a standalone KVM selftest that checks VNCR accesses after L1
> updates its stage-1 mapping and issues a TLBI. This guards against
> stale VNCR translations, as KVM caches L1's translation of
> VNCR_EL2 and must drop it when L1 invalidates the mapping in
> kvm_handle_s1e2_tlbi().
>
> Keep VNCR_EL2 unchanged while remapping its backing page A to B then
> again to A. At each step, L2 reads and writes TPIDR_EL2, and L1
> verifies that the accesses reach the selected page while leaving the
> other page unchanged.
If you were tracking cross vcpu invalidation and exercising all the
architecture corner cases (such as permission changes and co), that
would be helpful.
But as it is, it doesn't help much as a validation tool. Its scope is
way too narrow.
M.
--
Without deviation from the norm, progress is not possible.