]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: selftests: get-reg-list: Split base and pmu registers
authorAndrew Jones <drjones@redhat.com>
Mon, 31 May 2021 10:33:44 +0000 (12:33 +0200)
committerMarc Zyngier <maz@kernel.org>
Tue, 22 Jun 2021 07:51:29 +0000 (08:51 +0100)
commit10eea3d1786a5f6ce5b82d6fed7a947da6fc257b
tree7cfec3ed3473b96d33354e086623a6c5ea063cd1
parent5fa85c53555a2818b389927f56c67b79c2b4b611
KVM: arm64: selftests: get-reg-list: Split base and pmu registers

Since KVM commit 0f271584b297 ("KVM: arm64: Hide PMU registers from
userspace when not available") the get-reg-list* tests have been
failing with

  ...
  ... There are 74 missing registers.
  The following lines are missing registers:
  ...

where the 74 missing registers are all PMU registers. This isn't a
bug in KVM that the selftest found, even though it's true that a
KVM userspace that wasn't setting the KVM_ARM_VCPU_PMU_V3 VCPU
flag, but still expecting the PMU registers to be in the reg-list,
would suddenly no longer have their expectations met. In that case,
the expectations were wrong, though, so that KVM userspace needs to
be fixed, and so does this selftest. The fix for this selftest is to
pull the PMU registers out of the base register sublist into their
own sublist and then create new, pmu-enabled vcpu configs which can
be tested.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210531103344.29325-6-drjones@redhat.com
tools/testing/selftests/kvm/aarch64/get-reg-list.c