On 05/10/2017 05:53 PM, Paolo Bonzini wrote:
On 10/05/2017 10:32, guangrong.xiao@xxxxxxxxx wrote:
From: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxx>
Changelog in v3:
Thanks to Paolo's the elaborate review comments, this version
simplifies the logic of periodic_timer_update() significantly
that includes:
1) introduce rtc_periodic_clock_ticks() that takes both regA and
regB into account and returns the period clock
2) count the clocks since last interrupt by always using current
clock subtracts the clock when last interrupt happened
3) improve the assert() logic
Paolo, all you comments have been reflected in this version except
globally using s->period because in the current code, only x86 is
using s->period so that we should obey this rule to keep compatible
migration. I have added the comment to explain this suitable in the
code:
/*
* as the old QEMUs only used s->period for the case that
* LOST_TICK_POLICY_SLEW is used, in order to keep the
* compatible migration, we obey the rule as old QEMUs.
*/
s->period = period;
If anything i missed, please let me know. :)
Looks great. Thanks for following up quickly on the reviews.
Paolo, if it is okay to you, could you please consider to merge this
patchset? ;)