On Tue, Apr 18, 2017 at 5:56 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 17/04/2017 20:55, Pranith Kumar wrote: >>>> +/* ARM does not have a user-space readble cycle counter available. >>>> + * This is a compromise to get monotonically increasing time. >>>> + */ >>>> +static inline int64_t cpu_get_host_ticks(void) >>>> +{ >>>> + return get_clock(); >>>> +} >>> This doesn't look like it should be ARM-specific. Is it >>> better than the current default implementation? If so, >>> why not make this the default implementation? >> >> I think we can do that... > > Yes, it is always better for emulation accuracy. It may be much slower, > depending on your OS (especially if get_clock requires a > user->kernel->user transition), but the current code is quite broken. >
OK, I sent an updated patch using get_clock() for all other cases. -- Pranith