[PATCH] KVM: arm64: selftests: Pin vpmu_counter_access to one CPU
Fuad Tabba
fuad.tabba at linux.dev
Fri Dec 4 05:10:43 PST 2026
On Wed, 25 Nov 2026 at 15:36, James Clark <james.clark at linaro.org> wrote:
>
> The vpmu_counter_access test reads the maximum PMCR_EL0.N from one VM
> and then creates new VMs for each number of counters up to that limit.
> If the test migrates between CPU types the limit may not be valid for
> the new VM which causes:
>
> ==== Test Assertion Failure ====
> arm64/vpmu_counter_access.c:483: !ret
> pid=9165 tid=9165 errno=22 - Invalid argument
> ...
> KVM_SET_DEVICE_ATTR failed, rc: -1 errno: 22 (Invalid argument)
>
> For example on a Radxa Orion O6 with 20 counters on the big cores and 6
> on the little cores, this happens on most runs.
>
> Fix it by pinning the test to the CPU that it starts on before any VMs
> are created.
>
> Signed-off-by: James Clark <james.clark at linaro.org>
Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>
Cheers,
/fuad
More information about the linux-arm-kernel
mailing list