xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Paul Durrant <Paul.Durrant@citrix.com>,
	Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [Patch v3] x86/time: Update wallclock in shared info when altering domain time offset
Date: Wed, 17 Jul 2013 12:05:55 +0100	[thread overview]
Message-ID: <1374059155-14647-1-git-send-email-andrew.cooper3@citrix.com> (raw)

domain_set_time_offset() udpates d->time_offset_seconds, but does not correct
the wallclock in the shared info, meaning that it is incorrect until the next
XENPF_settime hypercall from dom0 which resynchronises the wallclock for all
domains.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: Paul Durrant <Paul.Durrant@citrix.com>
---
This should be backported to all stable releases.

Changes since v2:
 * No real need to write the wallclock at shinfo-create time.  Given f8e8fd56,
   it will be correct before an HVM PV aware domain can actually get at it,
   and this avoids use of a global lock (even though the use is brief).

Changes since v1:
 * s/watchdog/wallclock/ - Stupid typo.
---
 xen/arch/x86/time.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index cf8bc78..f047cb3 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -931,6 +931,7 @@ void domain_set_time_offset(struct domain *d, int32_t time_offset_seconds)
     d->time_offset_seconds = time_offset_seconds;
     if ( is_hvm_domain(d) )
         rtc_update_clock(d);
+    update_domain_wallclock_time(d);
 }
 
 int cpu_frequency_change(u64 freq)
-- 
1.7.10.4

             reply	other threads:[~2013-07-17 11:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 11:05 Andrew Cooper [this message]
2013-07-17 16:32 ` [Patch v3] x86/time: Update wallclock in shared info when altering domain time offset Keir Fraser

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=1374059155-14647-1-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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;
as well as URLs for NNTP newsgroup(s).