Re: system time

Avi Kivity
2007-09-27T10:07:20Z

Farkas Levente wrote:
> Avi Kivity wrote:
>
>> Farkas Levente wrote:
>>
>>> Avi Kivity wrote:
>>>
>>>
>>>> Haydn Solomon wrote:
>>>>
>>>>
>>>>> I know I'm not crazy.. now my host and guest clocks are in sync. I'll
>>>>> leave the guest running for a while and see if it eventually goes
>>>>> ahead of host.
>>>>>
>>>>>
>>>>>
>>>> Please do this both with and without -no-kvm-irqchip. The code paths
>>>> are very different.
>>>>
>>>>
>>> the simple question does all the guest must be the same system time as
>>> the host? and if it's not the case then it's a bug? or it can happened
>>> with reason?
>>>
>>>
>> Difficult to say. I think that some drift is inevitable as the guest
>> and host will calibrate differently.
>>
>
> in the current version or even in long term?
>

It's a fundamental issue due to how PCs do time. They run a calibration
look during bootup, and if that's not 100% accurate, dirft will occur.

For the long term the solution is paravirtualized time.

> this means it's better to run ntpd on all guests even if it's running on
> the host:-((
>

I think there are issues with running ntp on the guest due to tsc being
very inaccurate on virtualized guests.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.