|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86: Decode CPUID for TSC guarantees.
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1229341034 0
# Node ID f827181eadd4f3f8f6afb37b493e9c9e1d511204
# Parent 65bbc9ec3849e36b4bf1cab5107b4f347d6cd9f5
x86: Decode CPUID for TSC guarantees.
Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
---
xen/arch/x86/cpu/amd.c | 4 +++-
xen/arch/x86/cpu/intel.c | 4 ++++
xen/include/asm-x86/cpufeature.h | 1 +
3 files changed, 8 insertions(+), 1 deletion(-)
diff -r 65bbc9ec3849 -r f827181eadd4 xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c Mon Dec 15 11:23:22 2008 +0000
+++ b/xen/arch/x86/cpu/amd.c Mon Dec 15 11:37:14 2008 +0000
@@ -461,8 +461,10 @@ static void __devinit init_amd(struct cp
if (cpuid_eax(0x80000000) >= 0x80000007) {
c->x86_power = cpuid_edx(0x80000007);
- if (c->x86_power & (1<<8))
+ if (c->x86_power & (1<<8)) {
set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
+ set_bit(X86_FEATURE_NOSTOP_TSC, c->x86_capability);
+ }
}
#ifdef CONFIG_X86_HT
diff -r 65bbc9ec3849 -r f827181eadd4 xen/arch/x86/cpu/intel.c
--- a/xen/arch/x86/cpu/intel.c Mon Dec 15 11:23:22 2008 +0000
+++ b/xen/arch/x86/cpu/intel.c Mon Dec 15 11:37:14 2008 +0000
@@ -218,6 +218,10 @@ static void __devinit init_intel(struct
if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
(c->x86 == 0x6 && c->x86_model >= 0x0e))
set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
+ if (cpuid_edx(0x80000007) & (1u<<8)) {
+ set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
+ set_bit(X86_FEATURE_NOSTOP_TSC, c->x86_capability);
+ }
start_vmx();
}
diff -r 65bbc9ec3849 -r f827181eadd4 xen/include/asm-x86/cpufeature.h
--- a/xen/include/asm-x86/cpufeature.h Mon Dec 15 11:23:22 2008 +0000
+++ b/xen/include/asm-x86/cpufeature.h Mon Dec 15 11:37:14 2008 +0000
@@ -74,6 +74,7 @@
#define X86_FEATURE_P3 (3*32+ 6) /* P3 */
#define X86_FEATURE_P4 (3*32+ 7) /* P4 */
#define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */
+#define X86_FEATURE_NOSTOP_TSC (3*32+ 9) /* TSC does not stop in C states */
/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
_______________________________________________
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: Decode CPUID for TSC guarantees.,
Xen patchbot-unstable <=
|
|
|
|
|