linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: Treat ESR_ELx as a 64-bit register
@ 2022-04-07 16:23 Alexandru Elisei
  2022-04-07 16:23 ` [PATCH 1/5] arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly Alexandru Elisei
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Alexandru Elisei @ 2022-04-07 16:23 UTC (permalink / raw)
  To: catalin.marinas, will, linux-arm-kernel, maz, james.morse,
	suzuki.poulose, kvmarm, mark.rutland

ESR_EL{1,2} were originally 32-bit register, then were extended to 64-bit
with the upper 32 bits RES0, and in ARM DDI 0487H.a the FEAT_LS64 feature
was added which makes use of the upper bits. This series aims to teach
Linux to treat it consistently as a 64-bit register with the goal of making
it easier to add support in the future for features that make use of the
upper 32 bits.

Patches #1 ("arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly")
and #2 ("arm64: compat: Do not treat syscall number as ESR_ELx for a bad
syscall") are fixes for some minor issues which I found while working on
changing ESR_ELx to 64-bit.

Patches #3 ("arm64: Treat ESR_ELx as a 64bit register") and #4 ("KVM:
arm64: Treat ESR_EL2 as a 64-bit register") are where the change is
implemented. I chose to make the KVM a separate patch because KVM prefers
u64 for the registers.

And in patch #5 ("KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high") I
add a new field to the user API struct kvm_debug_exit_arch that represents
the higher 32 bits (details in the patch).

Tested by running ltp and kvm-unit-tests on a rockpro64.

Alexandru Elisei (5):
  arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly
  arm64: compat: Do not treat syscall number as ESR_ELx for a bad
    syscall
  arm64: Treat ESR_ELx as a 64bit register
  KVM: arm64: Treat ESR_EL2 as a 64-bit register
  KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high

 arch/arm64/include/asm/debug-monitors.h |  4 +-
 arch/arm64/include/asm/esr.h            |  8 +--
 arch/arm64/include/asm/exception.h      | 28 +++++-----
 arch/arm64/include/asm/kvm_emulate.h    |  6 +--
 arch/arm64/include/asm/kvm_host.h       |  2 +-
 arch/arm64/include/asm/kvm_ras.h        |  2 +-
 arch/arm64/include/asm/system_misc.h    |  4 +-
 arch/arm64/include/asm/traps.h          | 12 ++---
 arch/arm64/include/uapi/asm/kvm.h       |  1 +
 arch/arm64/kernel/debug-monitors.c      | 12 ++---
 arch/arm64/kernel/entry-common.c        |  6 +--
 arch/arm64/kernel/fpsimd.c              |  6 +--
 arch/arm64/kernel/hw_breakpoint.c       |  4 +-
 arch/arm64/kernel/kgdb.c                |  6 +--
 arch/arm64/kernel/probes/kprobes.c      |  4 +-
 arch/arm64/kernel/probes/uprobes.c      |  4 +-
 arch/arm64/kernel/sys_compat.c          |  2 +-
 arch/arm64/kernel/traps.c               | 66 +++++++++++------------
 arch/arm64/kvm/handle_exit.c            | 15 +++---
 arch/arm64/kvm/hyp/include/hyp/switch.h |  2 +-
 arch/arm64/kvm/hyp/nvhe/sys_regs.c      |  2 +-
 arch/arm64/kvm/hyp/vgic-v3-sr.c         |  4 +-
 arch/arm64/kvm/inject_fault.c           |  4 +-
 arch/arm64/kvm/sys_regs.c               |  4 +-
 arch/arm64/mm/fault.c                   | 70 ++++++++++++-------------
 25 files changed, 140 insertions(+), 138 deletions(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-04-12 11:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-07 16:23 [PATCH 0/5] arm64: Treat ESR_ELx as a 64-bit register Alexandru Elisei
2022-04-07 16:23 ` [PATCH 1/5] arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly Alexandru Elisei
2022-04-07 16:23 ` [PATCH 2/5] arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall Alexandru Elisei
2022-04-07 16:23 ` [PATCH 3/5] arm64: Treat ESR_ELx as a 64bit register Alexandru Elisei
2022-04-07 16:23 ` [PATCH 4/5] KVM: arm64: Treat ESR_EL2 as a 64-bit register Alexandru Elisei
2022-04-07 16:23 ` [PATCH 5/5] KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high Alexandru Elisei
2022-04-08  7:47   ` Marc Zyngier
2022-04-11 10:46     ` Alexandru Elisei
2022-04-12 11:30       ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).