x86: command line parameter to disable ARAT
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 5 Nov 2013 15:21:51 +0000 (16:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 5 Nov 2013 15:21:51 +0000 (16:21 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
docs/misc/xen-command-line.markdown
xen/arch/x86/cpu/amd.c
xen/arch/x86/cpu/common.c
xen/arch/x86/cpu/cpu.h
xen/arch/x86/cpu/intel.c

index dc724738dd579324a2cd55356ebe9bff3ccfbbba..15aa4040b7a086bb140959d6a5f2074c8811588f 100644 (file)
@@ -155,6 +155,15 @@ to boot on systems with the following errata:
 
 Increase the verbosity of the APIC code from the default value.
 
+### arat
+> `= <boolean>`
+
+> Default: `true`
+
+Permit Xen to use "Always Running APIC Timer" support on compatible hardware
+in combination with cpuidle.  This option is only expected to be useful for
+developers wishing Xen to fall back to older timing methods on newer hardware.
+
 ### ats
 > `= <boolean>`
 
index 27b7f71d8b527063d2bc8dab1972f15697b98c33..472df680c8e8fda500dbe0b0e3a93256e8b9bef4 100644 (file)
@@ -502,7 +502,7 @@ static void __devinit init_amd(struct cpuinfo_x86 *c)
         * Family 0x12 and above processors have APIC timer
         * running in deep C states.
         */
-       if (c->x86 > 0x11)
+       if ( opt_arat && c->x86 > 0x11 )
                set_bit(X86_FEATURE_ARAT, c->x86_capability);
 
        /*
index e1220e658c7fb79b2def8db05a43c2c292646a77..32ca458303c5ba693d2977f95bd8073b586cf54b 100644 (file)
@@ -18,6 +18,9 @@
 static bool_t __cpuinitdata use_xsave = 1;
 boolean_param("xsave", use_xsave);
 
+bool_t __devinitdata opt_arat = 1;
+boolean_param("arat", opt_arat);
+
 unsigned int __devinitdata opt_cpuid_mask_ecx = ~0u;
 integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx);
 unsigned int __devinitdata opt_cpuid_mask_edx = ~0u;
index 72c41ca80841ed29e2b54f6ad852ab1ec8bf5eaf..a7b74210797b85045d2559b57a5de29d78782ee8 100644 (file)
@@ -11,6 +11,7 @@ struct cpu_dev {
 
 extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
 
+extern bool_t opt_arat;
 extern unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx;
 extern unsigned int opt_cpuid_mask_xsave_eax;
 extern unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx;
index 31b69c955ce4d614ec0dba801f2e3b04884e8c40..e85521109cc34e662325184d59dc8dfdeb3f8c1d 100644 (file)
@@ -226,8 +226,9 @@ static void __devinit init_intel(struct cpuinfo_x86 *c)
                set_bit(X86_FEATURE_NONSTOP_TSC, c->x86_capability);
                set_bit(X86_FEATURE_TSC_RELIABLE, c->x86_capability);
        }
-       if ((c->cpuid_level >= 0x00000006) &&
-           (cpuid_eax(0x00000006) & (1u<<2)))
+       if ( opt_arat &&
+            ( c->cpuid_level >= 0x00000006 ) &&
+            ( cpuid_eax(0x00000006) & (1u<<2) ) )
                set_bit(X86_FEATURE_ARAT, c->x86_capability);
 }