* [Qemu-devel] qemu icount mode timer accuracy
@ 2019-08-19 21:14 Wu, Wentong
0 siblings, 0 replies; 3+ messages in thread
From: Wu, Wentong @ 2019-08-19 21:14 UTC (permalink / raw)
To: Wu, Wentong, qemu-devel
Could anyone please give some comments? Thanks in advance!
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] qemu icount mode timer accuracy
@ 2019-08-19 20:49 Wu, Wentong
0 siblings, 0 replies; 3+ messages in thread
From: Wu, Wentong @ 2019-08-19 20:49 UTC (permalink / raw)
To: Wu, Wentong, qemu-devel
Could you please give some comments about this? Thanks a lot!
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] qemu icount mode timer accuracy
@ 2019-08-09 4:00 Wu, Wentong
0 siblings, 0 replies; 3+ messages in thread
From: Wu, Wentong @ 2019-08-09 4:00 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-19 21:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 21:14 [Qemu-devel] qemu icount mode timer accuracy Wu, Wentong
-- strict thread matches above, loose matches on Subject: below --
2019-08-19 20:49 Wu, Wentong
2019-08-09 4:00 Wu, Wentong
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).