On 10/11/20 16:03, Eduardo Habkost wrote:
Does anyone have any arguments for which solution is preferred?
I'd say (2) is preferred, as we don't expect object_new(T) to
have any side effects outside the object instance state.

Since there are no listeners, the side effects of address_space_init() are relatively limited. So doing it in instance_init is not a big deal.

Most
address_space_init() calls in the code today seem to be in
realize functions.

However, I wonder if we could make this simpler (and mistakes
less fatal) if we make AddressSpace a QOM child of the device.
Paolo, would it be too much overhead to make AddressSpace a QOM
object?

No, it wouldn't.  AddressSpace is already quite heavyweight.

Paolo


Reply via email to