On Thu, 4 Feb 2021 at 14:18, Claudio Fontana <cfont...@suse.de> wrote: > If we could consistently move not only qemu_vcpu_init, but also reset in the > common code in cpu_common_realizefn, > and force the sequence: qemu_vcpu_init(); cpu_reset(); in there, > > and this actually works for all targets, maybe this could actually be an > improvement.
So my question here would be: what is special about CPUs that we have to reset them in their realize function? For other devices, we don't reset them in the init/realize sequence; we rely on the whole system getting reset and that doing reset of devices. There almost certainly *is* a reason here (my guess would be that it's related to the mess that is reset and in particular that CPU objects don't get automatically reset on system reset because they're not on a qbus). But if we're thinking about aspirational goals, I think the aspiration should be to not need to reset the CPU in its own realize function at all... thanks -- PMM