From: Leif Lindholm <leif@nuviainc.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Andrew Jones <drjones@redhat.com>, qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: kvm_target, QEMU_KVM_ARM_TARGET_GENERIC_V8 questions
Date: Thu, 4 Jun 2020 17:26:07 +0100 [thread overview]
Message-ID: <20200604162607.GC28566@vanye> (raw)
In-Reply-To: <CAFEAcA8MTB5VQQbMuSfkGc9JcGeawL_GUY8Pcs3yxT9kdncZJw@mail.gmail.com>
On Thu, Jun 04, 2020 at 17:09:30 +0100, Peter Maydell wrote:
> On Thu, 4 Jun 2020 at 17:03, Leif Lindholm <leif@nuviainc.com> wrote:
> > But there's also things like:
> > - a57_initfn explicitly setting kvm_target, then only being called
> > from max_initfn for !kvm_enabled()
>
> Expected -- a KVM 'max' is nothing to do with a TCG 'max':
> * for KVM, -cpu max means "same as -cpu host"
> * for TCG, -cpu max means "start with an A57, then add in all the
> extra architectural features that have been added since then".
Sure. But why are we setting the kvm_target at all for the
!kvm_enabled() case?
> kvm_target being set by a57_initfn is specifically for the case
> where a KVM user is using "-cpu cortex-a57".
>
> > - a57_initfn setting cpu->dtb_compatible to "arm,cortex-a57"
>
> What else would it set it to?
Hmm, I had been hoping there was a generic v8a one - kvm64.c kind of
got my hopes up with "arm,arm-v8". Still, for "max", would it not be
useful to update it to the track the most architecturally advanced cpu
supported? At this point "arm,cortex-a72".
> > - a57 initfn setting cpu->midr, max_initfn overwriting parts of it
>
> Also expected, TCG's -cpu max is "A57 with lots of extras".
Maybe I'm being too rigid in my thinking here, but it does kind of jar
to see code call a function called aarch64_a57_initfn to have it write
a value where it then throws away the only thing in the value that
made it a57.
> The way we create a TCG -cpu max is a bit odd, as the code was
> originally written in a situation where A57 was the most advanced
> TCG CPU we had and there were no extra architectural features
> supported by our CPU emulation. Today we have an A72 model as
> well and a lot of extra architectural features, so the "code
> borrowed" to "extras added" ratio looks a bit unbalanced.
> Cleaning it up would not be a bad idea.
I might start by doing that bit. It might make a lot of the above
niggles simply disappear.
Not entirely unrelated question:
Would you take added field definitions in target/arm/cpu.h for
features not yet emulated in QEMU but defined in released versions of
ARM ARM?
Regards,
Leif
next prev parent reply other threads:[~2020-06-04 16:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 12:55 kvm_target, QEMU_KVM_ARM_TARGET_GENERIC_V8 questions Leif Lindholm
2020-06-04 13:10 ` Peter Maydell
2020-06-04 13:32 ` Andrew Jones
2020-06-04 13:37 ` Peter Maydell
2020-06-04 15:38 ` Leif Lindholm
2020-06-04 15:59 ` Peter Maydell
2020-06-04 13:18 ` Andrew Jones
2020-06-04 16:03 ` Leif Lindholm
2020-06-04 16:09 ` Peter Maydell
2020-06-04 16:26 ` Leif Lindholm [this message]
2020-06-04 18:43 ` Peter Maydell
2020-06-08 12:02 ` Leif Lindholm
2020-06-08 12:42 ` Peter Maydell
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=20200604162607.GC28566@vanye \
--to=leif@nuviainc.com \
--cc=drjones@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--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).