[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
- [RFC v6 02/11] i386: move whpx accel files into whpx/, (continued)
- [RFC v6 02/11] i386: move whpx accel files into whpx/, Claudio Fontana, 2020/11/26
- [RFC v6 03/11] i386: move hax accel files into hax/, Claudio Fontana, 2020/11/26
- [RFC v6 08/11] accel: extend AccelState and AccelClass to user-mode, Claudio Fontana, 2020/11/26
- [RFC v6 06/11] i386: move cpu dump out of helper.c into cpu-dump.c, Claudio Fontana, 2020/11/26
- [RFC v6 05/11] i386: move TCG accel files into tcg/, Claudio Fontana, 2020/11/26
- [RFC v6 04/11] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs, Claudio Fontana, 2020/11/26
- [RFC v6 07/11] i386: move TCG cpu class initialization out of helper.c, Claudio Fontana, 2020/11/26
- [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass, Claudio Fontana, 2020/11/26
Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass, Eduardo Habkost, 2020/11/27
[RFC v6 09/11] accel: replace struct CpusAccel with AccelOpsClass, Claudio Fontana, 2020/11/26
[RFC v6 11/11] i386: split cpu accelerators from cpu.c, using AccelCPUClass, Claudio Fontana, 2020/11/26