From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 3/3] target/arm: Default to 1GHz cntfrq for 'max' and new CPUs
Date: Sat, 20 Apr 2024 10:04:00 -0700 [thread overview]
Message-ID: <55569871-49f0-405c-ab19-45cec6b63c63@linaro.org> (raw)
In-Reply-To: <20240419184608.2675213-4-peter.maydell@linaro.org>
On 4/19/24 11:46, Peter Maydell wrote:
> In previous versions of the Arm architecture, the frequency of the
> generic timers as reported in CNTFRQ_EL0 could be any IMPDEF value,
> and for QEMU we picked 62.5MHz, giving a timer tick period of 16ns.
> In Armv8.6, the architecture standardized this frequency to 1GHz.
>
> Because there is no ID register feature field that indicates whether
> a CPU is v8.6 or that it ought to have this counter frequency, we
> implement this by changing our default CNTFRQ value for all CPUs,
> with exceptions for backwards compatibility:
>
> * CPU types which we already implement will retain the old
> default value. None of these are v8.6 CPUs, so this is
> architecturally OK.
> * CPUs used in versioned machine types with a version of 9.0
> or earlier will retain the old default value.
>
> The upshot is that the only CPU type that changes is 'max'; but any
> new type we add in future (whether v8.6 or not) will also get the new
> 1GHz default.
>
> It remains the case that the machine model can override the default
> value via the 'cntfrq' QOM property (regardless of the CPU type).
>
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
> target/arm/cpu.h | 11 +++++++++++
> target/arm/internals.h | 12 ++++++++++--
> hw/core/machine.c | 4 +++-
> target/arm/cpu.c | 28 ++++++++++++++++++++++------
> target/arm/cpu64.c | 2 ++
> target/arm/tcg/cpu32.c | 4 ++++
> target/arm/tcg/cpu64.c | 18 ++++++++++++++++++
> 7 files changed, 70 insertions(+), 9 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2024-04-20 17:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 18:46 [PATCH 0/3] target/arm: Make the counter frequency default 1GHz for new CPUs, machines Peter Maydell
2024-04-19 18:46 ` [PATCH 1/3] hw: Add compat machines for 9.1 Peter Maydell
2024-04-19 18:46 ` [PATCH 2/3] target/arm: Refactor default generic timer frequency handling Peter Maydell
2024-04-20 16:58 ` Richard Henderson
2024-04-23 12:12 ` Philippe Mathieu-Daudé
2024-04-19 18:46 ` [PATCH 3/3] target/arm: Default to 1GHz cntfrq for 'max' and new CPUs Peter Maydell
2024-04-20 17:04 ` Richard Henderson [this message]
2024-04-23 20:47 ` Philippe Mathieu-Daudé
2024-04-22 12:56 ` [PATCH 0/3] target/arm: Make the counter frequency default 1GHz for new CPUs, machines Peter Maydell
2024-04-22 13:38 ` Marcin Juszkiewicz
2024-04-22 14:18 ` Peter Maydell
2024-04-22 15:37 ` Marcin Juszkiewicz
2024-04-23 7:26 ` Marcin Juszkiewicz
2024-04-22 15:57 ` Peter Maydell
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=55569871-49f0-405c-ab19-45cec6b63c63@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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 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).