From: Claudio Fontana <cfontana@suse.de>
To: Andrew Jones <drjones@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes possible?)
Date: Thu, 18 Mar 2021 13:42:36 +0100 [thread overview]
Message-ID: <fc769a96-a304-7429-5dee-a65b52179b1c@suse.de> (raw)
In-Reply-To: <20210318120837.cg4gfdpchjwiabav@kamzik.brq.redhat.com>
On 3/18/21 1:08 PM, Andrew Jones wrote:
> On Thu, Mar 18, 2021 at 12:32:30PM +0100, Claudio Fontana wrote:
>> And why do we have a separate arm_cpu_finalize_features()?
>
> Separate, because it's not just called from arm_cpu_realizefn().
In particular it is also called by the monitor.c in qmp_query_cpu_model_expansion(),
which basically creates an object of the cpu subclass,
and then calls arm_cpu_finalize_[features]() explicitly on the object.
Is the qdev realize() method not called in this case? Should instead it be triggered, rather than initializing/realizing an incomplete object?
>
>>
>> Nothing in the ARM cpu classes initializations ever seems to be "final" to me.
>
> Some CPU features cannot be simply switched on/off at the property
> parse time. For example, there could be dependencies on multiple
> properties, the mutual exclusion of properties, or other aspects
> that can only be known later than property parse time. That stuff
> goes in arm_cpu_finalize_features().
Seems like _part_ of that is in arm_cpu_finalize_[features]() (in practice, this ends up being AARCH64-only stuff,
ie SVE, PAUTH and KVM).
After calling that, the arm realizefn() also does further setting and unsetting of features, checking previous feature states.
There is a whole lot following the arm_cpu_finalize_[features]() call,
there are ~300 lines of features initializations happening _after_ the call to arm_cpu_finalize_[features]().
>
> Thanks,
> drew
>
next prev parent reply other threads:[~2021-03-18 12:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 14:27 arm: "max" CPU class hierarchy changes possible? Claudio Fontana
2021-03-11 15:02 ` Peter Maydell
2021-03-11 15:21 ` Claudio Fontana
2021-03-11 16:02 ` Peter Maydell
2021-03-11 16:18 ` Paolo Bonzini
2021-03-11 17:16 ` Claudio Fontana
2021-03-11 17:35 ` Eduardo Habkost
2021-03-11 18:33 ` Peter Maydell
2021-03-11 19:10 ` Andrew Jones
2021-03-18 11:06 ` arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes possible?) Claudio Fontana
2021-03-18 11:32 ` Claudio Fontana
2021-03-18 12:08 ` Andrew Jones
2021-03-18 12:42 ` Claudio Fontana [this message]
2021-03-18 12:59 ` Andrew Jones
2021-03-18 13:10 ` Eduardo Habkost
2021-03-19 8:19 ` Claudio Fontana
2021-03-19 8:23 ` Claudio Fontana
2021-03-19 8:33 ` Claudio Fontana
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=fc769a96-a304-7429-5dee-a65b52179b1c@suse.de \
--to=cfontana@suse.de \
--cc=drjones@redhat.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).