WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Disabling clock set in PV boot?

To: Xen <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Disabling clock set in PV boot?
From: Evan Lavelle <sa212+xen@xxxxxxxxxxx>
Date: Sat, 17 Oct 2009 14:52:35 +0100
Delivery-date: Sat, 17 Oct 2009 06:53:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AD8AF4C.902@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4AD83A8F.20506@xxxxxxxxxxx> <4AD8AF4C.902@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
Roy wrote:
I think that message is from CentOS (/etc/rc.sysinit) setting the clock from the hardware clock.

You're right, but unfortunately it doesn't help. rc.sysinit attempts to run 'hwclock --hctosys' to set the system time from the Hardware Clock. This is fine for non-Xenned kernels. In a Xen guest kernel, however:

1 - 'date' already shows the valid Dom0 time *before* 'hwclock --hctosys' is run; on bare metal, 'date' would have some sort of default value here

2 - hwclock fails, because guests don't have access to the "Hardware Clock"

3 - rc.sysinit then runs 'date' to get the system time to produce this boot message:

Setting clock (localtime) Fri Oct 16 09:43:52 BST 2009 [ OK ]

Note that this message is wrong for a Xen guest - the system clock set actually failed. The message just shows the Dom0 time that Xen has provided as the initial value of the system time.

Does anyone know how/where Xen actually sets the initial value of 'date', and whether it can be disabled?

Incidentally, 'independent_wallclock' is incorrectly named. If the guest wallclock was actually independent, then Dom0 wouldn't set it during boot. What it seems to mean is 'guest can set its own time, but only after Xen has already set the initial value'.

Thanks -

Evan

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users