cpuid, x86: Enabling more features in CPUid
authorAlexandru Dutu <alexandru.dutu@amd.com>
Mon, 24 Nov 2014 02:01:08 +0000 (18:01 -0800)
committerAlexandru Dutu <alexandru.dutu@amd.com>
Mon, 24 Nov 2014 02:01:08 +0000 (18:01 -0800)
Adding more features in the CPUid with the purpose of supporting running the
KvmCPU in SE mode.

src/arch/x86/cpuid.cc

index f3f9a82d7a2a043e46d428eae9061d9484659f11..de11195e007009d711b6e3dab2eb3eb860a506e1 100644 (file)
@@ -96,8 +96,15 @@ namespace X86ISA {
                         stringToRegister(vendorString + 8));
                 break;
               case FamilyModelSteppingBrandFeatures:
+                /** Features Enabling
+                 * rdx, enabling most of the features except:
+                 * FXSR, FFXSR, Page1GB in EDX
+                 *
+                 * rcx, disabling most of the features except:
+                 * SSE4A, XOP, FMA4 in ECX
+                 */
                 result = CpuidResult(0x00020f51, 0x00000405,
-                                     0xe3d3fbff, 0x00000001);
+                                     0xe3d3fbff, 0x00010840);
                 break;
               case NameString1:
               case NameString2:
@@ -153,8 +160,15 @@ namespace X86ISA {
                         stringToRegister(vendorString + 8));
                 break;
               case FamilyModelStepping:
+                /** Features Enabling
+                 * rdx, enabling most of the features except:
+                 * HTT in EDX
+                 *
+                 * rcx, disabling most of the features except:
+                 * SSE3, SSSE3, FMA, SSE41, XSAVE, AVX in ECX
+                 */
                 result = CpuidResult(0x00020f51, 0x00000805,
-                                     0xe7dbfbff, 0x00000001);
+                                     0xe7dbfbff, 0x14081201);
                 break;
               default:
                 warn("x86 cpuid: unimplemented function %u", funcNum);