lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240806-kvm-arm64-get-reg-list-v2-0-1d3fbc7b6844@kernel.org>
Date: Tue, 06 Aug 2024 15:24:21 +0100
From: Mark Brown <broonie@...nel.org>
To: Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>, 
 James Morse <james.morse@....com>, 
 Suzuki K Poulose <suzuki.poulose@....com>, 
 Paolo Bonzini <pbonzini@...hat.com>, Shuah Khan <shuah@...nel.org>, 
 Catalin Marinas <catalin.marinas@....com>, Joey Gouly <joey.gouly@....com>
Cc: linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev, 
 kvm@...r.kernel.org, linux-kselftest@...r.kernel.org, 
 linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: [PATCH v2 0/3] KVM: selftests: arm64: Make use of sysreg
 defintions in get-reg-list

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@...nel.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@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