qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qtest: add rtc periodic timer test


From: Xiao Guangrong
Subject: Re: [Qemu-devel] [PATCH] qtest: add rtc periodic timer test
Date: Fri, 26 May 2017 11:21:17 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0



On 05/26/2017 12:03 AM, Paolo Bonzini wrote:


On 25/05/2017 05:19, address@hidden wrote:

Note: as qemu needs a precise timer to drive its rtc timer callbacks,
that means clock=vm is not suitable for us as it's driven by icount
for qtest, so that we use clock=host instead, it is why we put the
periodic timer test separately without mixing with rtc-test

I'm not sure I understand.  Why would clock_step(1000) not be a good
replacement for nsleep(1000)?

We can not. As we use the real time to compare with the time that is
passed in the VM, however, clock_step() is not a real time based clock
source which immediately injects a time step to the VM regardless how
much real time elapsed.

I also tried nsleep(1000) before clock_step(1000), i,e:
   nsleep(1000);
   clock_step(1000);
that can not work too, it looks like the time spend on icount update in
the VM can not be guaranteed。




reply via email to

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