version 1.33, 2019/07/24 04:58:26 |
version 1.33.2.7, 2023/01/23 12:23:53 |
Line 82 static const char * const x86_features[] |
|
Line 82 static const char * const x86_features[] |
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (3) Linux mapping */ |
{ /* (3) Linux mapping */ |
"cxmmx", NULL, "cyrix_arr", "centaur_mcr", NULL, |
"cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", NULL, NULL, NULL, NULL, |
"constant_tsc", NULL, NULL, |
"constant_tsc", "up", "art", "arch_perfmon", |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
"pebs", "bts", NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
"rep_good", NULL, NULL, "acc_power", |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
"nopl", NULL, "xtopology", "tsc_reliable", |
|
"nonstop_tsc", "cpuid", "extd_apicid", "amd_dcm", |
|
"aperfmperf", "rapl", "nonstop_tsc_s3", "tsc_known_freq"}, |
|
|
{ /* (4) Intel-defined: 0x00000001 ecx */ |
{ /* (4) Intel-defined: 0x00000001 ecx */ |
"pni", "pclmulqdq", "dtes64", "monitor", "ds_cpl", "vmx", "smx", "est", |
"pni", "pclmulqdq", "dtes64", "monitor", "ds_cpl", "vmx", "smx", "est", |
Line 112 static const char * const x86_features[] |
|
Line 114 static const char * const x86_features[] |
|
|
|
{ /* (7) Linux mapping */ |
{ /* (7) Linux mapping */ |
NULL, NULL, "cpb", "ebp", NULL, "pln", "pts", "dtherm", |
NULL, NULL, "cpb", "ebp", NULL, "pln", "pts", "dtherm", |
"hw_pstate", "proc_feedback", "sme", NULL, |
"hw_pstate", "proc_feedback", NULL, NULL, |
NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, "ibrs", "ibpb", "stibp", NULL, NULL, NULL, NULL}, |
NULL, "ibrs", "ibpb", "stibp", NULL, NULL, NULL, NULL}, |
|
|
{ /* (8) Linux mapping */ |
{ /* (8) Linux mapping */ |
"tpr_shadow", "vnmi", "flexpriority", "ept", |
"tpr_shadow", "vnmi", "flexpriority", "ept", "vpid", NULL, NULL, NULL, |
"vpid", "npt", "lbrv", "svm_lock", |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, "vmmcall", |
"nrip_save", "tsc_scale", "vmcb_clean", "flushbyasid", |
NULL, "ept_ad", NULL, NULL, NULL, NULL, "tdx_guest", NULL, |
"decodeassists", "pausefilter", "pfthreshold", "vmmcall", |
|
NULL, "ept_ad", NULL, NULL, NULL, NULL, NULL, NULL, |
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (9) Intel-defined: 00000007 ebx */ |
{ /* (9) Intel-defined: 00000007 ebx */ |
"fsgsbase", "tsc_adjust", NULL, "bmi1", "hle", "avx2", NULL, "smep", |
"fsgsbase", "tsc_adjust", "sgx", "bmi1", "hle", "avx2", NULL, "smep", |
"bmi2", "erms", "invpcid", "rtm", "cqm", NULL, "mpx", "rdt_a", |
"bmi2", "erms", "invpcid", "rtm", "cqm", NULL, "mpx", "rdt_a", |
"avx512f", "avx512dq", "rdseed", "adx", |
"avx512f", "avx512dq", "rdseed", "adx", |
"smap", "avx512ifma", NULL, "clflushopt", |
"smap", "avx512ifma", NULL, "clflushopt", |
Line 139 static const char * const x86_features[] |
|
Line 139 static const char * const x86_features[] |
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (11) 0x0000000f:0 edx */ |
{ /* (11) Linux mapping */ |
NULL, "cqm_llc", NULL, NULL, NULL, NULL, NULL, NULL, |
"cqm_llc", "cqm_occup_llc", "cqm_mbm_total", "cqm_mbm_local", |
|
NULL, NULL, "split_lock_detect", NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (12) 0x0000000f:1 edx */ |
{ /* (12) Intel-defined 0x00000007:1 eax */ |
"cqm_occup_llc", "cqm_mbm_total", "cqm_mbm_local", NULL, |
|
NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, |
|
"avx_vnni", "avx512_bf16", NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (13) AMD 0x80000008 ebx */ |
{ /* (13) AMD 0x80000008 ebx */ |
"clzero", "irperf", "xsaveerptr", NULL, NULL, NULL, NULL, NULL, |
"clzero", "irperf", "xsaveerptr", NULL, "rdpru", NULL, NULL, NULL, |
NULL, "wbnoinvd", NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, "wbnoinvd", NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, "ppin", |
NULL, "virt_ssbd", NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, "virt_ssbd", NULL, "cppc", NULL, NULL, NULL, "brs"}, |
|
|
{ /* (14) 0x00000006 eax */ |
{ /* (14) 0x00000006 eax */ |
"dtherm", "ida", "arat", NULL, "pln", NULL, "pts", "hwp", |
"dtherm", "ida", "arat", NULL, "pln", NULL, "pts", "hwp", |
"hwp_notify", "hwp_act_window", "hwp_epp","hwp_pkg_req", |
"hwp_notify", "hwp_act_window", "hwp_epp","hwp_pkg_req", |
NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, "hfi", NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (15) 0x8000000a edx */ |
{ /* (15) AMD 0x8000000a edx */ |
"npt", "lbrv", "svm_lock", "nrip_save", |
"npt", "lbrv", "svm_lock", "nrip_save", |
"tsc_scale", "vmcb_clean", "flushbyasid", "decodeassists", |
"tsc_scale", "vmcb_clean", "flushbyasid", "decodeassists", |
NULL, NULL, "pausefilter", NULL, "pfthreshold", "avic", NULL, |
NULL, NULL, "pausefilter", NULL, "pfthreshold", "avic", NULL, |
"v_vmsave_vmload", |
"v_vmsave_vmload", |
"vgif", NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
"vgif", NULL, "x2avic", NULL, "v_spec_ctrl", NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (16) 0x00000007:0 ecx */ |
{ /* (16) 0x00000007:0 ecx */ |
Line 179 static const char * const x86_features[] |
|
Line 180 static const char * const x86_features[] |
|
"gfni", "vaes", "vpclmulqdq", "avx512_vnni", |
"gfni", "vaes", "vpclmulqdq", "avx512_vnni", |
"avx512_bitalg", "tme", "avx512_vpopcntdq", NULL, |
"avx512_bitalg", "tme", "avx512_vpopcntdq", NULL, |
"la57", NULL, NULL, NULL, NULL, NULL, "rdpid", NULL, |
"la57", NULL, NULL, NULL, NULL, NULL, "rdpid", NULL, |
NULL, "cldemote", NULL, "movdiri", "movdir64b", NULL, NULL, NULL}, |
NULL, "cldemote", NULL, "movdiri", |
|
"movdir64b", "enqcmd", "sgx_lc", NULL}, |
|
|
{ /* (17) 0x80000007 ebx */ |
{ /* (17) AMD 0x80000007 ebx */ |
"overflow_recov", "succor", NULL, "smca", NULL, NULL, NULL, NULL, |
"overflow_recov", "succor", NULL, "smca", NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
|
|
{ /* (18) Intel 0x00000007 edx */ |
{ /* (18) Intel 0x00000007 edx */ |
NULL, NULL, "avx512_4vnniw", "avx512_4fmaps", NULL, NULL, NULL, NULL, |
NULL, NULL, "avx512_4vnniw", "avx512_4fmaps", "fsrm", NULL, NULL, NULL, |
NULL, NULL, "md_clear", NULL, NULL, NULL, NULL, NULL, |
"vp2intersect", NULL, "md_clear", NULL, NULL, NULL, "serialize", NULL, |
NULL, NULL, "pconfig", NULL, NULL, NULL, NULL, NULL, |
"tsxldtrk", NULL, "pconfig", "arch_lbr", |
NULL, NULL, NULL, NULL, |
"ibt", NULL, "amx_bf16", "avx512_fp16", |
|
"amx_tile", "amx_int8", NULL, NULL, |
"flush_l1d", "arch_capabilities", NULL, "ssbd"}, |
"flush_l1d", "arch_capabilities", NULL, "ssbd"}, |
|
|
|
{ /* (19) AMD 0x8000001f eax */ |
|
"sme", "sev", NULL, "sev_es", NULL, NULL, NULL, NULL, |
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
}; |
}; |
|
|
static int procfs_getonecpu(int, struct cpu_info *, char *, size_t *); |
static int procfs_getonecpu(int, struct cpu_info *, char *, size_t *); |
Line 272 procfs_getonecpufeatures(struct cpu_info |
|
Line 281 procfs_getonecpufeatures(struct cpu_info |
|
|
|
/* x86_features[2] is for Transmeta */ |
/* x86_features[2] is for Transmeta */ |
/* x86_features[3] is Linux defined mapping */ |
/* x86_features[3] is Linux defined mapping */ |
|
|
procfs_getonefeatreg(ci->ci_feat_val[1], x86_features[4], p + diff, |
procfs_getonefeatreg(ci->ci_feat_val[1], x86_features[4], p + diff, |
left); |
left); |
diff = last - *left; |
diff = last - *left; |
Line 299 procfs_getonecpufeatures(struct cpu_info |
|
Line 308 procfs_getonecpufeatures(struct cpu_info |
|
diff = last - *left; |
diff = last - *left; |
} |
} |
|
|
if (ci->ci_max_cpuid >= 0x0f) { |
/* x86_features[11] is Linux defined mapping */ |
x86_cpuid2(0x0f, 0, descs); |
|
procfs_getonefeatreg(descs[3], x86_features[11], p + diff, |
|
left); |
|
diff = last - *left; |
|
|
|
x86_cpuid2(0x0f, 1, descs); |
if (ci->ci_max_cpuid >= 0x07) { |
procfs_getonefeatreg(descs[3], x86_features[12], p + diff, |
x86_cpuid2(0x07, 1, descs); |
|
procfs_getonefeatreg(descs[0], x86_features[12], p + diff, |
left); |
left); |
diff = last - *left; |
diff = last - *left; |
} |
} |
Line 354 procfs_getonecpufeatures(struct cpu_info |
|
Line 360 procfs_getonecpufeatures(struct cpu_info |
|
diff = last - *left; |
diff = last - *left; |
} |
} |
|
|
|
if ((cpu_vendor == CPUVENDOR_AMD) |
|
&& (ci->ci_max_ext_cpuid >= 0x80000019)) { |
|
x86_cpuid(0x8000001f, descs); |
|
procfs_getonefeatreg(descs[0], x86_features[19], p + diff, |
|
left); |
|
diff = last - *left; |
|
} |
|
|
return 0; /* XXX */ |
return 0; /* XXX */ |
} |
} |
|
|