public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [ RfC / patch ] kvmclock fixes
Date: Mon, 21 Apr 2008 19:57:17 +1000	[thread overview]
Message-ID: <480C64FD.4040004@goop.org> (raw)
In-Reply-To: <480C516D.7080809@redhat.com>

Gerd Hoffmann wrote:
>   * Host: make kvm pv clock really compatible with xen pv clock.
>   * Guest/xen: factor out some xen clock code into a separate
>                source file (pvclock.[ch]), so kvm can reuse it.
>   * Guest/kvm: make kvm clock compatible with xen clock by using
>                the common code bits.
>   

I guess saving on code duplication is good...

> +cycle_t pvclock_clocksource_read(struct kvm_vcpu_time_info *src)
> +{
> +	struct pvclock_shadow_time *shadow = &get_cpu_var(shadow_time);
> +	cycle_t ret;
> +
> +	pvclock_get_time_values(shadow, src);
> +	ret = shadow->system_timestamp + pvclock_get_nsec_offset(shadow);
>   

You need to put this in a loop in case the system clock parameters 
change between the pvclock_get_time_values() and pvclock_get_nsec_offset().

How does kvm deal with suspend/resume with respect to time?  Is the 
"system" timestamp guaranteed to remain monotonic?  For Xen, I think 
we'll need to maintain an offset between the initial system timestamp 
and whatever it is after resuming.

    J

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-21  9:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07 11:53 paravirt clock stil causing hangs in kvm-65 Nikola Ciprich
2008-04-07 21:34 ` Marcelo Tosatti
2008-04-08  1:18   ` Marcelo Tosatti
2008-04-08  5:59     ` Nikola Ciprich
2008-04-19 15:29   ` Marcelo Tosatti
2008-04-19 16:22     ` Glauber Costa
2008-04-19 16:49       ` Marcelo Tosatti
2008-04-21  7:15         ` Gerd Hoffmann
2008-04-21  8:33           ` [ RfC / patch ] kvmclock fixes Gerd Hoffmann
2008-04-21  9:57             ` Jeremy Fitzhardinge [this message]
2008-04-21 13:01               ` Gerd Hoffmann
2008-04-21 13:38                 ` Jeremy Fitzhardinge
2008-04-24 13:20           ` paravirt clock stil causing hangs in kvm-65 Glauber Costa
2008-04-26 14:24             ` extmaillist
2008-04-19 16:29     ` Marcelo Tosatti

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=480C64FD.4040004@goop.org \
    --to=jeremy@goop.org \
    --cc=kraxel@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox