All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch v3] x86/time: Update wallclock in shared info when altering domain time offset
@ 2013-07-17 11:05 Andrew Cooper
  2013-07-17 16:32 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2013-07-17 11:05 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Paul Durrant, Keir Fraser, Jan Beulich

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch v3] x86/time: Update wallclock in shared info when altering domain time offset
  2013-07-17 11:05 [Patch v3] x86/time: Update wallclock in shared info when altering domain time offset Andrew Cooper
@ 2013-07-17 16:32 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2013-07-17 16:32 UTC (permalink / raw)
  To: Andrew Cooper, Xen-devel; +Cc: Paul Durrant, Jan Beulich

On 17/07/2013 12:05, "Andrew Cooper" <andrew.cooper3@citrix.com> wrote:

> 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>

Acked-by: Keir Fraser <keir@xen.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-17 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-17 11:05 [Patch v3] x86/time: Update wallclock in shared info when altering domain time offset Andrew Cooper
2013-07-17 16:32 ` Keir Fraser

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.