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