From: Richard Henderson <richard.henderson@linaro.org>
To: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>, qemu-devel@nongnu.org
Cc: kvmarm@lists.cs.columbia.edu
Subject: Re: [Qemu-devel] [RFC QEMU 1/2] arm/virt: Initialize generic timer scale factor dynamically
Date: Thu, 8 Nov 2018 15:21:47 +0100 [thread overview]
Message-ID: <47f78310-56e7-ba5e-0fb1-99830750e49b@linaro.org> (raw)
In-Reply-To: <1541616504-68526-2-git-send-email-bijan.mottahedeh@oracle.com>
On 11/7/18 7:48 PM, Bijan Mottahedeh wrote:
>
> +static void set_system_clock_scale(void)
> +{
> + unsigned long cntfrq_el0;
> +
> + asm volatile("mrs %0, cntfrq_el0" : "=r"(cntfrq_el0));
> +
> + if (cntfrq_el0 == 0) {
> + cntfrq_el0 = GTIMER_SCALE_DEF;
> + }
> +
> + system_clock_scale = NANOSECONDS_PER_SECOND / (int)cntfrq_el0;
> +}
This only works for kvm.
For TCG you need to use the default always. In particular, it won't even
compile for an x86 host.
r~
next prev parent reply other threads:[~2018-11-08 14:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 18:48 [Qemu-devel] [RFC QEMU 0/2] arm/virt: Account for guest pause time Bijan Mottahedeh
2018-11-07 18:48 ` [Qemu-devel] [RFC QEMU 1/2] arm/virt: Initialize generic timer scale factor dynamically Bijan Mottahedeh
2018-11-08 14:21 ` Richard Henderson [this message]
2018-11-10 3:12 ` Bijan Mottahedeh
2018-11-07 18:48 ` [Qemu-devel] [RFC QEMU 2/2] arm/virt: Account for guest pause time Bijan Mottahedeh
2018-11-08 14:32 ` [Qemu-devel] [RFC QEMU 0/2] " no-reply
2018-11-08 14:34 ` no-reply
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=47f78310-56e7-ba5e-0fb1-99830750e49b@linaro.org \
--to=richard.henderson@linaro.org \
--cc=bijan.mottahedeh@oracle.com \
--cc=kvmarm@lists.cs.columbia.edu \
--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).