qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v3 0/5] Improve PC RTC emulation


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH v3 0/5] Improve PC RTC emulation
Date: Tue, 15 Sep 2009 20:51:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Jamie Lokier wrote:
> Jan Kiszka wrote:
>> The aim of this series is to allow using the emulated PC RTC (MC146818)
>> as a reliable time source for guests. This is particularly useful if the
>> host runs NTP or has otherwise access to an accurate clock while the
>> guest has not (no network, impossible to add an NTP implementation
>> etc.).
> 
> I approve of these patches.
> 
> But still, how exactly is it useful, without NTP?  Afaik, Linux does
> not read the RTC except once at boot time, so it probably still needs
> NTP or something like it to have reliable time.  However, it does
> _write_ the RTC every 11 minutes if running NTP - does that affect the
> emulated behaviour?  Or does the emulated RTC ignore writes?

Nope, it accepts writes and simply gain a larger offset to the host
clock this way. The same happens via -rtc base=localtime or
base=<some-date> BTW.

To make use of this new "accurate" RTC, Linux users should already be
fine with adjtimex --adjust. We are currently evaluating this approach.
The brute-force solution is still to run hwclock --hctosys in a loop.

> 
> Do any other OSes read the RTC more than once after boot?

(At least our proprietary one does. :) )

Some Windows versions are known to use the RTC's periodic tick instead
of the PIC or APIC as time source. They will also benefit from the
potential better accuracy of the host-based RTC (which also affects its
IRQ events).

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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