qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass


From: Claudio Fontana
Subject: Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass
Date: Fri, 27 Nov 2020 12:22:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 11/27/20 9:59 AM, Claudio Fontana wrote:
> On 11/27/20 7:21 AM, Paolo Bonzini wrote:
>> On 26/11/20 23:32, Claudio Fontana wrote:
>>> +    if (acc) {
>>> +        object_class_foreach(accel_init_cpu_int_aux, cpu_type, false, acc);
>>> +    }
>>
>> Any reason to do it for cpu_type only, rather than for all subclasses of 
>> CPU_RESOLVING_TYPE?  This would remove the cpu_type argument to 
>> accel_init_cpu_interfaces and accel_init_interfaces.
>>
>> Otherwise I haven't done a careful review yet but it looks very nice, 
>> thanks!
>>
>> Paolo
>>
> 
> Hi Paolo,
> 
> yes, I thought to pass cpu_type in order to set the interface only for the 
> cpu that is actually used,
> instead of looping over all cpu models, just to be a bit quicker, but both 
> things should work.
> 
> Ciao,
> 
> Claudio
> 

Note that this actually creates a bug that is caught _ONLY_ by

acceptance-system-centos.

The gist of it is that cpu_type (or current_machine->default_cpu_type) is _not_ 
guaranteed to be set,
the code there is a bit misleading I think.

I'll look into it, but just wanted to warn early about it.

Ciao,

Claudio



reply via email to

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