qemu-arm
[Top][All Lists]
Advanced

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

Re: arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes p


From: Claudio Fontana
Subject: Re: arm_cpu_post_init (Was: Re: arm: "max" CPU class hierarchy changes possible?)
Date: Thu, 18 Mar 2021 13:42:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

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
> 





reply via email to

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