|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86/tsc: Remove incorrect assertion from
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1305548645 -3600
# Node ID 16d12acccacf09126562ca16f91bd2532bba1e9b
# Parent 87084ca76c9c24ab0306d39a70d5daa65edf09ba
x86/tsc: Remove incorrect assertion from cstate_restore_tsc()...
..fix and move to write_tsc().
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 87084ca76c9c -r 16d12acccacf xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c Mon May 16 13:13:41 2011 +0100
+++ b/xen/arch/x86/smpboot.c Mon May 16 13:24:05 2011 +0100
@@ -175,7 +175,12 @@
while ( atomic_read(&tsc_count) != ((i<<1)-1) )
cpu_relax();
rmb();
- write_tsc(tsc_value);
+ /*
+ * If a CPU has been physically hotplugged, we may as well write
+ * to its TSC in spite of X86_FEATURE_TSC_RELIABLE. The platform does
+ * not sync up a new CPU's TSC for us.
+ */
+ __write_tsc(tsc_value);
atomic_inc(&tsc_count);
}
}
diff -r 87084ca76c9c -r 16d12acccacf xen/arch/x86/time.c
--- a/xen/arch/x86/time.c Mon May 16 13:13:41 2011 +0100
+++ b/xen/arch/x86/time.c Mon May 16 13:24:05 2011 +0100
@@ -686,8 +686,6 @@
if ( boot_cpu_has(X86_FEATURE_NONSTOP_TSC) )
return;
- ASSERT(boot_cpu_has(X86_FEATURE_TSC_RELIABLE));
-
write_tsc(stime2tsc(read_platform_stime()));
}
diff -r 87084ca76c9c -r 16d12acccacf xen/include/asm-x86/msr.h
--- a/xen/include/asm-x86/msr.h Mon May 16 13:13:41 2011 +0100
+++ b/xen/include/asm-x86/msr.h Mon May 16 13:24:05 2011 +0100
@@ -87,7 +87,13 @@
} while(0)
#endif
-#define write_tsc(val) wrmsrl(MSR_IA32_TSC, val)
+#define __write_tsc(val) wrmsrl(MSR_IA32_TSC, val)
+#define write_tsc(val) ({ \
+ /* Reliable TSCs are in lockstep across all CPUs. We should \
+ * never write to them. */ \
+ ASSERT(!boot_cpu_has(X86_FEATURE_TSC_RELIABLE)); \
+ __write_tsc(val); \
+})
#define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86/tsc: Remove incorrect assertion from cstate_restore_tsc()...,
Xen patchbot-unstable <=
|
|
|
|
|