qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: xtec@trimaso.com.mx, qemu-devel@nongnu.org
Subject: Re: Qemu setting "-cpu host" seems broken with Windows vms
Date: Tue, 16 Jan 2024 18:56:06 +0100	[thread overview]
Message-ID: <CABgObfbr3kF44ACA0didBCiBgQ87wgJS_H2fAPwyf==CAD3d2g@mail.gmail.com> (raw)
In-Reply-To: <CAJSP0QX-5ZxxiNejwEUoPE6Gnn=2=tfOb4MpAJNz5j6FYoNGzQ@mail.gmail.com>

On Fri, Dec 29, 2023 at 2:10 PM Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > 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.

One possibility is that you have Hyper-V enabled with -cpu host but
not with other CPU models. That's because "-cpu host" enables nested
virtualization.

Try "-cpu host,-vmx" and it should be clear if that's the case.

Based on the pastie that you prepared, that's the main difference
between -cpu host and -cpu Broadwell-noTSX-IBRS. Nothing else (see
list below) should have any substantial performance impact; even less
so should they make things worse.

Paolo

               "avx512-vp2intersect": true,
               "avx512-vpopcntdq": true,
               "avx512bitalg": true,
               "avx512bw": true,
               "avx512cd": true,
               "avx512dq": true,
               "avx512f": true,
               "avx512ifma": true,
               "avx512vbmi": true,
               "avx512vbmi2": true,
               "avx512vl": true,
               "avx512vnni": true,
               "full-width-write": true,
               "gfni": true,
               "vaes": true,
               "vpclmulqdq": true,

               "clflushopt": true,
               "clwb": true,

               "fsrm": true,

               "host-cache-info": false,
               "host-phys-bits": true,

               "amd-ssbd": true,
               "amd-stibp": true,
               "arch-capabilities": true,
               "ibpb": true,
               "ibrs": true,
               "ibrs-all": true,
               "ssbd": true,
               "stibp": true,

               "kvm-pv-ipi": true,
               "kvm-pv-sched-yield": true,
               "kvm-pv-tlb-flush": true,
               "kvm-pv-unhalt": true,

               "lmce": true,
               "md-clear": true,
               "mds-no": true,
               "movdir64b": true,
               "movdiri": true,
               "pdcm": true,
               "pdpe1gb": true,

               "pdcm": false,
               "pdpe1gb": false,
               "pku": true,
               "pmu": true,
               "pschange-mc-no": true,
               "rdctl-no": true,
               "rdpid": true,
               "sha-ni": true,
               "ss": true,
               "tsc-adjust": true,
               "umip": true,
               "vmx": true,
               "xgetbv1": true,
               "xsavec": true,
               "xsaves": true,

(skipped everything vmx-related, since they don't matter with vmx
itself being false)



  reply	other threads:[~2024-01-16 17:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-01-19  0:13     ` xtec
2024-01-12 18:32 ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABgObfbr3kF44ACA0didBCiBgQ87wgJS_H2fAPwyf==CAD3d2g@mail.gmail.com' \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=xtec@trimaso.com.mx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).