linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Wei Huang <wei@redhat.com>
Cc: julien.thierry@arm.com, andre.przywara@arm.com,
	suzuki.poulose@arm.com, christoffer.dall@arm.com,
	linux-kernel@vger.kernel.org, james.morse@arm.com,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] KVM: arm/arm64: arch_timer: Fix TimerValue TVAL calculation in KVM
Date: Sat, 30 Mar 2019 09:56:14 +0000	[thread overview]
Message-ID: <86wokg65z5.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <20190329201253.29164-1-wei@redhat.com>

On Fri, 29 Mar 2019 20:12:53 +0000,
Wei Huang <wei@redhat.com> wrote:
> 
> Recently the generic timer test of kvm-unit-tests failed to complete
> (stalled) when a physical timer is being used. This issue is caused
> by incorrect update of CNT_CVAL when TimerValue is being accessed,
> introduced by 'Commit 84135d3d18da ("KVM: arm/arm64: consolidate arch
> timer trap handlers")'. According to Arm ARM, the read/write behavior
> of accesses to TimeValue registers is expected to be:
> 
>   * READ: TimerValue = (CompareValue – (Counter - Offset)
>   * WRITE: CompareValue = ((Counter - Offset) + Sign(TimerValue)
> 
> This patch fixes the TVAL read/write code path according to the
> specification.
> 
> Signed-off-by: Wei Huang <wei@redhat.com>

Huh... Nice catch. I guess I only ran this with a VHE host, where this
code path is unused.

Thanks,

	M.

-- 
Jazz is not dead, it just smell funny.

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

      reply	other threads:[~2019-03-30  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 20:12 [PATCH 1/1] KVM: arm/arm64: arch_timer: Fix TimerValue TVAL calculation in KVM Wei Huang
2019-03-30  9:56 ` Marc Zyngier [this message]

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=86wokg65z5.wl-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=james.morse@arm.com \
    --cc=julien.thierry@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=wei@redhat.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;
as well as URLs for NNTP newsgroup(s).