|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 2/2] [RFC] time: refactor QEMU timer to use GHRTimer |
Date: | Tue, 23 Aug 2011 09:43:04 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
On 08/22/2011 09:21 PM, Anthony Liguori wrote:
- ticks = cpu_get_real_ticks(); - if (timers_state.cpu_ticks_prev > ticks) { - /* Note: non increasing ticks may happen if the host uses - software suspend */ - timers_state.cpu_ticks_offset += timers_state.cpu_ticks_prev - ticks; - } + ticks = get_clock(); [...] -static inline int64_t cpu_get_real_ticks(void) -{ - int64_t val; - asm volatile ("rdtsc" : "=A" (val)); - return val; -} -
cpu_get_ticks is used also to emulate the guest TSC, are you sure you want to change that uniformly to a 1 GHz rate?
I had some more cleanups in this area, I'll try to get them tested and submitted but I have little time for this right now.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |