intel: Stricter check for cpuid feature mask MSR availability.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 10 Jul 2008 10:26:42 +0000 (11:26 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 10 Jul 2008 10:26:42 +0000 (11:26 +0100)
Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Jun Nakajima <nakajima.jun@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/cpu/intel.c

index 1025097d21064b9b48f0f8a8e0c41b1b675628a5..f8fdb8af286a294a11be0c1d42963c2ef5bf8ebb 100644 (file)
@@ -37,13 +37,14 @@ struct movsl_mask movsl_mask __read_mostly;
 
 static void __devinit set_cpuidmask(void)
 {
-       unsigned int eax, ebx, ecx, edx;
+       unsigned int eax, ebx, ecx, edx, model;
 
        if (!(opt_cpuid_mask_ecx | opt_cpuid_mask_edx))
                return;
 
        cpuid(0x00000001, &eax, &ebx, &ecx, &edx);
-       if (eax < 0x00010674) {
+       model = ((eax & 0xf0000) >> 12) | ((eax & 0xf0) >> 4);
+       if (!((model == 0x1d) || ((model == 0x17) && ((eax & 0xf) >= 4)))) {
                printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n",
                       smp_processor_id());
                return;