Il 08/04/2013 22:13, Eduardo Habkost ha scritto:
> So you are initializing a field of CPUClass struct inside a CPU object
> initialization function. And that's a function that is not even
> converted to QOM yet, and buried inside a non-trivial function call tree
> (hence easy to be called at the wrong time if one day we reorder the
> initialization steps).
> 
> Can't we do this on class_init(), where it belongs? If we need different
> implementations for softmmu/user, we can add a stub for *-user.

Yes, please add a stub for the new function and override it in cpus.c.

> I think even an explicit #ifdef inside resume_vcpu() would be
> preferable to this.

Using an #ifdef basically means putting it in exec.c.  I'm not sure
about that, it seems to fit more in cpus.c.

Paolo

Reply via email to