qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Jiri Denemark <jdenemar@redhat.com>
Cc: David Gibson <dgibson@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	David Hildenbrand <dhildenb@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: Default CPU models on s390x and ppc64
Date: Fri, 18 Oct 2019 16:27:59 +0200	[thread overview]
Message-ID: <09604f79-51f4-76c9-31cc-7c5d0c419bd2@redhat.com> (raw)
In-Reply-To: <20191018135821.GR4204@orkuz.int.mamuti.net>

>> I don't see how the default cpu model could not be "host" if qemu was
>> started with "--enable-kvm"
> 
> I guess the problem could be that QEMU capabilities probing in libvirt
> is done with -machine none. We first probe with KVM enabled and then for
> a few specific commands reprobe with TCG only. We could do it with
> query-machines too to get different default CPU models depending on the
> accelerator, but it wouldn't actually help.
> 
> The full command line used for capabilities probing is
> 
>      qemu-system-s390x \
>          -S \
>          -no-user-config \
>          -nodefaults \
>          -nographic \
>          -machine none,accel=kvm:tcg \
>          -qmp unix:/tmp/qmp-ivG4UN/qmp.monitor,server,nowait \
>          -pidfile /tmp/qmp-ivG4UN/qmp.pid \
>          -daemonize
> 
> One of the command we send is
> 
>      {"execute":"query-kvm","id":"libvirt-5"}
> 
> and the reply is
> 
>      {"return": {"enabled": true, "present": true}, "id": "libvirt-5"}

Right.

> 
> Which means KVM is usable and enabled, but still query-machines returns
> 
>      {
>        "return": [
>          {
>            "hotpluggable-cpus": true,
>            "name": "s390-ccw-virtio-4.0",
>            "numa-mem-supported": false,
>            "default-cpu-type": "qemu-s390x-cpu",
>            "cpu-max": 248,
>            "deprecated": false
>          },
>          {
>            "hotpluggable-cpus": true,
>            "name": "s390-ccw-virtio-3.1",
>            "numa-mem-supported": false,
>            "default-cpu-type": "qemu-s390x-cpu",
>            "cpu-max": 248,
>            "deprecated": false
>          },
>          ...
>        ]
>      }
> 
> So it seems the code is run during the machine initialization and thus
> it doesn't affect what query-machines returns with -machine none.

I can see what's going on. kvm_arch_init() will only modify the single, 
current machine, not all machines. That means, we would actually have to 
overwrite the default model in all machines, not just the one we are 
starting with (here:none).

Hm....

-- 

Thanks,

David / dhildenb


  reply	other threads:[~2019-10-18 14:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 15:16 Default CPU models on s390x and ppc64 Jiri Denemark
2019-10-17 15:18 ` David Hildenbrand
2019-10-17 15:31   ` David Hildenbrand
2019-10-17 15:35     ` David Hildenbrand
2019-10-18 13:58       ` Jiri Denemark
2019-10-18 14:27         ` David Hildenbrand [this message]
2019-10-17 16:13   ` Peter Maydell
2019-10-17 16:18     ` David Hildenbrand
2019-10-18 14:02     ` Jiri Denemark
2019-10-18 14:14       ` Peter Maydell
2019-10-18 14:44   ` Christian Borntraeger

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=09604f79-51f4-76c9-31cc-7c5d0c419bd2@redhat.com \
    --to=david@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=dgibson@redhat.com \
    --cc=dhildenb@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).