Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* [PATCH v2 0/4] arm64/sysreg: Get rid of *_ELx as fields for EL12 accessors
@ 2024-12-19 17:33 Marc Zyngier
  2024-12-19 17:33 ` [PATCH v2 1/4] arm64/sysreg: Allow a 'Mapping' descriptor for system registers Marc Zyngier
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Marc Zyngier @ 2024-12-19 17:33 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm
  Cc: Catalin Marinas, Will Deacon, Mark Rutland, Joey Gouly,
	Mark Brown

We keep adding *_ELx definition to the sysreg as an abstraction for
the mapping between an EL1 register and its EL12 counterpart.

But nothing in the architecture has these ELx suffixes to describe
such abstraction. When they are mentioned, it always is as a shortcut
for EL1, EL2 or EL3, and never for EL12. That's because *_EL12 are
*not* registers. They are accessors, nothing else. So what we
currently have is not only bizarre, it is actively wrong.

This small series aims are injecting some sanity, by explicitly
describing EL12 registers as mappings to EL1 registers, and keeping
the ELx description as fields for the EL{1,2} registers.

* From v1:

  - Fixed the description in the first patch following Mark's proposal

  - Couple of spelling funnies being fixed

  - Collected Acks and RBs.

Marc Zyngier (4):
  arm64/sysreg: Allow a 'Mapping' descriptor for system registers
  arm64/sysreg: Get rid of the TCR2_EL1x SysregFields
  arm64/sysreg: Convert *_EL12 accessors to Mapping
  arm64/sysreg: Get rid of CPACR_ELx SysregFields

 arch/arm64/include/asm/el2_setup.h      |  6 ++--
 arch/arm64/include/asm/kvm_arm.h        |  2 --
 arch/arm64/include/asm/kvm_emulate.h    | 40 +++++++++++-----------
 arch/arm64/include/asm/kvm_nested.h     |  8 ++---
 arch/arm64/kernel/cpufeature.c          |  4 +--
 arch/arm64/kvm/at.c                     |  6 ++--
 arch/arm64/kvm/emulate-nested.c         |  2 +-
 arch/arm64/kvm/fpsimd.c                 |  2 +-
 arch/arm64/kvm/hyp/include/hyp/switch.h |  4 +--
 arch/arm64/kvm/hyp/nvhe/hyp-main.c      |  4 +--
 arch/arm64/kvm/hyp/nvhe/pkvm.c          |  2 +-
 arch/arm64/kvm/hyp/nvhe/switch.c        |  6 ++--
 arch/arm64/kvm/hyp/vhe/switch.c         | 16 ++++-----
 arch/arm64/mm/proc.S                    |  5 +--
 arch/arm64/tools/gen-sysreg.awk         |  2 +-
 arch/arm64/tools/sysreg                 | 44 ++++++++++++-------------
 16 files changed, 76 insertions(+), 77 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2024-12-19 19:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 17:33 [PATCH v2 0/4] arm64/sysreg: Get rid of *_ELx as fields for EL12 accessors Marc Zyngier
2024-12-19 17:33 ` [PATCH v2 1/4] arm64/sysreg: Allow a 'Mapping' descriptor for system registers Marc Zyngier
2024-12-19 17:33 ` [PATCH v2 2/4] arm64/sysreg: Get rid of the TCR2_EL1x SysregFields Marc Zyngier
2024-12-19 18:49   ` Mark Brown
2024-12-19 17:33 ` [PATCH v2 3/4] arm64/sysreg: Convert *_EL12 accessors to Mapping Marc Zyngier
2024-12-19 17:33 ` [PATCH v2 4/4] arm64/sysreg: Get rid of CPACR_ELx SysregFields Marc Zyngier
2024-12-19 19:47 ` [PATCH v2 0/4] arm64/sysreg: Get rid of *_ELx as fields for EL12 accessors Will Deacon

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