diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-05-09 12:18:14 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-05-09 12:18:14 +0100 |
commit | 23f69b133ff877305f3ec81e37d52cfa1f85d319 (patch) | |
tree | 6c85d2cb9dd61e0869c25c56af44df30775de846 | |
parent | a837412a69494cd1546f1626b5a90b75c56ba7be (diff) | |
download | xen-23f69b133ff877305f3ec81e37d52cfa1f85d319.tar.gz xen-23f69b133ff877305f3ec81e37d52cfa1f85d319.tar.bz2 xen-23f69b133ff877305f3ec81e37d52cfa1f85d319.zip |
x86: set ARAT feature flag for non-buggy AMD CPUs
This is the equivalent of a recent Linux change.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset: 23290:1ac7336b6298
xen-unstable date: Sun May 01 10:14:15 2011 +0100
-rw-r--r-- | xen/arch/x86/cpu/amd.c | 4 | ||||
-rw-r--r-- | xen/include/asm-x86/amd.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c index 4f3cdd9612..9a840bc7d6 100644 --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -608,6 +608,10 @@ static void __devinit init_amd(struct cpuinfo_x86 *c) } #endif + /* As a rule processors have APIC timer running in deep C states */ + if (c->x86 >= 0xf && !cpu_has_amd_erratum(c, AMD_ERRATUM_400)) + set_bit(X86_FEATURE_ARAT, c->x86_capability); + /* Prevent TSC drift in non single-processor, single-core platforms. */ if ((smp_processor_id() == 1) && c1_ramping_may_cause_clock_drift(c)) disable_c1_ramping(); diff --git a/xen/include/asm-x86/amd.h b/xen/include/asm-x86/amd.h index d7fb1a5b53..283c172074 100644 --- a/xen/include/asm-x86/amd.h +++ b/xen/include/asm-x86/amd.h @@ -134,6 +134,10 @@ AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf), \ AMD_MODEL_RANGE(0x12, 0x0, 0x0, 0x1, 0x0)) +#define AMD_ERRATUM_400 \ + AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf), \ + AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf)) + struct cpuinfo_x86; int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...); |