提交 a0b62843 编写于 作者: B Brijesh Singh 提交者: Jiri Denemark

cpu: Add new EPYC CPU model

Add a new CPU model called 'EPYC' to model processors from AMD EPYC
family (which includes EPYC 76xx,75xx,74xx, 73xx and 72xx).

The following features bits have been added/removed compare to Opteron_G5

Added: monitor, movbe, rdrand, mmxext, ffxsr, rdtscp, cr8legacy, osvw,
       fsgsbase, bmi1, avx2, smep, bmi2, rdseed, adx, smap, clfshopt, sha
       xsaveopt, xsavec, xgetbv1, arat

Removed: xop, fma4, tbm

The patch is depend on EPYC CPU model supported introduced in qemu [1]

[1] https://patchwork.kernel.org/patch/9902205/

Cc: Tom Lendacky <Thomas.Lendacky@amd.com>
Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com>
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 5c83b360
...@@ -260,6 +260,9 @@ ...@@ -260,6 +260,9 @@
<feature name='avx512cd'> <feature name='avx512cd'>
<cpuid eax_in='0x07' ecx_in='0x00' ebx='0x10000000'/> <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x10000000'/>
</feature> </feature>
<feature name='sha-ni'>
<cpuid eax_in='0x07' ecx_in='0x00' ebx='0x20000000'/>
</feature>
<feature name='avx512bw'> <feature name='avx512bw'>
<cpuid eax_in='0x07' ecx_in='0x00' ebx='0x40000000'/> <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x40000000'/>
</feature> </feature>
...@@ -1545,6 +1548,77 @@ ...@@ -1545,6 +1548,77 @@
<feature name='xop'/> <feature name='xop'/>
<feature name='xsave'/> <feature name='xsave'/>
</model> </model>
<model name='EPYC'>
<signature family='23' model='1'/>
<vendor name='AMD'/>
<feature name='3dnowprefetch'/>
<feature name='abm'/>
<feature name='adx'/>
<feature name='aes'/>
<feature name='apic'/>
<feature name='arat'/>
<feature name='avx'/>
<feature name='avx2'/>
<feature name='bmi1'/>
<feature name='bmi2'/>
<feature name='clflush'/>
<feature name='clflushopt'/>
<feature name='cmov'/>
<feature name='cr8legacy'/>
<feature name='cx16'/>
<feature name='cx8'/>
<feature name='de'/>
<feature name='f16c'/>
<feature name='fma'/>
<feature name='fpu'/>
<feature name='fsgsbase'/>
<feature name='fxsr'/>
<feature name='fxsr_opt'/>
<feature name='lahf_lm'/>
<feature name='lm'/>
<feature name='mca'/>
<feature name='mce'/>
<feature name='misalignsse'/>
<feature name='mmx'/>
<feature name='mmxext'/>
<feature name='monitor'/>
<feature name='movbe'/>
<feature name='msr'/>
<feature name='mtrr'/>
<feature name='nx'/>
<feature name='osvw'/>
<feature name='pae'/>
<feature name='pat'/>
<feature name='pclmuldq'/>
<feature name='pdpe1gb'/>
<feature name='pge'/>
<feature name='pni'/>
<feature name='popcnt'/>
<feature name='pse'/>
<feature name='pse36'/>
<feature name='rdrand'/>
<feature name='rdseed'/>
<feature name='rdtscp'/>
<feature name='sep'/>
<feature name='sha-ni'/>
<feature name='smap'/>
<feature name='smep'/>
<feature name='sse'/>
<feature name='sse2'/>
<feature name='sse4.1'/>
<feature name='sse4.2'/>
<feature name='sse4a'/>
<feature name='ssse3'/>
<feature name='svm'/>
<feature name='syscall'/>
<feature name='tsc'/>
<feature name='vme'/>
<feature name='xgetbv1'/>
<feature name='xsave'/>
<feature name='xsavec'/>
<feature name='xsaveopt'/>
</model>
</arch> </arch>
<arch name='ppc64'> <arch name='ppc64'>
......
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='forbid'>Opteron_G5</model> <model fallback='forbid'>EPYC</model>
<vendor>AMD</vendor> <vendor>AMD</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='ht'/> <feature policy='require' name='ht'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='osxsave'/> <feature policy='require' name='osxsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='avx2'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='rdseed'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xsavec'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='xsaves'/> <feature policy='require' name='xsaves'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='cmp_legacy'/> <feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='extapic'/> <feature policy='require' name='extapic'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='skinit'/> <feature policy='require' name='skinit'/>
<feature policy='require' name='wdt'/> <feature policy='require' name='wdt'/>
<feature policy='require' name='tce'/> <feature policy='require' name='tce'/>
...@@ -34,7 +13,4 @@ ...@@ -34,7 +13,4 @@
<feature policy='require' name='perfctr_core'/> <feature policy='require' name='perfctr_core'/>
<feature policy='require' name='perfctr_nb'/> <feature policy='require' name='perfctr_nb'/>
<feature policy='require' name='invtsc'/> <feature policy='require' name='invtsc'/>
<feature policy='disable' name='xop'/>
<feature policy='disable' name='fma4'/>
<feature policy='disable' name='tbm'/>
</cpu> </cpu>
<cpu> <cpu>
<arch>x86_64</arch> <arch>x86_64</arch>
<model>Opteron_G3</model> <model>EPYC</model>
<vendor>AMD</vendor> <vendor>AMD</vendor>
<feature name='vme'/>
<feature name='ht'/> <feature name='ht'/>
<feature name='pclmuldq'/>
<feature name='ssse3'/>
<feature name='fma'/>
<feature name='sse4.1'/>
<feature name='sse4.2'/>
<feature name='movbe'/>
<feature name='aes'/>
<feature name='xsave'/>
<feature name='osxsave'/> <feature name='osxsave'/>
<feature name='avx'/>
<feature name='f16c'/>
<feature name='rdrand'/>
<feature name='arat'/>
<feature name='fsgsbase'/>
<feature name='bmi1'/>
<feature name='avx2'/>
<feature name='smep'/>
<feature name='bmi2'/>
<feature name='rdseed'/>
<feature name='adx'/>
<feature name='smap'/>
<feature name='clflushopt'/>
<feature name='xsaveopt'/>
<feature name='xsavec'/>
<feature name='xgetbv1'/>
<feature name='xsaves'/> <feature name='xsaves'/>
<feature name='mmxext'/>
<feature name='fxsr_opt'/>
<feature name='pdpe1gb'/>
<feature name='cmp_legacy'/> <feature name='cmp_legacy'/>
<feature name='extapic'/> <feature name='extapic'/>
<feature name='cr8legacy'/>
<feature name='3dnowprefetch'/>
<feature name='osvw'/>
<feature name='skinit'/> <feature name='skinit'/>
<feature name='wdt'/> <feature name='wdt'/>
<feature name='tce'/> <feature name='tce'/>
......
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='forbid'>Opteron_G5</model> <model fallback='forbid'>EPYC</model>
<vendor>AMD</vendor> <vendor>AMD</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='x2apic'/> <feature policy='require' name='x2apic'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='tsc-deadline'/> <feature policy='require' name='tsc-deadline'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/> <feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='tsc_adjust'/> <feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='avx2'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='rdseed'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xsavec'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='cmp_legacy'/> <feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='cr8legacy'/> <feature policy='disable' name='monitor'/>
<feature policy='require' name='osvw'/>
<feature policy='disable' name='svm'/> <feature policy='disable' name='svm'/>
<feature policy='disable' name='xop'/>
<feature policy='disable' name='fma4'/>
<feature policy='disable' name='tbm'/>
</cpu> </cpu>
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='forbid'>Opteron_G5</model> <model fallback='forbid'>EPYC</model>
<vendor>AMD</vendor> <vendor>AMD</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='ht'/> <feature policy='require' name='ht'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='osxsave'/> <feature policy='require' name='osxsave'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='avx2'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='rdseed'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xsavec'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='xsaves'/> <feature policy='require' name='xsaves'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='cmp_legacy'/> <feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='extapic'/> <feature policy='require' name='extapic'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='skinit'/> <feature policy='require' name='skinit'/>
<feature policy='require' name='wdt'/> <feature policy='require' name='wdt'/>
<feature policy='require' name='tce'/> <feature policy='require' name='tce'/>
...@@ -34,7 +13,4 @@ ...@@ -34,7 +13,4 @@
<feature policy='require' name='perfctr_core'/> <feature policy='require' name='perfctr_core'/>
<feature policy='require' name='perfctr_nb'/> <feature policy='require' name='perfctr_nb'/>
<feature policy='require' name='invtsc'/> <feature policy='require' name='invtsc'/>
<feature policy='disable' name='xop'/>
<feature policy='disable' name='fma4'/>
<feature policy='disable' name='tbm'/>
</cpu> </cpu>
<cpu> <cpu>
<arch>x86_64</arch> <arch>x86_64</arch>
<model>Opteron_G3</model> <model>EPYC</model>
<vendor>AMD</vendor> <vendor>AMD</vendor>
<feature name='vme'/>
<feature name='ht'/> <feature name='ht'/>
<feature name='pclmuldq'/>
<feature name='ssse3'/>
<feature name='fma'/>
<feature name='sse4.1'/>
<feature name='sse4.2'/>
<feature name='movbe'/>
<feature name='aes'/>
<feature name='xsave'/>
<feature name='osxsave'/> <feature name='osxsave'/>
<feature name='avx'/>
<feature name='f16c'/>
<feature name='rdrand'/>
<feature name='arat'/>
<feature name='fsgsbase'/>
<feature name='bmi1'/>
<feature name='avx2'/>
<feature name='smep'/>
<feature name='bmi2'/>
<feature name='rdseed'/>
<feature name='adx'/>
<feature name='smap'/>
<feature name='clflushopt'/>
<feature name='xsaveopt'/>
<feature name='xsavec'/>
<feature name='xgetbv1'/>
<feature name='xsaves'/> <feature name='xsaves'/>
<feature name='mmxext'/>
<feature name='fxsr_opt'/>
<feature name='pdpe1gb'/>
<feature name='cmp_legacy'/> <feature name='cmp_legacy'/>
<feature name='extapic'/> <feature name='extapic'/>
<feature name='cr8legacy'/>
<feature name='3dnowprefetch'/>
<feature name='osvw'/>
<feature name='skinit'/> <feature name='skinit'/>
<feature name='wdt'/> <feature name='wdt'/>
<feature name='tce'/> <feature name='tce'/>
......
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='forbid'>Opteron_G5</model> <model fallback='forbid'>EPYC</model>
<vendor>AMD</vendor> <vendor>AMD</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='x2apic'/> <feature policy='require' name='x2apic'/>
<feature policy='require' name='movbe'/>
<feature policy='require' name='tsc-deadline'/> <feature policy='require' name='tsc-deadline'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/> <feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='tsc_adjust'/> <feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='avx2'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='bmi2'/>
<feature policy='require' name='rdseed'/>
<feature policy='require' name='adx'/>
<feature policy='require' name='smap'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='xsavec'/>
<feature policy='require' name='xgetbv1'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='cmp_legacy'/> <feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='cr8legacy'/> <feature policy='disable' name='monitor'/>
<feature policy='require' name='osvw'/> <feature policy='disable' name='sha-ni'/>
<feature policy='disable' name='xop'/>
<feature policy='disable' name='fma4'/>
<feature policy='disable' name='tbm'/>
</cpu> </cpu>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册