CC'ing Babu Moger who aded the Milan CPU model. On Sat, Jan 29, 2022 at 07:23:37AM -0300, Leonardo Bras wrote: > While trying to bring a VM with EPYC-Milan cpu on a host with > EPYC-Milan cpu (EPYC 7313), the following warning can be seen: > > qemu-system-x86_64: warning: host doesn't support requested feature: > CPUID.07H:EBX.erms [bit 9] > qemu-system-x86_64: warning: host doesn't support requested feature: > CPUID.07H:EDX.fsrm [bit 4] > > Even with this warning, the host goes up. > > Then, grep'ing cpuid output on both guest and host, outputs: > > extended feature flags (7): > enhanced REP MOVSB/STOSB = false > fast short REP MOV = false > (simple synth) = AMD EPYC (3rd Gen) (Milan B1) [Zen 3], 7nm > brand = "AMD EPYC 7313 16-Core Processor " > > This means that for the same -cpu model (EPYC-Milan), the vcpu may or may > not have the above feature bits set, which is usually not a good idea for > live migration: > Migrating from a host with these features to a host without them can > be troublesome for the guest. > > Remove the "optional" features (erms, fsrm) from Epyc-Milan, in order to > avoid possible after-migration guest issues.
Babu, can you give some insight into availability of erms / fsrm features across the EPYC 3rd gen CPU line. Is this example missing erms/fsrm an exception, or common place ? > > Signed-off-by: Leonardo Bras <leob...@redhat.com> > --- > > Does this make sense? Or maybe I am missing something here. > > Having a kvm guest running with a feature bit, while the host > does not support it seems to cause a possible break the guest. The guest won't see the feature bit - that warning message from QEMU is telling you that it did't honour the request to expose erms / fsrm - it has dropped them from the CPUO exposed to the guest. > > > target/i386/cpu.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > index aa9e636800..a4bbd38ed0 100644 > --- a/target/i386/cpu.c > +++ b/target/i386/cpu.c > @@ -4160,12 +4160,9 @@ static const X86CPUDefinition builtin_x86_defs[] = { > CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 | CPUID_7_0_EBX_AVX2 > | > CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_RDSEED | > CPUID_7_0_EBX_ADX | CPUID_7_0_EBX_SMAP | > CPUID_7_0_EBX_CLFLUSHOPT | > - CPUID_7_0_EBX_SHA_NI | CPUID_7_0_EBX_CLWB | CPUID_7_0_EBX_ERMS | > - CPUID_7_0_EBX_INVPCID, > + CPUID_7_0_EBX_SHA_NI | CPUID_7_0_EBX_CLWB | > CPUID_7_0_EBX_INVPCID, > .features[FEAT_7_0_ECX] = > CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_RDPID | CPUID_7_0_ECX_PKU, > - .features[FEAT_7_0_EDX] = > - CPUID_7_0_EDX_FSRM, > .features[FEAT_XSAVE] = > CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC | > CPUID_XSAVE_XGETBV1 | CPUID_XSAVE_XSAVES, > -- > 2.34.1 > > Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|