mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] KVM: selftests: arm64: Make use of sysreg defintions in get-reg-list
@ 2024-08-06 14:24 Mark Brown
  2024-08-06 14:24 ` [PATCH v2 1/3] KVM: selftests: arm64: Simplify specification of filtered registers Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Brown @ 2024-08-06 14:24 UTC (permalink / raw)
  To: Marc Zyngier, Oliver Upton, James Morse, Suzuki K Poulose,
	Paolo Bonzini, Shuah Khan, Catalin Marinas, Joey Gouly
  Cc: linux-arm-kernel, kvmarm, kvm, linux-kselftest, linux-kernel, Mark Brown

The system register definitions in the arm64 get-reg-list are all done
with directly specified magic numbers rather than using the definitions
we import from the main kernel.  This is error prone, and requires us to
audit the additions to get-reg-list separately to what we do when
specifying the registers for the main kernel.  Since Marc has indicated
that this isn't a deliberate or desired choice let's start using the
constants we have defined.

We first manually update the data used to filter registers based on ID
register fields to use a simplified macro that specifies the register
and ID field in a muc more compact fashion.  This is done first since
there is an error in the ID register field for the S1PIE registers.  We
then replace all the remaining named system register specifications with
use of the existing KVM_ARM64_SYS_REG() macro.

This is just a first step, there's a bunch more work we could be doing
here, the main thing being making use of the encodings in
arch/arm64/tools/sysreg to convert more of the registers (including
updating as more registers are converted to use the generator).

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Changes in v2:
- Add use of designated initalisers when converting filtering macros.
- Manual handling of CNTV_CTL_EL0 and CNTV_CVAL_EL0.
- Commit message tweaks.
- Link to v1: https://lore.kernel.org/r/20240802-kvm-arm64-get-reg-list-v1-0-3a5bf8f80765@kernel.org

---
Mark Brown (3):
      KVM: selftests: arm64: Simplify specification of filtered registers
      KVM: selftests: arm64: Use symbolic definitions for incorrect encodings
      KVM: selftests: arm64: Use generated defines for named system registers

 tools/testing/selftests/kvm/aarch64/get-reg-list.c | 244 ++++++++++-----------
 1 file changed, 122 insertions(+), 122 deletions(-)
---
base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
change-id: 20240802-kvm-arm64-get-reg-list-a86a37460bdd

Best regards,
-- 
Mark Brown <broonie@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-06 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-06 14:24 [PATCH v2 0/3] KVM: selftests: arm64: Make use of sysreg defintions in get-reg-list Mark Brown
2024-08-06 14:24 ` [PATCH v2 1/3] KVM: selftests: arm64: Simplify specification of filtered registers Mark Brown
2024-08-06 14:24 ` [PATCH v2 2/3] KVM: selftests: arm64: Use symbolic definitions for incorrect encodings Mark Brown
2024-08-06 14:24 ` [PATCH v2 3/3] KVM: selftests: arm64: Use generated defines for named system registers Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®