From: "Wu, Wentong" <wentong.wu@intel.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] qemu icount mode timer accuracy
Date: Fri, 9 Aug 2019 04:00:20 +0000 [thread overview]
Message-ID: <228A20DABA3D9846AF1B64E31C217296010E8CE3@SHSMSX106.ccr.corp.intel.com> (raw)
Hi,
Recently I'm working to enable Qemu icount mode with TCG, with source code review I found that Qemu can give deterministic execution for guest code timeout. But for exact time point for guest OS, I have a question:
For armv7m_systick.c example, guest OS will use systick_read which will call "t = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); " to calculate his exact time point, and qemu_clock_get_ns will use qemu_icount. But from qemu_tcg_rr_cpu_thread_fn { prepare_icount_for_run(cpu); r = tcg_cpu_exec(cpu); process_icount_data(cpu);}, we know qemu just update qemu_icount value after tcg_cpu_exec, so for each tcg_cpu_exec execution there is the same qemu_icount value, and then guest code will get the same time point for that one tcg execution. Can someone confirm that?
Thanks
next reply other threads:[~2019-08-09 4:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 4:00 Wu, Wentong [this message]
2019-08-19 20:49 [Qemu-devel] qemu icount mode timer accuracy Wu, Wentong
2019-08-19 21:14 Wu, Wentong
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=228A20DABA3D9846AF1B64E31C217296010E8CE3@SHSMSX106.ccr.corp.intel.com \
--to=wentong.wu@intel.com \
--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).