qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qemu icount mode timer accuracy


From: Wu, Wentong
Subject: [Qemu-devel] qemu icount mode timer accuracy
Date: Fri, 9 Aug 2019 04:00:20 +0000

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]