[PATCH v1] KVM: arm64: Move pkvm_selftests() after all CPUs have initialized EL2
Fuad Tabba
fuad.tabba at linux.dev
Mon Oct 19 03:16:40 PDT 2026
On Mon, 19 Oct 2026 at 10:43, 'Vincent Donnefort' via kernel-team
<kernel-team at android.com> wrote:
>
> init_subsystems() installs the hyp vector on all CPUs. By running
> pkvm_selftests() in init_hyp_mode(), there's a risk for a migration to a
> CPU where the hyp stub is still in place which would fail to run one of
> the HVCs necessary for the selftest.
>
> While init_subsystems() is the earliest we can call pkvm_selftests(),
> move it to finalize_pkvm() to avoid having to export the selftest
> function out of pkvm.c.
>
> Fixes: bd93068340e9 ("KVM: arm64: Add selftests for the pKVM heap allocator")
> Reported-by: Fuad Tabba <fuad.tabba at linux.dev>
> Signed-off-by: Vincent Donnefort <vdonnefort at google.com>
Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>
Tested-by: Fuad Tabba <fuad.tabba at linux.dev>
Cheers,
/fuad
More information about the linux-arm-kernel
mailing list