[PATCH 0/5] arm64: Treat ESR_ELx as a 64-bit register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux