[pve-devel] [PATCH-SERIES v3 qemu-server/manager/common] add and set x86-64-v2 as default model for new vms and detect best cpumodel

Fiona Ebner f.ebner at proxmox.com
Thu Jun 1 17:56:17 CEST 2023


Am 01.06.23 um 15:53 schrieb DERUMIER, Alexandre:
>>>
>>> What AMD CPUs did you try it on?
>>>
>> epyc v2/v3 with last microcodes
>>
>>
>> does it work with x86-64-v3 ?  (because the other patch of the series
>> could autofind the best new model if it's working)
> 
> Looking at linux kernel code, they have some quirks based on cpu model
> number && vendor
> 
> nehalem is .family = 6, .model = 26,
> 
> kvm64 is .family = 15, .model = 6
> 
> qemu64 is.family = 15, .model = 107,
> 

Yeah, could be.

I did try today with

qm set 102 -args '-cpu Nehalem,+aes,-svm,-vmx,model-id="foo
bar",vendor="AuthenticAMD"'

and couldn't trigger the issue getting stuck during installation
anymore. Switching back to manually selected Nehalem in the UI with the
generated

-cpu Nehalem,+aes,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,vendor=GenuineIntel

I got the hang during my first installation attempt again.

Then I tried around a bit more and now I'm suspecting it is something in
combination with the +kvm_pv_unhalt flag. I got a hang with just

qm set 102 -args '-cpu Nehalem,+kvm_pv_unhalt,vendor=GenuineIntel

And I didn't ever get a hang without that flag yet. Aaron had also only
had hangs with that flag. But it's not like it hangs every time with the
flag either.

> 
> maybe it could be interesting to test with adding flags from
> qemu64/kvm4  to see if it's the same behaviour ?
> 
> 
> from kvm64, xf86-64-v2 is
> 
> '+lahf_lm,+popcnt, +sse4.1,sse4.2, +ssse3'     (and optionnal +aes)

Yes, let's do that! It does sound cleaner than to base it off Nehalem.

FWIW,
qm set 102 -args '-cpu
kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+sep,+lahf_lm,+popcnt,+sse4.1,+sse4.2,+ssse3'
worked just now, but will need to test more tomorrow.


> does it work with x86-64-v3 ?  (because the other patch of the series
> could autofind the best new model if it's working)

I didn't test, but I'd be careful with bumping it even more. I'd like to
focus on getting the new default in for the next major release. The best
model selection needs more consideration and can always be added after
the release.





More information about the pve-devel mailing list