qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default CPU models on s390x and ppc64


From: Peter Maydell
Subject: Re: Default CPU models on s390x and ppc64
Date: Fri, 18 Oct 2019 15:14:57 +0100

On Fri, 18 Oct 2019 at 15:02, Jiri Denemark <address@hidden> wrote:
>
> On Thu, Oct 17, 2019 at 17:13:10 +0100, Peter Maydell wrote:
> > On Thu, 17 Oct 2019 at 17:09, David Hildenbrand <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]