qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Qemu setting "-cpu host" seems broken with Windows vms
@ 2023-12-28 17:45 xtec
  2023-12-29 13:10 ` Stefan Hajnoczi
  2024-01-12 18:32 ` Daniel P. Berrangé
  0 siblings, 2 replies; 5+ messages in thread
From: xtec @ 2023-12-28 17:45 UTC (permalink / raw)
  To: qemu-devel

I noticed something weird when using "-cpu host" with Windows vms.
First, I always use it along with ",hv_passthrough" as well.

First, performance: since some years ago, since prior to qemu 6.2 until 
latest 8.2, win10 and win11 vms always worked slower than expected. This 
could be noticed by comparing booting/starting times between vm and a 
bare metal installation, but I particularly measured it when installing 
windows cumulative updates through windows update. On vm, from 
downloading to finishing rebooting it always took 1.5 circa 1.5 hours, 
while just 40 minutes on bare metal.

Second, and more recently, newer windows 11 23h2 seems to have big 
problem with "-cpu host".
When trying to update from 22h2 to 23h2 I got either black screen or 
bsod after trying to reboot.
Also, same result when trying to install 23h2 from scratch.
This on qemu 7.1 and 8.2.
Did a long search, and finally found the cause which also solved the 
problem for me:
https://forum.proxmox.com/threads/new-windows-11-vm-fails-boot-after-update.137543/
I found similar problems and similar solution in other forums as well.

So in my case, physical host cpu is intel core 11th gen; tried using 
libvirt's "virsh capabilities" to see which qemu cpu model better 
matched, and for some reason it gave Broadwell instead of newer 
Skylake...
Anyway, tried with "-cpu <Broadwell_model>,hv_passthrough", and this 
solved *both* problems: performance finally matched bare metal in all 
aspects, and the windows 23h2 problem was finally gone.

On IRC, it was suggested to try "-cpu host" and "disabling CPU bits" one 
by one until finding the culprit. But I don't know how to do this...

Could someone look into this?
Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-19 14:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-28 17:45 Qemu setting "-cpu host" seems broken with Windows vms xtec
2023-12-29 13:10 ` Stefan Hajnoczi
2024-01-16 17:56   ` Paolo Bonzini
2024-01-19  0:13     ` xtec
2024-01-12 18:32 ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).