Skip to content

Commit 22a866b

Browse files
bjzhjingehabkost
authored andcommitted
i386: Add new CPU model Cooperlake
Cooper Lake is intel's successor to Cascade Lake, the new CPU model inherits features from Cascadelake-Server, while add one platform associated new feature: AVX512_BF16. Meanwhile, add STIBP for speculative execution. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Tao Xu <tao3.xu@intel.com> Message-Id: <1571729728-23284-4-git-send-email-cathy.zhang@intel.com> Reviewed-by: Bruce Rogers <brogers@suse.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
1 parent 5af514d commit 22a866b

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

target/i386/cpu.c

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3159,6 +3159,66 @@ static X86CPUDefinition builtin_x86_defs[] = {
31593159
{ /* end of list */ }
31603160
}
31613161
},
3162+
{
3163+
.name = "Cooperlake",
3164+
.level = 0xd,
3165+
.vendor = CPUID_VENDOR_INTEL,
3166+
.family = 6,
3167+
.model = 85,
3168+
.stepping = 10,
3169+
.features[FEAT_1_EDX] =
3170+
CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX |
3171+
CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA |
3172+
CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC | CPUID_CX8 |
3173+
CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE |
3174+
CPUID_DE | CPUID_FP87,
3175+
.features[FEAT_1_ECX] =
3176+
CPUID_EXT_AVX | CPUID_EXT_XSAVE | CPUID_EXT_AES |
3177+
CPUID_EXT_POPCNT | CPUID_EXT_X2APIC | CPUID_EXT_SSE42 |
3178+
CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_SSSE3 |
3179+
CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3 |
3180+
CPUID_EXT_TSC_DEADLINE_TIMER | CPUID_EXT_FMA | CPUID_EXT_MOVBE |
3181+
CPUID_EXT_PCID | CPUID_EXT_F16C | CPUID_EXT_RDRAND,
3182+
.features[FEAT_8000_0001_EDX] =
3183+
CPUID_EXT2_LM | CPUID_EXT2_PDPE1GB | CPUID_EXT2_RDTSCP |
3184+
CPUID_EXT2_NX | CPUID_EXT2_SYSCALL,
3185+
.features[FEAT_8000_0001_ECX] =
3186+
CPUID_EXT3_ABM | CPUID_EXT3_LAHF_LM | CPUID_EXT3_3DNOWPREFETCH,
3187+
.features[FEAT_7_0_EBX] =
3188+
CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
3189+
CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
3190+
CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
3191+
CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
3192+
CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
3193+
CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
3194+
CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
3195+
CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
3196+
.features[FEAT_7_0_ECX] =
3197+
CPUID_7_0_ECX_PKU |
3198+
CPUID_7_0_ECX_AVX512VNNI,
3199+
.features[FEAT_7_0_EDX] =
3200+
CPUID_7_0_EDX_SPEC_CTRL | CPUID_7_0_EDX_STIBP |
3201+
CPUID_7_0_EDX_SPEC_CTRL_SSBD | CPUID_7_0_EDX_ARCH_CAPABILITIES,
3202+
.features[FEAT_ARCH_CAPABILITIES] =
3203+
MSR_ARCH_CAP_RDCL_NO | MSR_ARCH_CAP_IBRS_ALL |
3204+
MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY | MSR_ARCH_CAP_MDS_NO,
3205+
.features[FEAT_7_1_EAX] =
3206+
CPUID_7_1_EAX_AVX512_BF16,
3207+
/*
3208+
* Missing: XSAVES (not supported by some Linux versions,
3209+
* including v4.1 to v4.12).
3210+
* KVM doesn't yet expose any XSAVES state save component,
3211+
* and the only one defined in Skylake (processor tracing)
3212+
* probably will block migration anyway.
3213+
*/
3214+
.features[FEAT_XSAVE] =
3215+
CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC |
3216+
CPUID_XSAVE_XGETBV1,
3217+
.features[FEAT_6_EAX] =
3218+
CPUID_6_EAX_ARAT,
3219+
.xlevel = 0x80000008,
3220+
.model_id = "Intel Xeon Processor (Cooperlake)",
3221+
},
31623222
{
31633223
.name = "Icelake-Client",
31643224
.level = 0xd,

0 commit comments

Comments
 (0)