facts: add facts about x86_64 flags to detect microarchitecture (#83356)

Fixes: #83331

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/83381/head
Abhijeet Kasurde 6 months ago committed by GitHub
parent 0a311f6669
commit 16ebeb7d21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,3 @@
---
bugfixes:
- facts - add facts about x86_64 flags to detect microarchitecture (https://github.com/ansible/ansible/issues/83331).

@ -209,6 +209,9 @@ class LinuxHardware(Hardware):
if 'vme' not in val: if 'vme' not in val:
xen_paravirt = True xen_paravirt = True
if key == "flags":
cpu_facts['flags'] = val.split()
# model name is for Intel arch, Processor (mind the uppercase P) # model name is for Intel arch, Processor (mind the uppercase P)
# works for some ARM devices, like the Sheevaplug. # works for some ARM devices, like the Sheevaplug.
if key in ['model name', 'Processor', 'vendor_id', 'cpu', 'Vendor', 'processor']: if key in ['model name', 'Processor', 'vendor_id', 'cpu', 'Vendor', 'processor']:

@ -17,9 +17,7 @@ fpu : yes
fpu_exception : yes fpu_exception : yes
cpuid level : 13 cpuid level : 13
wp : yes wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp l' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm pti fsgsbase tsc_adjust smep erms xsaveopt arat
m constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadlin'
e_timer aes xsave avx f16c rdrand hypervisor lahf_lm pti fsgsbase tsc_adjust smep erms xsaveopt arat
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips : 5602.32 bogomips : 5602.32
clflush size : 64 clflush size : 64
@ -45,9 +43,7 @@ fpu : yes
fpu_exception : yes fpu_exception : yes
cpuid level : 13 cpuid level : 13
wp : yes wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp l' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm pti fsgsbase tsc_adjust smep erms xsaveopt arat
m constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadlin'
e_timer aes xsave avx f16c rdrand hypervisor lahf_lm pti fsgsbase tsc_adjust smep erms xsaveopt arat
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips : 5602.32 bogomips : 5602.32
clflush size : 64 clflush size : 64

@ -16,8 +16,7 @@ fpu : yes
fpu_exception : yes fpu_exception : yes
cpuid level : 1 cpuid level : 1
wp : yes wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt ' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
bogomips : 1994.60 bogomips : 1994.60
TLB size : 1024 4K pages TLB size : 1024 4K pages
clflush size : 64 clflush size : 64
@ -42,8 +41,7 @@ fpu : yes
fpu_exception : yes fpu_exception : yes
cpuid level : 1 cpuid level : 1
wp : yes wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt ' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
bogomips : 1994.60 bogomips : 1994.60
TLB size : 1024 4K pages TLB size : 1024 4K pages
clflush size : 64 clflush size : 64
@ -68,8 +66,7 @@ fpu : yes
fpu_exception : yes fpu_exception : yes
cpuid level : 1 cpuid level : 1
wp : yes wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt ' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
bogomips : 1994.60 bogomips : 1994.60
TLB size : 1024 4K pages TLB size : 1024 4K pages
clflush size : 64 clflush size : 64
@ -94,8 +91,7 @@ fpu : yes
fpu_exception : yes fpu_exception : yes
cpuid level : 1 cpuid level : 1
wp : yes wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt ' flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
rdtscp lm 3dnowext 3dnow art rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy retpoline_amd vmmcall
bogomips : 1994.60 bogomips : 1994.60
TLB size : 1024 4K pages TLB size : 1024 4K pages
clflush size : 64 clflush size : 64

@ -434,6 +434,15 @@ CPU_INFO_TEST_SCENARIOS = [
'processor_count': 2, 'processor_count': 2,
'processor_nproc': 4, 'processor_nproc': 4,
'processor_threads_per_core': 1, 'processor_threads_per_core': 1,
'flags': [
'fpu', 'vme', 'de', 'pse', 'tsc', 'msr', 'pae', 'mce',
'cx8', 'apic', 'sep', 'mtrr', 'pge', 'mca', 'cmov', 'pat',
'pse36', 'clflush', 'mmx', 'fxsr', 'sse', 'sse2', 'ht',
'syscall', 'nx', 'mmxext', 'fxsr_opt', 'rdtscp', 'lm',
'3dnowext', '3dnow', 'art', 'rep_good', 'nopl', 'extd_apicid',
'pni', 'cx16', 'lahf_lm', 'cmp_legacy', 'svm', 'extapic',
'cr8_legacy', 'retpoline_amd', 'vmmcall'
],
'processor_vcpus': 4}, 'processor_vcpus': 4},
}, },
{ {
@ -456,6 +465,21 @@ CPU_INFO_TEST_SCENARIOS = [
'processor_count': 1, 'processor_count': 1,
'processor_nproc': 4, 'processor_nproc': 4,
'processor_threads_per_core': 2, 'processor_threads_per_core': 2,
'flags': [
'fpu', 'vme', 'de', 'pse', 'tsc', 'msr', 'pae', 'mce',
'cx8', 'apic', 'sep', 'mtrr', 'pge', 'mca', 'cmov',
'pat', 'pse36', 'clflush', 'dts', 'acpi', 'mmx', 'fxsr',
'sse', 'sse2', 'ss', 'ht', 'tm', 'pbe', 'syscall', 'nx',
'pdpe1gb', 'rdtscp', 'lm', 'constant_tsc', 'arch_perfmon',
'pebs', 'bts', 'rep_good', 'nopl', 'xtopology', 'nonstop_tsc',
'aperfmperf', 'eagerfpu', 'pni', 'pclmulqdq', 'dtes64', 'monitor',
'ds_cpl', 'vmx', 'smx', 'est', 'tm2', 'ssse3', 'sdbg', 'fma', 'cx16',
'xtpr', 'pdcm', 'pcid', 'sse4_1', 'sse4_2', 'x2apic', 'movbe',
'popcnt', 'tsc_deadline_timer', 'aes', 'xsave', 'avx', 'f16c',
'rdrand', 'lahf_lm', 'abm', 'epb', 'tpr_shadow', 'vnmi', 'flexpriority',
'ept', 'vpid', 'fsgsbase', 'tsc_adjust', 'bmi1', 'avx2', 'smep', 'bmi2',
'erms', 'invpcid', 'xsaveopt', 'dtherm', 'ida', 'arat', 'pln', 'pts'
],
'processor_vcpus': 8}, 'processor_vcpus': 8},
}, },
{ {
@ -507,6 +531,16 @@ CPU_INFO_TEST_SCENARIOS = [
'processor_count': 2, 'processor_count': 2,
'processor_nproc': 2, 'processor_nproc': 2,
'processor_threads_per_core': 1, 'processor_threads_per_core': 1,
'flags': [
'fpu', 'vme', 'de', 'pse', 'tsc', 'msr', 'pae', 'mce', 'cx8', 'apic',
'sep', 'mtrr', 'pge', 'mca', 'cmov', 'pat', 'pse36', 'clflush', 'mmx',
'fxsr', 'sse', 'sse2', 'ss', 'syscall', 'nx', 'pdpe1gb', 'rdtscp', 'lm',
'constant_tsc', 'arch_perfmon', 'rep_good', 'nopl', 'xtopology',
'cpuid', 'tsc_known_freq', 'pni', 'pclmulqdq', 'ssse3', 'cx16',
'pcid', 'sse4_1', 'sse4_2', 'x2apic', 'popcnt', 'tsc_deadline_timer',
'aes', 'xsave', 'avx', 'f16c', 'rdrand', 'hypervisor', 'lahf_lm',
'pti', 'fsgsbase', 'tsc_adjust', 'smep', 'erms', 'xsaveopt', 'arat'
],
'processor_vcpus': 2}, 'processor_vcpus': 2},
}, },
{ {

Loading…
Cancel
Save