Re: [RFC] Paravirt timer for KVM

Gerd Hoffmann
2007-10-15T09:56:39Z

Avi Kivity wrote:
> Gerd Hoffmann wrote:
>>
>>> 2) the TSC would have to be used as a clocksource. You don't know the
>>> frequency which is the first problem with using the TSC but some systems
>>> have a TSC that changes frequencies.
>>>
>> Also note the tsc may stop ticking if the CPU goes sleep in C3, which
>> IMHO makes the tsc almost useless as clocksource for guests ...
>
> But the host knows that, right? So it can update the guest's timebase?

Host should know. Well, I hope. Dunno whenever one really can be sure
in all cases given all the different CPUs and tsc implementations.

With VT you can attempt to make that invisible to the guest using the
tsc offset field. Probably svm can do that too (didn't check docs
though). kvm-lite can't (what is the status btw?). Xen "solves" that
by not doing power management *evil grin*.

Nevertheless it is probably much easier to go with pv timers (or maybe
emulate hpet timers).

cheers,
Gerd