[kernel] r16679 - in dists/sid/linux-2.6/debian: . patches/bugfix/x86 patches/series
Ian Campbell
ijc-guest at alioth.debian.org
Tue Dec 7 13:30:14 UTC 2010
Author: ijc-guest
Date: Tue Dec 7 13:30:01 2010
New Revision: 16679
Log:
xen: handle potential time discontinuity on resume (Closes: #602273)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/x86/x86-pvclock-Zero-last_value-on-resume.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/29
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Tue Dec 7 04:41:49 2010 (r16678)
+++ dists/sid/linux-2.6/debian/changelog Tue Dec 7 13:30:01 2010 (r16679)
@@ -28,6 +28,7 @@
[ Ian Campbell ]
* xen: disable ACPI NUMA for PV guests and allow IRQ desc allocation on any
node (Closes: #603632)
+ * xen: handle potential time discontinuity on resume (Closes: #602273)
[ Martin Michlmayr ]
* Kirkwood: Add support for 6282 based QNAP devices.
Added: dists/sid/linux-2.6/debian/patches/bugfix/x86/x86-pvclock-Zero-last_value-on-resume.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/x86/x86-pvclock-Zero-last_value-on-resume.patch Tue Dec 7 13:30:01 2010 (r16679)
@@ -0,0 +1,64 @@
+From e7a3481c0246c8e45e79c629efd63b168e91fcda Mon Sep 17 00:00:00 2001
+From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Date: Mon, 25 Oct 2010 16:53:46 -0700
+Subject: [PATCH] x86/pvclock: Zero last_value on resume
+
+If the guest domain has been suspend/resumed or migrated, then the
+system clock backing the pvclock clocksource may revert to a smaller
+value (ie, can be non-monotonic across the migration/save-restore).
+
+Make sure we zero last_value in that case so that the domain
+continues to see clock updates.
+
+Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Signed-off-by: Ingo Molnar <mingo at elte.hu>
+[ijc: backported to 2.6.32, context in arch/x86/include/asm/pvclock.h]
+---
+ arch/x86/include/asm/pvclock.h | 1 +
+ arch/x86/kernel/pvclock.c | 5 +++++
+ arch/x86/xen/time.c | 2 ++
+ 3 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h
+index 7f7e577..31d84ac 100644
+--- a/arch/x86/include/asm/pvclock.h
++++ b/arch/x86/include/asm/pvclock.h
+@@ -11,5 +11,6 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src);
+ void pvclock_read_wallclock(struct pvclock_wall_clock *wall,
+ struct pvclock_vcpu_time_info *vcpu,
+ struct timespec *ts);
++void pvclock_resume(void);
+
+ #endif /* _ASM_X86_PVCLOCK_H */
+diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
+index 008b91e..42eb330 100644
+--- a/arch/x86/kernel/pvclock.c
++++ b/arch/x86/kernel/pvclock.c
+@@ -83,6 +83,11 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src)
+
+ static atomic64_t last_value = ATOMIC64_INIT(0);
+
++void pvclock_resume(void)
++{
++ atomic64_set(&last_value, 0);
++}
++
+ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
+ {
+ struct pvclock_shadow_time shadow;
+diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
+index b2bb5aa..5da5e53 100644
+--- a/arch/x86/xen/time.c
++++ b/arch/x86/xen/time.c
+@@ -426,6 +426,8 @@ void xen_timer_resume(void)
+ {
+ int cpu;
+
++ pvclock_resume();
++
+ if (xen_clockevent != &xen_vcpuop_clockevent)
+ return;
+
+--
+1.5.6.5
+
Modified: dists/sid/linux-2.6/debian/patches/series/29
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/29 Tue Dec 7 04:41:49 2010 (r16678)
+++ dists/sid/linux-2.6/debian/patches/series/29 Tue Dec 7 13:30:01 2010 (r16679)
@@ -18,3 +18,4 @@
+ features/arm/ts-plus.patch
+ features/all/bcm5974-report-ABS_MT-events.patch
+ bugfix/all/bcm5974-adjust-major-minor-to-scale.patch
++ bugfix/x86/x86-pvclock-Zero-last_value-on-resume.patch
More information about the Kernel-svn-changes
mailing list