From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH v3 1/9] target/arm: Apply correct timer offset when calculating deadlines
Date: Wed, 26 Feb 2025 09:04:41 +0000 [thread overview]
Message-ID: <87tt8h3wly.fsf@draig.linaro.org> (raw)
In-Reply-To: <20250204125009.2281315-2-peter.maydell@linaro.org> (Peter Maydell's message of "Tue, 4 Feb 2025 12:50:01 +0000")
Peter Maydell <peter.maydell@linaro.org> writes:
> When we are calculating timer deadlines, the correct definition of
> whether or not to apply an offset to the physical count is described
> in the Arm ARM DDI4087 rev L.a section D12.2.4.1. This is different
> from when the offset should be applied for a direct read of the
> counter sysreg.
>
> We got this right for the EL1 physical timer and for the EL1 virtual
> timer, but got all the rest wrong: they should be using a zero offset
> always.
>
> Factor the offset calculation out into a function that has a comment
> documenting exactly which offset it is calculating and which gets the
> HYP, SEC, and HYPVIRT cases right.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2025-02-26 9:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 12:50 [PATCH v3 0/9] target/arm: Implement SEL2 physical and virtual timers Peter Maydell
2025-02-04 12:50 ` [PATCH v3 1/9] target/arm: Apply correct timer offset when calculating deadlines Peter Maydell
2025-02-26 9:04 ` Alex Bennée [this message]
2025-02-04 12:50 ` [PATCH v3 2/9] target/arm: Don't apply CNTVOFF_EL2 for EL2_VIRT timer Peter Maydell
2025-02-26 9:05 ` Alex Bennée
2025-02-04 12:50 ` [PATCH v3 3/9] target/arm: Make CNTPS_* UNDEF from Secure EL1 when Secure EL2 is enabled Peter Maydell
2025-02-21 18:02 ` Alex Bennée
2025-02-21 18:25 ` Peter Maydell
2025-02-04 12:50 ` [PATCH v3 4/9] target/arm: Always apply CNTVOFF_EL2 for CNTV_TVAL_EL02 accesses Peter Maydell
2025-02-26 9:06 ` Alex Bennée
2025-02-04 12:50 ` [PATCH v3 5/9] target/arm: Refactor handling of timer offset for direct register accesses Peter Maydell
2025-02-26 9:07 ` Alex Bennée
2025-02-04 12:50 ` [PATCH v3 6/9] target/arm: Implement SEL2 physical and virtual timers Peter Maydell
2025-02-04 12:50 ` [PATCH v3 7/9] target/arm: document the architectural names of our GTIMERs Peter Maydell
2025-02-04 12:50 ` [PATCH v3 8/9] hw/arm: enable secure EL2 timers for virt machine Peter Maydell
2025-02-04 12:50 ` [PATCH v3 9/9] hw/arm: enable secure EL2 timers for sbsa machine Peter Maydell
2025-02-21 11:06 ` [PATCH v3 0/9] target/arm: Implement SEL2 physical and virtual timers Peter Maydell
2025-03-09 5:24 ` Michael Tokarev
2025-03-09 12:05 ` Alex Bennée
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=87tt8h3wly.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.