On 01/24/2012 02:01 PM, Jan Kiszka wrote:
On 2012-01-24 20:33, Anthony Liguori wrote:
This converts three devices because apic and ioapic are subclasses of sysbus.
Converting subclasses independently of their base class is prohibitively hard.
Hmm, I think that's more than three... Can you split up? At least per
target or per board/machine.
I meant three classes of devices.
I don't see a reasonable way to split it up. I put an awful lot of work into
just splitting things up at this level. I know it's a big patch but at the same
time, the changes are entirely mechanical so reviewing shouldn't be that bad.
Also, I see a lot of programmatic initialization and a lot of repeating
patterns (specifically regarding trivial class initialization) - there
is no better alternative?
Not really, no. It looks bad now because you have DeviceInfo still. Once
DeviceInfo goes away, all of the initialization will happen in the class_init
function.
The design of QOM is such that a lot of what was previously done via declarative
structures is now done imperatively. But the code bloat that came in this patch
series will decrease significantly with the next series as we eliminate DeviceInfo.
Regards,
Anthony Liguori
Jan