[libvirt] [PATCH 0/2] Add new EPYC CPU model

Brijesh Singh (1): cpu: Add new EPYC CPU model Jiri Denemark (1): tests: Add CPUID data for AMD Ryzen 7 1800X Eight-Core Processor src/cpu/cpu_map.xml | 74 ++++++++ tests/cputest.c | 1 + ..._64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml | 9 + ...6_64-cpuid-Ryzen-7-1800X-Eight-Core-enabled.xml | 10 + ...x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml | 16 ++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml | 17 ++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml | 11 ++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core.json | 203 +++++++++++++++++++++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core.xml | 52 ++++++ 9 files changed, 393 insertions(+) create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-enabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.json create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.xml -- 2.14.1

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- tests/cputest.c | 1 + ..._64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml | 9 + ...6_64-cpuid-Ryzen-7-1800X-Eight-Core-enabled.xml | 10 + ...x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml | 40 ++++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml | 48 +++++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml | 32 ++++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core.json | 203 +++++++++++++++++++++ .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core.xml | 52 ++++++ 8 files changed, 395 insertions(+) create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-enabled.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.json create mode 100644 tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.xml diff --git a/tests/cputest.c b/tests/cputest.c index ebcade6bed..6e00e6ba4e 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -1001,6 +1001,7 @@ mymain(void) DO_TEST_CPUID(VIR_ARCH_X86_64, "Opteron-6282", false); DO_TEST_CPUID(VIR_ARCH_X86_64, "Pentium-P6100", false); DO_TEST_CPUID(VIR_ARCH_X86_64, "Phenom-B95", true); + DO_TEST_CPUID(VIR_ARCH_X86_64, "Ryzen-7-1800X-Eight-Core", true); DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-5110", false); DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E3-1245", true); DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-E5-2630", true); diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml new file mode 100644 index 0000000000..9ee1e78244 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml @@ -0,0 +1,9 @@ +<!-- Features disabled by QEMU --> +<cpudata arch='x86'> + <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x08000008' edx='0x10000000'/> + <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x20000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x01c23008' edx='0x00000000'/> + <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/> + <cpuid eax_in='0x8000000a' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x000014f6'/> +</cpudata> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-enabled.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-enabled.xml new file mode 100644 index 0000000000..9c85bb63a2 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-enabled.xml @@ -0,0 +1,10 @@ +<!-- Features enabled by QEMU --> +<cpudata arch='x86'> + <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0xf7f83203' edx='0x078bfbff'/> + <cpuid eax_in='0x00000006' ecx_in='0x00' eax='0x00000004' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x009c01ab' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000007' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x40000001' ecx_in='0x00' eax='0x010000fa' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x000003f7' edx='0x2e500800'/> + <cpuid eax_in='0x8000000a' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000009'/> +</cpudata> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml new file mode 100644 index 0000000000..fcad36e34e --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml @@ -0,0 +1,40 @@ +<cpu mode='custom' match='exact'> + <model fallback='forbid'>Opteron_G5</model> + <vendor>AMD</vendor> + <feature policy='require' name='vme'/> + <feature policy='require' name='ht'/> + <feature policy='require' name='monitor'/> + <feature policy='require' name='movbe'/> + <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='mmxext'/> + <feature policy='require' name='fxsr_opt'/> + <feature policy='require' name='cmp_legacy'/> + <feature policy='require' name='extapic'/> + <feature policy='require' name='cr8legacy'/> + <feature policy='require' name='osvw'/> + <feature policy='require' name='skinit'/> + <feature policy='require' name='wdt'/> + <feature policy='require' name='tce'/> + <feature policy='require' name='topoext'/> + <feature policy='require' name='perfctr_core'/> + <feature policy='require' name='perfctr_nb'/> + <feature policy='require' name='invtsc'/> + <feature policy='disable' name='xop'/> + <feature policy='disable' name='fma4'/> + <feature policy='disable' name='tbm'/> +</cpu> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml new file mode 100644 index 0000000000..19f6b1d4df --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml @@ -0,0 +1,48 @@ +<cpu> + <arch>x86_64</arch> + <model>Opteron_G3</model> + <vendor>AMD</vendor> + <feature name='vme'/> + <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='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='mmxext'/> + <feature name='fxsr_opt'/> + <feature name='pdpe1gb'/> + <feature name='cmp_legacy'/> + <feature name='extapic'/> + <feature name='cr8legacy'/> + <feature name='3dnowprefetch'/> + <feature name='osvw'/> + <feature name='skinit'/> + <feature name='wdt'/> + <feature name='tce'/> + <feature name='topoext'/> + <feature name='perfctr_core'/> + <feature name='perfctr_nb'/> + <feature name='invtsc'/> +</cpu> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml new file mode 100644 index 0000000000..2773147da6 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml @@ -0,0 +1,32 @@ +<cpu mode='custom' match='exact'> + <model fallback='forbid'>Opteron_G5</model> + <vendor>AMD</vendor> + <feature policy='require' name='vme'/> + <feature policy='require' name='x2apic'/> + <feature policy='require' name='movbe'/> + <feature policy='require' name='tsc-deadline'/> + <feature policy='require' name='rdrand'/> + <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='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='cr8legacy'/> + <feature policy='require' name='osvw'/> + <feature policy='disable' name='xop'/> + <feature policy='disable' name='fma4'/> + <feature policy='disable' name='tbm'/> +</cpu> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.json b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.json new file mode 100644 index 0000000000..7bb003d786 --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.json @@ -0,0 +1,203 @@ +{ + "return": { + "model": { + "name": "base", + "props": { + "pfthreshold": false, + "pku": false, + "rtm": false, + "tsc_adjust": true, + "tsc-deadline": true, + "xstore-en": false, + "tsc-scale": false, + "sse": true, + "smap": true, + "stepping": 1, + "tce": false, + "kvm_steal_time": true, + "smep": true, + "rdpid": false, + "xcrypt": false, + "sse4_2": true, + "monitor": false, + "sse4_1": true, + "kvm-mmu": false, + "flushbyasid": false, + "kvm-steal-time": true, + "lm": true, + "tsc": true, + "adx": true, + "fxsr": true, + "sha-ni": false, + "tm": false, + "pclmuldq": true, + "xgetbv1": true, + "xstore": false, + "vmcb_clean": false, + "vme": true, + "vendor": "AuthenticAMD", + "arat": true, + "ffxsr": true, + "de": true, + "avx512f": false, + "pse": true, + "ds-cpl": false, + "tbm": false, + "ia64": false, + "phe-en": false, + "f16c": true, + "ds": false, + "mpx": false, + "tsc-adjust": true, + "aes": true, + "avx2": true, + "pbe": false, + "cx16": true, + "ds_cpl": false, + "movbe": true, + "perfctr-nb": false, + "nrip_save": true, + "kvm_mmu": false, + "ospke": false, + "avx512ifma": false, + "vmx": false, + "sep": true, + "xsaveopt": true, + "sse4a": true, + "avx512dq": false, + "i64": true, + "avx512-4vnniw": false, + "xsave": true, + "erms": false, + "hle": false, + "nodeid_msr": false, + "est": false, + "svm_lock": false, + "xop": false, + "model-id": "AMD Ryzen 7 1800X Eight-Core Processor ", + "abm": true, + "avx512er": false, + "sse4.1": true, + "sse4.2": true, + "pause-filter": false, + "lahf-lm": true, + "kvm-nopiodelay": true, + "cmp_legacy": true, + "acpi": false, + "fma4": false, + "popcnt": true, + "mmx": true, + "osxsave": false, + "pcommit": false, + "avx512pf": false, + "clwb": false, + "dca": false, + "pdcm": false, + "xcrypt-en": false, + "3dnow": false, + "invtsc": false, + "tm2": false, + "hypervisor": true, + "kvmclock-stable-bit": true, + "fxsr-opt": true, + "pcid": false, + "sse4-1": true, + "sse4-2": true, + "avx512-vpopcntdq": false, + "avx512-4fmaps": false, + "pause_filter": false, + "svm-lock": false, + "rdrand": true, + "nrip-save": true, + "avx512vl": false, + "x2apic": true, + "kvmclock": true, + "pge": true, + "family": 23, + "dtes64": false, + "xd": true, + "kvm_pv_eoi": true, + "ace2": false, + "kvm_pv_unhalt": true, + "xtpr": false, + "perfctr_nb": false, + "avx512bw": false, + "nx": true, + "lwp": false, + "msr": true, + "ace2-en": false, + "decodeassists": false, + "perfctr-core": false, + "pn": false, + "fma": true, + "nodeid-msr": false, + "kvm_asyncpf": true, + "clflush": true, + "cx8": true, + "mce": true, + "avx512cd": false, + "cr8legacy": true, + "mca": true, + "pni": true, + "rdseed": true, + "apic": true, + "fsgsbase": true, + "cmp-legacy": true, + "kvm-pv-unhalt": true, + "rdtscp": true, + "mmxext": true, + "cid": false, + "ssse3": true, + "extapic": false, + "pse36": true, + "mtrr": true, + "ibs": false, + "la57": false, + "avx": true, + "syscall": true, + "umip": false, + "invpcid": false, + "avx512vbmi": false, + "kvm-asyncpf": true, + "vmcb-clean": false, + "pmm": false, + "cmov": true, + "perfctr_core": false, + "misalignsse": true, + "clflushopt": true, + "pat": true, + "lbrv": false, + "3dnowprefetch": true, + "fpu": true, + "pae": true, + "wdt": false, + "tsc_scale": false, + "skinit": false, + "fxsr_opt": true, + "kvm_nopiodelay": true, + "pmm-en": false, + "phe": false, + "3dnowext": false, + "osvw": true, + "ht": false, + "pdpe1gb": true, + "kvm-pv-eoi": true, + "npt": true, + "xsavec": true, + "lahf_lm": true, + "pclmulqdq": true, + "svm": true, + "sse3": true, + "sse2": true, + "ss": false, + "topoext": false, + "smx": false, + "bmi1": true, + "bmi2": true, + "xsaves": false, + "model": 1 + } + } + }, + "id": "model-expansion" +} diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.xml new file mode 100644 index 0000000000..66d99642fc --- /dev/null +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core.xml @@ -0,0 +1,52 @@ +<!-- AMD Ryzen 7 1800X Eight-Core Processor --> +<cpudata arch='x86'> + <cpuid eax_in='0x00000000' ecx_in='0x00' eax='0x0000000d' ebx='0x68747541' ecx='0x444d4163' edx='0x69746e65'/> + <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00800f11' ebx='0x09100800' ecx='0x7ed8320b' edx='0x178bfbff'/> + <cpuid eax_in='0x00000002' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x00000003' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x00000005' ecx_in='0x00' eax='0x00000040' ebx='0x00000040' ecx='0x00000003' edx='0x00000000'/> + <cpuid eax_in='0x00000006' ecx_in='0x00' eax='0x00000004' ebx='0x00000000' ecx='0x00000001' edx='0x00000000'/> + <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x209c01a9' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x00000008' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x00000009' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x0000000a' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x0000000c' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x0000000d' ecx_in='0x00' eax='0x00000007' ebx='0x00000340' ecx='0x00000340' edx='0x00000000'/> + <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x0000000f' ebx='0x00000340' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x0000000d' ecx_in='0x02' eax='0x00000100' ebx='0x00000240' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x0000000d' ecx_in='0x03' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000000' ecx_in='0x00' eax='0x8000001f' ebx='0x68747541' ecx='0x444d4163' edx='0x69746e65'/> + <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00800f11' ebx='0x20000000' ecx='0x35c233ff' edx='0x2fd3fbff'/> + <cpuid eax_in='0x80000002' ecx_in='0x00' eax='0x20444d41' ebx='0x657a7952' ecx='0x2037206e' edx='0x30303831'/> + <cpuid eax_in='0x80000003' ecx_in='0x00' eax='0x69452058' ebx='0x2d746867' ecx='0x65726f43' edx='0x6f725020'/> + <cpuid eax_in='0x80000004' ecx_in='0x00' eax='0x73736563' ebx='0x2020726f' ecx='0x20202020' edx='0x00202020'/> + <cpuid eax_in='0x80000005' ecx_in='0x00' eax='0xff40ff40' ebx='0xff40ff40' ecx='0x20080140' edx='0x40040140'/> + <cpuid eax_in='0x80000006' ecx_in='0x00' eax='0x26006400' ebx='0x66006400' ecx='0x02006140' edx='0x00808140'/> + <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x0000001b' ecx='0x00000000' edx='0x00006599'/> + <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00003030' ebx='0x00000007' ecx='0x0000400f' edx='0x00000000'/> + <cpuid eax_in='0x80000009' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000000a' ecx_in='0x00' eax='0x00000001' ebx='0x00008000' ecx='0x00000000' edx='0x0001bcff'/> + <cpuid eax_in='0x8000000b' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000000c' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000000d' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000000e' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000000f' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000010' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000011' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000012' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000013' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000014' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000015' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000016' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000017' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000018' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x80000019' ecx_in='0x00' eax='0xf040f040' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000001a' ecx_in='0x00' eax='0x00000003' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000001b' ecx_in='0x00' eax='0x000003ff' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000001c' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000001d' ecx_in='0x00' eax='0x00004121' ebx='0x01c0003f' ecx='0x0000003f' edx='0x00000000'/> + <cpuid eax_in='0x8000001e' ecx_in='0x00' eax='0x00000009' ebx='0x00000104' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0x8000001f' ecx_in='0x00' eax='0x00000007' ebx='0x0000016f' ecx='0x0000000f' edx='0x00000000'/> + <cpuid eax_in='0x80860000' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> + <cpuid eax_in='0xc0000000' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/> +</cpudata> -- 2.14.1

