[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU
From: |
Eduardo Habkost |
Subject: |
Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU |
Date: |
Wed, 18 Nov 2020 07:48:45 -0500 |
On Wed, Nov 18, 2020 at 11:29:35AM +0100, Claudio Fontana wrote:
> apply this to the registration of the cpus accel interfaces,
>
> but this will be also in preparation for later use of this
> new module init step to also defer the registration of the cpu models,
> in order to make them subclasses of a per-accel cpu type.
>
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> ---
[...]
> + /*
> + * accelerator has been chosen and initialized, now it is time to
> + * register the cpu accel interface.
> + */
> + module_call_init(MODULE_INIT_ACCEL_CPU);
I don't get why we would use a new module initialization level
for this. If the accelerator object was already created, we can
just ask the existing accel object to do whatever initialization
step is necessary.
e.g. we can add a AccelClass.cpu_accel_ops field, and call:
cpus_register_accel(current_machine->accelerator->cpu_accel_ops);
--
Eduardo
- [RFC v3 2/9] i386: move whpx accel files into whpx/, (continued)
- [RFC v3 2/9] i386: move whpx accel files into whpx/, Claudio Fontana, 2020/11/18
- [RFC v3 1/9] i386: move kvm accel files into kvm/, Claudio Fontana, 2020/11/18
- [RFC v3 4/9] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs, Claudio Fontana, 2020/11/18
- [RFC v3 5/9] i386: move TCG accel files into tcg/, Claudio Fontana, 2020/11/18
- [RFC v3 3/9] i386: move hax accel files into hax/, Claudio Fontana, 2020/11/18
- [RFC v3 6/9] i386: move cpu dump out of helper.c into cpu-dump.c, Claudio Fontana, 2020/11/18
- [RFC v3 7/9] i386: move TCG cpu class initialization out of helper.c, Claudio Fontana, 2020/11/18
- [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Claudio Fontana, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Claudio Fontana, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU,
Eduardo Habkost <=
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Claudio Fontana, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Paolo Bonzini, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Eduardo Habkost, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Paolo Bonzini, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Eduardo Habkost, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Paolo Bonzini, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Eduardo Habkost, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Paolo Bonzini, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Eduardo Habkost, 2020/11/18
- Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU, Paolo Bonzini, 2020/11/18