All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bruce Rogers" <BROGERS@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>, xen-devel@lists.xensource.com
Subject: Re: [PATCHl] localtime basis for paravirtualized guests
Date: Wed, 21 Jun 2006 15:23:18 -0600	[thread overview]
Message-ID: <44996456.092E.0048.1@novell.com> (raw)
In-Reply-To: <220a261ede8f0089ecc6a7c408cea2b8@cl.cam.ac.uk>

The way Linux gets its UTC time when it is running from a locatime
time base is that hwclock is called from the init scripts and it reads
/dev/rtc, offsets that value by the local time offset, and resets the
kernel's time via the settimeofday system call.  So if /dev/rtc was
tied straight into the time retrieved from Xen (speaking of the 
DomU case) this all works correctly to reset the kernel's sense
of time to be UTC.  As it stands today, hwclock fails because
neither /dev/rtc nor direct access to the RTC via port I/O is
there for a DomU.

Without the above actions taking place, the kernel is left
using localtime (from Xen) as if it was UTC, and the
localtime derived from that is off.  I've got the rtc.c code
hacked up to make it work but before I proceeded down that
path further, was interested in hearing what others thought
might be the best solution for allowing guests to use Xen as
a time basis, but be more flexible with managing its own time.

- Bruce

>>> On 6/21/2006 at 10:11 AM, in message
<220a261ede8f0089ecc6a7c408cea2b8@cl.cam.ac.uk>, Keir Fraser
<Keir.Fraser@cl.cam.ac.uk> wrote:

> On 21 Jun 2006, at 00:20, Bruce Rogers wrote:
> 
>> I should point out however that this by itself does not allow a
>> localtime
>> time base to be used for xenolinux.  That support would require
>> additional
>> changes to Linux (eg a Xen aware implementation of /dev/rtc &
etc.),
>> and
>> should probably be based on a more flexible and thorough
implementation
>> of
>> non-UTC guest time bases than what this patch provides.
> 
> I'm not sure what you mean here. If Xen adds an offset to wc_sec then

> XenLinux will see a different wallclock time. Right? RTC isn't
emulated 
> or used by domUs.
> 
>   -- Keir

  reply	other threads:[~2006-06-21 21:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28  3:40 wallclock time for paravirtualized guests Ian Pratt
2006-03-28 15:28 ` Bruce Rogers
2006-03-28 15:33   ` Keir Fraser
2006-03-31 20:22   ` [PATCHl] localtime basis " Bruce Rogers
2006-03-31 20:30     ` Muli Ben-Yehuda
2006-03-31 20:41       ` Bruce Rogers
2006-04-05 14:03     ` Keir Fraser
2006-04-05 14:30       ` Bruce Rogers
2006-06-20 23:20       ` Bruce Rogers
2006-06-21 15:29         ` B Thomas
2006-06-21 15:49           ` Keir Fraser
2006-06-21 16:01             ` Keir Fraser
2006-06-21 16:59               ` B Thomas
2006-06-21 16:11         ` Keir Fraser
2006-06-21 21:23           ` Bruce Rogers [this message]
2006-06-21 21:45             ` Keir Fraser
2006-06-21 22:16               ` Bruce Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44996456.092E.0048.1@novell.com \
    --to=brogers@novell.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.