Skip to content

Avoid spurious ptimer interrupts for non-zero cntpoff

Ganapatrao Kulkarni kvmarm linux-arm-kernel lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 8 repliesIn review
  2. v12 patches 8 repliesSuperseded

Changes in v2 from the cover letter

Updated as per review comment [1].
[1] https://lore.kernel.org/lkml/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: timers: Move helper has_cntpoff to a header filearch/arm64/include/asm/virt.h arch/arm64/kvm/arch_timer.c+5 -50 replies
2/2KVM: arm64: timers: Save restore CVAL of a ptimer across guest entry and exitsarch/arm64/kvm/arch_timer.c arch/arm64/kvm/hyp/vhe/switch.c include/kvm/arm_arch_timer.h+69 -58 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchGanapatrao Kulkarni
1/2
2/2T-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 0/2] Avoid spurious ptimer interrupts for non-zero cntpoff

Guest-Hypervisor(NV use-case) uses ptimer as an arch_timer. While running Guest-Hypervisor from a VHE host on a platform which supports FEAT_ECV/CNTPOFF_EL2, burst of spurious ptimer interrupts were generated for a non-zero offset, causing the boot to hang.

The issue is due to the value of CNTPOFF_EL2 is treated as zero while on VHE host. This patch fixes the issue by adjusting the CVAL of a loaded ptimer across the entry and exit of a guest.

v2:
Updated as per review comment [1].
[1] https://lore.kernel.org/lkml/[email protected]/

This patchset is rebased on NV-V10[2][3].

[2] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/
[3] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/nv-6.5-WIP-6.4

Ganapatrao Kulkarni (2):
KVM: arm64: timers: Move helper has_cntpoff to a header file
KVM: arm64: timers: Adjust CVAL of a ptimer across guest entry and
exits

 arch/arm64/include/asm/virt.h   |  5 +++
 arch/arm64/kvm/arch_timer.c     | 65 ++++++++++++++++++++++++++++-----
 arch/arm64/kvm/hyp/vhe/switch.c | 13 +++++++
 include/kvm/arm_arch_timer.h    |  1 +
 4 files changed, 74 insertions(+), 10 deletions(-)
Signature · 1 line
2.41.0