From: Babu Moger <babu.moger@amd.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: pbonzini@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] i386: Add the support for AMD EPYC 3rd generation processors
Date: Mon, 1 Feb 2021 16:29:50 -0600 [thread overview]
Message-ID: <0ad4017d-e755-94a3-859e-800661bcd2d1@amd.com> (raw)
In-Reply-To: <20210201221627.GH3872207@habkost.net>
Eduardo,
Please hold off on this patch. I need to update this patch.
Actually We need to add one more bit to SVM
feature(CPUID_SVM_SVME_ADDR_CHK). I was planning to do that this week.
Got busy with some other priority. Will send it this week, Sorry about it.
thanks
Babu
On 2/1/21 4:16 PM, Eduardo Habkost wrote:
> 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fehabkost%2Fqemu%2F-%2Fjobs%2F1000347471%23L350&data=04%7C01%7Cbabu.moger%40amd.com%7Cc472108231e74551a34a08d8c6ff0975%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637478145976001070%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=UggCEUXrcWCaRLgyClQ53lLnWDqu6%2F9bnxcyJqjy68s%3D&reserved=0
>
> 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,
>
next prev parent reply other threads:[~2021-02-01 22:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 16:36 [PATCH] i386: Add the support for AMD EPYC 3rd generation processors Babu Moger
2021-02-01 22:16 ` Eduardo Habkost
2021-02-01 22:29 ` Babu Moger [this message]
2021-02-01 22:38 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0ad4017d-e755-94a3-859e-800661bcd2d1@amd.com \
--to=babu.moger@amd.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).