From: Brijesh Singh <brijesh.singh@amd.com> 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: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/cpu/cpu_map.xml | 74 ++++++++++++++++++++++ ...x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml | 26 +------- .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml | 33 +--------- .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml | 27 +------- 4 files changed, 79 insertions(+), 81 deletions(-) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 8e7ac4973d..6243fbe902 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -260,6 +260,9 @@ <feature name='avx512cd'> <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x10000000'/> </feature> + <feature name='sha-ni'> + <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x20000000'/> + </feature> <feature name='avx512bw'> <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x40000000'/> </feature> @@ -1545,6 +1548,77 @@ <feature name='xop'/> <feature name='xsave'/> </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 name='ppc64'> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml index fcad36e34e..18edb71bcd 100644 --- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml @@ -1,32 +1,11 @@ <cpu mode='custom' match='exact'> - <model fallback='forbid'>Opteron_G5</model> + <model fallback='forbid'>EPYC</model> <vendor>AMD</vendor> - <feature policy='require' name='vme'/> <feature policy='require' name='ht'/> - <feature policy='require' name='monitor'/> - <feature policy='require' name='movbe'/> <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='mmxext'/> - <feature policy='require' name='fxsr_opt'/> <feature policy='require' name='cmp_legacy'/> <feature policy='require' name='extapic'/> - <feature policy='require' name='cr8legacy'/> - <feature policy='require' name='osvw'/> <feature policy='require' name='skinit'/> <feature policy='require' name='wdt'/> <feature policy='require' name='tce'/> @@ -34,7 +13,4 @@ <feature policy='require' name='perfctr_core'/> <feature policy='require' name='perfctr_nb'/> <feature policy='require' name='invtsc'/> - <feature policy='disable' name='xop'/> - <feature policy='disable' name='fma4'/> - <feature policy='disable' name='tbm'/> </cpu> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml index 19f6b1d4df..54afdea4d4 100644 --- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml @@ -1,43 +1,12 @@ <cpu> <arch>x86_64</arch> - <model>Opteron_G3</model> + <model>EPYC</model> <vendor>AMD</vendor> - <feature name='vme'/> <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='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='mmxext'/> - <feature name='fxsr_opt'/> - <feature name='pdpe1gb'/> <feature name='cmp_legacy'/> <feature name='extapic'/> - <feature name='cr8legacy'/> - <feature name='3dnowprefetch'/> - <feature name='osvw'/> <feature name='skinit'/> <feature name='wdt'/> <feature name='tce'/> diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml index 2773147da6..32064548c7 100644 --- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml @@ -1,32 +1,11 @@ <cpu mode='custom' match='exact'> - <model fallback='forbid'>Opteron_G5</model> + <model fallback='forbid'>EPYC</model> <vendor>AMD</vendor> - <feature policy='require' name='vme'/> <feature policy='require' name='x2apic'/> - <feature policy='require' name='movbe'/> <feature policy='require' name='tsc-deadline'/> - <feature policy='require' name='rdrand'/> <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='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='cr8legacy'/> - <feature policy='require' name='osvw'/> - <feature policy='disable' name='xop'/> - <feature policy='disable' name='fma4'/> - <feature policy='disable' name='tbm'/> + <feature policy='disable' name='monitor'/> + <feature policy='disable' name='sha-ni'/> </cpu> -- 2.14.1

