qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v5 09/12] module: introduce MODULE_INIT_ACCEL_CPU


From: Paolo Bonzini
Subject: Re: [RFC v5 09/12] module: introduce MODULE_INIT_ACCEL_CPU
Date: Tue, 24 Nov 2020 21:01:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 24/11/20 20:08, Eduardo Habkost wrote:
Not a big advantage I agree,
I think however there is one, in using the existing framework that exists, for 
the purposes that it was built for.

As I understand it, the global module init framework is supposed to mark the 
major initialization steps,
and this seems to fit the bill.
That seems to be the main source of disagreement.  I don't agree
that's the purpose of module_init().

The module init framework is used to unconditionally register
module-provided entities like option names, QOM types, block
drivers, trace events, etc.  The entities registered by module
init functions represent a passive dynamically loadable piece of
code.

Indeed.  Think of module_init() as C++ global constructors.

Anything that has an "if" does not belong in module_init.

If you look at my review of the previous versions, I was not necessarily against MODULE_INIT_ACCEL_CPU, but I was (and am) strongly against calling it in the middle of the machine creation sequence.

Paolo




reply via email to

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