[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] i386: Add the support for AMD EPYC 3rd generation processors
From: |
Eduardo Habkost |
Subject: |
Re: [PATCH] i386: Add the support for AMD EPYC 3rd generation processors |
Date: |
Mon, 1 Feb 2021 17:16:27 -0500 |
On Fri, Jan 22, 2021 at 10:36:27AM -0600, Babu Moger wrote:
> Adds the support for AMD 3rd generation processors. The model
> display for the new processor will be EPYC-Milan.
>
> Adds the following new feature bits on top of the feature bits from
> the first and second generation EPYC models.
>
> pcid : Process context identifiers support
> ibrs : Indirect Branch Restricted Speculation
> ssbd : Speculative Store Bypass Disable
> erms : Enhanced REP MOVSB/STOSB support
> fsrm : Fast Short REP MOVSB support
> invpcid : Invalidate processor context ID
> pku : Protection keys support
>
> Signed-off-by: Babu Moger <babu.moger@amd.com>
[...]
> @@ -4130,6 +4180,61 @@ static X86CPUDefinition builtin_x86_defs[] = {
> .model_id = "AMD EPYC-Rome Processor",
> .cache_info = &epyc_rome_cache_info,
> },
> + {
> + .name = "EPYC-Milan",
[...]
> + .features[FEAT_8000_0008_EBX] =
> + CPUID_8000_0008_EBX_CLZERO | CPUID_8000_0008_EBX_XSAVEERPTR |
> + CPUID_8000_0008_EBX_WBNOINVD | CPUID_8000_0008_EBX_IBPB |
> + CPUID_8000_0008_EBX_IBRS | CPUID_8000_0008_EBX_STIBP |
> + CPUID_8000_0008_EBX_AMD_SSBD,
This breaks query-cpu-model-expansion, see:
https://gitlab.com/ehabkost/qemu/-/jobs/1000347471#L350
20:11:28 ERROR| Reproduced traceback from:
/builds/ehabkost/qemu/build/tests/venv/lib64/python3.6/site-packages/avocado/core/test.py:767
20:11:28 ERROR| Traceback (most recent call last):
20:11:28 ERROR| File
"/builds/ehabkost/qemu/build/tests/acceptance/cpu_queries.py", line 31, in test
20:11:28 ERROR| self.assertNotIn('', c['unavailable-features'], c['name'])
20:11:28 ERROR| File "/usr/lib64/python3.6/unittest/case.py", line 1096, in
assertNotIn
20:11:28 ERROR| self.fail(self._formatMessage(msg, standardMsg))
20:11:28 ERROR| File
"/builds/ehabkost/qemu/build/tests/venv/lib64/python3.6/site-packages/avocado/core/test.py",
line 953, in fail
20:11:28 ERROR| raise exceptions.TestFail(message)
20:11:28 ERROR| avocado.core.exceptions.TestFail: '' unexpectedly found in
['fma', 'pcid', 'avx', 'f16c', 'avx2', 'invpcid', 'rdseed', 'sha-ni', 'umip',
'rdpid', 'fsrm', 'fxsr-opt', 'misalignsse', '3dnowprefetch', 'osvw', 'topoext',
'perfctr-core', 'clzero', 'xsaveerptr', 'wbnoinvd', 'ibpb', '', 'amd-stibp',
'amd-ssbd', 'nrip-save', 'xsavec', 'xsaves'] : EPYC-Milan-v1
The root cause is the lack of name for CPUID_8000_0008_EBX_IBRS at
feature_word_info[CPUID_8000_0008_EBX_IBRS].feat_names[14].
I'm applying the following fixup.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 06c92650a17..8d4baf72e5b 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1033,7 +1033,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] =
{
"clzero", NULL, "xsaveerptr", NULL,
NULL, NULL, NULL, NULL,
NULL, "wbnoinvd", NULL, NULL,
- "ibpb", NULL, NULL, "amd-stibp",
+ "ibpb", NULL, "ibrs", "amd-stibp",
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
"amd-ssbd", "virt-ssbd", "amd-no-ssb", NULL,
--
Eduardo
- Re: [PATCH] i386: Add the support for AMD EPYC 3rd generation processors,
Eduardo Habkost <=