mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
To: linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, maz@kernel.org
Cc: Christoffer.Dall@arm.com, eauger@redhat.com,
	miguel.luis@oracle.com, darren@os.amperecomputing.com,
	scott@os.amperecomputing.com, gankulkarni@os.amperecomputing.com
Subject: [PATCH v2 0/2] Avoid spurious ptimer interrupts for non-zero cntpoff
Date: Mon,  4 Sep 2023 04:42:16 -0700	[thread overview]
Message-ID: <20230904114218.590304-1-gankulkarni@os.amperecomputing.com> (raw)

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/a4dac5af-44e2-0485-446f-fae09fa66a3c@os.amperecomputing.com/


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

[2] https://lore.kernel.org/linux-arm-kernel/19c775ad-9573-b4d4-886d-c631b468856f@redhat.com/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(-)

-- 
2.41.0


             reply	other threads:[~2023-09-04 11:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 11:42 Ganapatrao Kulkarni [this message]
2023-09-04 11:42 ` [PATCH v2 1/2] KVM: arm64: timers: Move helper has_cntpoff to a header file Ganapatrao Kulkarni
2023-09-04 11:42 ` [PATCH v2 2/2] KVM: arm64: timers: Save restore CVAL of a ptimer across guest entry and exits Ganapatrao Kulkarni
2023-09-10 11:45   ` Marc Zyngier
2023-09-15  9:57     ` Ganapatrao Kulkarni
2023-09-18 11:29       ` Marc Zyngier
2023-09-19  6:15         ` Ganapatrao Kulkarni
2023-09-24  9:48           ` Marc Zyngier
2023-09-25  5:35             ` Ganapatrao Kulkarni
2023-09-25  5:40               ` Ganapatrao Kulkarni
2023-10-10  4:54                 ` Ganapatrao Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230904114218.590304-1-gankulkarni@os.amperecomputing.com \
    --to=gankulkarni@os.amperecomputing.com \
    --cc=Christoffer.Dall@arm.com \
    --cc=darren@os.amperecomputing.com \
    --cc=eauger@redhat.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=miguel.luis@oracle.com \
    --cc=scott@os.amperecomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®