[pve-devel] [PATCH v4 qemu-server 1/1] cpuconfig: add new x86-64-vX models

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Wed Jun 7 16:11:27 CEST 2023


Le mercredi 07 juin 2023 à 13:48 +0200, Fiona Ebner a écrit :
> Am 07.06.23 um 12:57 schrieb DERUMIER, Alexandre:
> > > 
> > > So again, sounds like the xsave feature is required for the
> > > osxsave
> > > feature to even make sense.
> > > 
> > The problem is that xsaves is not supported on all intel/amd cpu, 
> > 
> > older model don't seem to support xsaves too  (intel only since
> > sandybridge , amd since epyc v1)
> > https://antiphishing.cetsi.fr/proxy/v3?i=U2pXU09ocHltdTEydGM2aWb2SGhafebCBTjK3jebDSU&r=SjA3d003VWxKRk1kazNaeRJgzukDmhQdY5g-DacBRkZ4pgKdvLOyt2Z87havu-ae7CZLNw-FYpOPxDnH4AVQTw&f=Rld2eGhGQ3psZjlOWGwxQ0mBfBn7v4P9N5oaI0-k6dG5NatpgnMGXGhApgyzFe2H&u=https%3A//github.com/qemu/qemu/blob/master/target/i386/cpu.c%23L3050&k=1XpP
> > 
> > 
> > 
> > but also newer model depending of firmware revision
> > 
> > "target/i386: EPYC-Rome model without XSAVES"
> > https://antiphishing.cetsi.fr/proxy/v3?i=U2pXU09ocHltdTEydGM2aWb2SGhafebCBTjK3jebDSU&r=SjA3d003VWxKRk1kazNaeRJgzukDmhQdY5g-DacBRkZ4pgKdvLOyt2Z87havu-ae7CZLNw-FYpOPxDnH4AVQTw&f=Rld2eGhGQ3psZjlOWGwxQ0mBfBn7v4P9N5oaI0-k6dG5NatpgnMGXGhApgyzFe2H&u=https%3A//github.com/qemu/qemu/commit/fb00aa61267c8b9c57a2d1a1fa1e336d02e3bcd1&k=1XpP
> > 
> 
> AFAIU, xsaves with the additional s is just an optional sub-feature
> of
> xsave:
> https://antiphishing.cetsi.fr/proxy/v3?i=U2pXU09ocHltdTEydGM2aWb2SGhafebCBTjK3jebDSU&r=SjA3d003VWxKRk1kazNaeRJgzukDmhQdY5g-DacBRkZ4pgKdvLOyt2Z87havu-ae7CZLNw-FYpOPxDnH4AVQTw&f=Rld2eGhGQ3psZjlOWGwxQ0mBfBn7v4P9N5oaI0-k6dG5NatpgnMGXGhApgyzFe2H&u=https%3A//en.wikipedia.org/wiki/CPUID%23EAX%253D0Dh%253A_XSAVE_features_and_state-components&k=1XpP
> 
> Note that QEMU has both, a xsave and an xsaves CPU flag.
> 
> If I run the cpuid-dump2.c script in my VM with
> 
> -cpu
> qemu64,+abm,+aes,+avx,+avx2,+bmi1,+bmi2,enforce,+f16c,+fma,+kvm_pv_eo
> i,+kvm_pv_unhalt,+movbe,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3,xsave
> 
> I get
> 
> cpu=bdver4 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a
> -mcx16 -msahf -mmovbe -maes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-
> lwp
> -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2
> -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mf16c -mno-fsgsbase
> -mno-rdseed -mno-prfchw -mno-adx -mfxsr
> 
> here -> -mxsave
> 
> -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf
> -mno-prefetchwt1 -mno-clflushopt -mno-xsavec
> 
> here -> -mno-xsaves
> 
> -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma
> -mno-avx512vbmi -mno-clwb -mno-pcommit
> 
> So there is -mxsave, but also -mno-xsaves.
> 
oh ok, got it ! 

> But couldn't find from which models onward xsave is supported from a
> quick search.
> 
you could find it here:
https://github.com/qemu/qemu/blob/master/target/i386/cpu.c

CPUID_EXT_XSAVE

>= intel sandybridge

>= amd Opteron_G4


so for -v3 & -v4  models, it's not a problem.






More information about the pve-devel mailing list