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.mo...@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 <ehabk...@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, >