On Wed, Sep 06, 2017 at 02:08:01PM +0200, Jiri Denemark wrote:
From: Brijesh Singh <brijesh.singh@amd.com>
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: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
The first patch adds CPUID data for Ryzen CPU model but this patch introduced EPYC CPU model. It would be probably worth to get CPUID data for EPYC and introduce Ryzen CPU model as well. Another question is whether we should named it "Zen" instead of EPYC since EPYC and Ryzen are CPU models like Intel Core or Xeon. For Intel we use the architecture name which is "Skylake" for example. In the past we used CPU model names for AMD, Opteron_G5 for example, but from consistency POW it should have been "Piledriver" and Opteron_G4 should have been "Bulldozer". Pavel

On Thu, Sep 07, 2017 at 11:35:12AM +0200, Pavel Hrdina wrote:
On Wed, Sep 06, 2017 at 02:08:01PM +0200, Jiri Denemark wrote:
From: Brijesh Singh <brijesh.singh@amd.com>
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: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
The first patch adds CPUID data for Ryzen CPU model but this patch introduced EPYC CPU model. It would be probably worth to get CPUID data for EPYC and introduce Ryzen CPU model as well.
Another question is whether we should named it "Zen" instead of EPYC since EPYC and Ryzen are CPU models like Intel Core or Xeon. For Intel we use the architecture name which is "Skylake" for example.
In the past we used CPU model names for AMD, Opteron_G5 for example, but from consistency POW it should have been "Piledriver" and Opteron_G4 should have been "Bulldozer".
On the other hand, QEMU uses "EPYC" which follows the bad naming for AMD CPUs. For Intel they use the architecture name like "Skylake". This means that we should probably use the same name as in QEMU, but it might be worth fixing it in QEMU to use "Zen". Pavel
participants (2)
-
Jiri Denemark
-
Pavel Hrdina