Skip to content

arm64: Add initial support for FEAT_WFxT

Marc Zyngier kvm kvmarm linux-arm-kernel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 10 repliesIn review
  2. v110 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10arm64: Expand ESR_ELx_WFx_ISS_TI to match its ARMv8.7 definitionarch/arm64/include/asm/esr.h+4 -21 reply
2/10arm64: Add RV and RN fields for ESR_ELx_WFx_ISSarch/arm64/include/asm/esr.h+2 -01 reply
3/10KVM: arm64: Simplify kvm_cpu_has_pending_timer()arch/arm64/kvm/arch_timer.c arch/arm64/kvm/arm.c include/kvm/arm_arch_timer.h+2 -150 replies
4/10KVM: arm64: Introduce kvm_counter_compute_delta() helperarch/arm64/kvm/arch_timer.c+10 -70 replies
5/10KVM: arm64: Handle blocking WFIT instructionarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arch_timer.c arch/arm64/kvm/arm.c +2 more+29 -30 replies
6/10KVM: arm64: Offer early resume for non-blocking WFxT instructionsarch/arm64/kvm/handle_exit.c+26 -40 replies
7/10KVM: arm64: Expose the WFXT feature to guestsarch/arm64/kernel/cpufeature.c arch/arm64/kvm/sys_regs.c+14 -01 reply
8/10arm64: Add HWCAP advertising FEAT_WFXTDocumentation/arm64/cpu-feature-registers.rst Documentation/arm64/elf_hwcaps.rst arch/arm64/include/asm/hwcap.h +3 more+11 -12 replies
9/10arm64: Add wfet()/wfit() helpersarch/arm64/include/asm/barrier.h+4 -01 reply
10/10arm64: Use WFxT for __delay() when possiblearch/arm64/lib/delay.c+11 -12 replies

Reviews trailers per patch

6 of 10 patches have a Reviewed-by or Acked-by.

PatchJoey GoulyCatalin Marinas
1/10R-b A-b
2/10R-b A-b
3/10
4/10
5/10
6/10
7/10A-b
8/10A-b
9/10A-b
10/10A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/10] arm64: Add initial support for FEAT_WFxT

The ARMv8.7 WFxT feature is a new take on the good old WFI/WFE instructions as they behave the same way, only taking an extra timeout parameter.

This small series aims at adding the minimal support for this feature, enabling it for both the kernel and KVM.

A potential addition to this series would be to remove the event generation from the counters, and rely on the timeout where it matters (spinlocks?). Feedback welcome.

Patches on top of 5.18-rc2, tested of the FVP AEM.

* From v1 [1]:
- Properly generate traces even if the deadline has already expired
- Collect RBs, with thanks.

[1] https://lore.kernel.org/r/[email protected]

Marc Zyngier (10):
arm64: Expand ESR_ELx_WFx_ISS_TI to match its ARMv8.7 definition
arm64: Add RV and RN fields for ESR_ELx_WFx_ISS
KVM: arm64: Simplify kvm_cpu_has_pending_timer()
KVM: arm64: Introduce kvm_counter_compute_delta() helper
KVM: arm64: Handle blocking WFIT instruction
KVM: arm64: Offer early resume for non-blocking WFxT instructions
KVM: arm64: Expose the WFXT feature to guests
arm64: Add HWCAP advertising FEAT_WFXT
arm64: Add wfet()/wfit() helpers
arm64: Use WFxT for __delay() when possible

 Documentation/arm64/cpu-feature-registers.rst |  2 +
 Documentation/arm64/elf_hwcaps.rst            |  4 ++
 arch/arm64/include/asm/barrier.h              |  4 ++
 arch/arm64/include/asm/esr.h                  |  8 +++-
 arch/arm64/include/asm/hwcap.h                |  1 +
 arch/arm64/include/asm/kvm_host.h             |  1 +
 arch/arm64/include/uapi/asm/hwcap.h           |  1 +
 arch/arm64/kernel/cpufeature.c                | 13 +++++
 arch/arm64/kernel/cpuinfo.c                   |  1 +
 arch/arm64/kvm/arch_timer.c                   | 47 ++++++++++++-------
 arch/arm64/kvm/arm.c                          |  6 +--
 arch/arm64/kvm/handle_exit.c                  | 35 ++++++++++++--
 arch/arm64/kvm/sys_regs.c                     |  2 +
 arch/arm64/lib/delay.c                        | 12 ++++-
 arch/arm64/tools/cpucaps                      |  1 +
 include/kvm/arm_arch_timer.h                  |  2 -
 16 files changed, 110 insertions(+), 30 deletions(-)
Signature · 6 lines
2.34.1

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm