From: Peter Maydell <peter.maydell@linaro.org>
To: Jiri Denemark <jdenemar@redhat.com>
Cc: David Gibson <dgibson@redhat.com>,
David Hildenbrand <dhildenb@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
David Hildenbrand <david@redhat.com>
Subject: Re: Default CPU models on s390x and ppc64
Date: Fri, 18 Oct 2019 15:14:57 +0100 [thread overview]
Message-ID: <CAFEAcA-JAvQOyW8dsmf1sVzv6JvqUe2w-EtBgT3Jsx5Hgq11Pg@mail.gmail.com> (raw)
In-Reply-To: <20191018140219.GS4204@orkuz.int.mamuti.net>
On Fri, 18 Oct 2019 at 15:02, Jiri Denemark <jdenemar@redhat.com> wrote:
>
> On Thu, Oct 17, 2019 at 17:13:10 +0100, Peter Maydell wrote:
> > On Thu, 17 Oct 2019 at 17:09, David Hildenbrand <david@redhat.com> wrote:
> > > The default model under KVM is "host", under TCG it's "qemu". We should
> > > not use "qemu" under KVM, although it might work on some setups ...
> >
> > Possibly a tangent, but on Arm the approach we used to deal
> > with "'-cpu host' only works for kvm" was to define a "-cpu max"
> > meaning "best thing you can give me", which is an alias for
> > -cpu host with KVM and an alias for a CPU with all the extra
> > features we have emulation support under TCG. Then users can
> > use '-cpu max' and have something that generally will DTRT
> > regardless of accelerator.
>
> This thread is not really about a CPU model that users could universally
> use for both TCG or KVM. It's about checking what CPU model is used by
> QEMU if no CPU model is specified on the command line.
Yes, but the default CPU model if none is specified should ideally
not be one which only works with one accelerator (among other
things, that makes it more complicated to implement and to probe for
because you need to ensure it's set after the accelerator is
selected and that if you're probing that you've told QEMU what
the accelerator type is).
> BTW, I was told aarch64 is a bit different and QEMU fails to start with
> KVM unless -cpu host is explicitly specified. Is that correct?
Either -cpu host or -cpu max will work. If your host is a real
Cortex-A57 then I think -cpu cortex-a57 will work; similarly
with -cpu cortex-a53 on a host A53. (The underlying constraint
here is that the kernel doesn't support "claim to the guest
that it is running on some different CPU than the host CPU",
so you can't use command line options or defaults that would
require that.) 32-bit arm is similar. The other point to note
is that the "virt" board's default CPU is Cortex-A15 for
historical reasons, which means that in practice if you want
to use 64-bit KVM you don't want the default value.
thanks
-- PMM
next prev parent reply other threads:[~2019-10-18 14:25 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
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 [this message]
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=CAFEAcA-JAvQOyW8dsmf1sVzv6JvqUe2w-EtBgT3Jsx5Hgq11Pg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=david@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).