> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 10/01/19 14:30, Pavel Dovgalyuk wrote: > > Now timerlist_deadline_ns uses all virtual timers for deadline calculation > > (including > external > > ones). > > qemu_start_warp_timer uses the deadline for setting warp timer (which > > should be > deterministic). > > Can you introduce a variant of qemu_clock_deadline_ns_all that ignores > external timers, and use it in qemu_start_warp_timer?
Ok. > timerlist_deadline_ns can be made static, so adding a bool argument to > it is not a big issue for API cleanliness. > > In fact, qemu_clock_deadline_ns_all is only ever used with > QEMU_CLOCK_VIRTUAL, so you could also change it to > > uint64_t virtual_clock_deadline_ns(bool include_external); I started making changes and it seems that this parameter should never be true, because this function is called either from cpus.c or from the tests. Pavel Dovgalyuk