On 9/27/19 3:07 PM, Peter Maydell wrote: > On Tue, 24 Sep 2019 at 12:21, Damien Hedde <damien.he...@greensocs.com> wrote: > > My takes: > * I think we should keep the reset type. Among other things, > we probably want a reset type for "PCI bus reset" and > "SCSI bus reset", when we come to conversion of those > * I don't have an opinion about the phase names > * I think we should look at what we're doing for dynamic > changes of the reset tree. This falls into two parts, > both of which have come up in this thread: > - hotplug, ie what state should a hotplugged device > get set up to if it's plugged into a bus that's > currently in reset > - the modification of the qbus tree during reset, > like the raspi sd card thing > These feel related to me, so maybe handling the first > gives a better answer to handling the second ? >
Sorry for the delayed answer, I did not had much time to work on this last week. Regarding hotplug, right now hotplugged device are reset during the 'realize' step. So here is what I propose: + we always do the phase 1 and 2. + do the 3rd phase (to leave reset) if the device is not plugged in a bus under reset. For general case, like the raspi, it can be handled in set_parent_bus() qdev function. Damien