Based on LKML email, the processor has all the features in Opteron_G5 plus the following features:
cpu family : 23
model : 1
model name : AMD Ryzen 7 1800X Eight-Core Processor
mmxext fxsr_opt rdtscp movbe rdrand extapic cr8_legacy 3dnowprefetch fsgsbase
bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1
xsaves clzero topoext
The "topoext" feature needs extra support in QEMU.
"bpext" and "mwaitx" may need KVM support too.
> BTW, search from beaker, I have two suspects that maybe engineer samples of
> Ryzen, but they lack some of flags comparing with yours: clzero bpext mwaitx
Yes, they are engineering samples of Ryzen. I'm not sure whether we have any machines with final parts.
I added a similar issue for Fedora: bug 1456273
rhis is not related to your issue; it is only about adding a "-cpu" flag that enables Ryzen features for the virtual machine.
There's also SMT ("Simultaneous multithreading") support. See upstream bug:
libvirt bug created: bug 1481252.
SMT will be tracked at bug 1481253.
Changing BZ summary to mention EPYC to avoid confusion. EPYC CPU model was already submitted by AMD queued for inclusion upstream.
Author: Brijesh Singh <email@example.com>
Date: Tue Aug 15 12:00:51 2017 -0500
target-i386/cpu: Add new EPYC CPU model
Add a new base 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
Cc: Paolo Bonzini <firstname.lastname@example.org>
Cc: Richard Henderson <email@example.com>
Cc: Eduardo Habkost <firstname.lastname@example.org>
Cc: Tom Lendacky <Thomas.Lendacky@amd.com>
Signed-off-by: Brijesh Singh <email@example.com>
Reviewed-by: Eduardo Habkost <firstname.lastname@example.org>
Signed-off-by: Eduardo Habkost <email@example.com>
Fix included in qemu-kvm-rhev-2.10.0-3.el7
Can I continue my test with -cpu EPYC,-rdtscp,enforce since rdtscp block the enforce option. Another interesting part is EPYC also delete some flags like fma4, does AMD not want guest boot with default, no customized cpu model like Opteron_G5 to be migrated to new EPYC host? Do I need to test migration from old host to new EPYC host?(Since intel really allow this)
If the RHEL-7.5 kernel doesn't support virtualizing RDTSCP yet (the upstream kernel does), we need to manually disable RDTSCP in the RHEL-7 machine-types. I plan to do that soon, so please continue testing using "-cpu EPYC,-rdtscp,enforce".
About the missing fma4 feature: if the host really doesn't support it, migration of existing VMs with the FMA4 feature to a EPYC host will be impossible, and in this case all we can do is to ensure libvirt is preventing migration before it starts. We can add a note about this on the test plan.
Eduardo, adding support for RDTSCP on RHEL 7 is easy. zhguo is opening a new bug for that.
Kernel side rdtscp bug:
Bug 1511805 - Kernel missing rdtscp for amd Ryzen/EPYC cpu model
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.