[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Question on kvm_clock working ...

From: Jan Kiszka
Subject: Re: [Qemu-devel] Question on kvm_clock working ...
Date: Tue, 13 Sep 2011 15:08:35 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv: Gecko/20080226 SUSE/ Thunderbird/ Mnenhy/

On 2011-09-13 13:38, al pat wrote:
> Thanks Phillip.
> My current source is "kvm-clock".
> WHen I start my guest, it is in sync with the host clock.
> Then, I chance the time on my host - using "date --set ...". I don't see the
> guest update its time.
> I was expecting that the guest will detect host time change and change it?

That's not what kvmclock is supposed to provide. Besides a monotonic
clock source, it basically offers an alternative persistent clock, to
some degree replacing the emulated RTC. So updates of the host system
time are only recognized by the guest kernel when it reboots or

> So, when the host is exporting its system time and TSC values, does it go
> into the "emulated RTC" of the guest and the guest checks it only once? Or
> does the guest resync its clock with the host's value periodically?
> I can try to do: "hwclock --hctosys --utc" --- this is just to check. (I
> have kvm-clock as my clock source though).

Re-reading the RTC is a brute-force approach to re-synchronize with the
host. If potential clock jumps are OK for your use case, you can go that

Alternatives are using NTP against a time server or writing a RTC plugin
for NTP to synchronize against that local source (a colleague once wrote
such a plugin for a special guest, but it never made it into public AFAIK).


Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

reply via email to

[Prev in Thread] Current Thread [Next in Thread]