On Wed, Aug 07, 2019 at 05:01:42PM +0100, Peter Maydell wrote: > On Wed, 31 Jul 2019 at 07:33, David Gibson <da...@gibson.dropbear.id.au> > wrote: > > > > On Mon, Jul 29, 2019 at 04:56:30PM +0200, Damien Hedde wrote: > > > Signed-off-by: Damien Hedde <damien.he...@greensocs.com> > > > +For Devices and Buses there is also the corresponding helpers: > > > +void device_reset(Device *dev, bool cold) > > > +void bus_reset(Device *dev, bool cold) > > > > What's the semantic difference between resetting a bus and resetting > > the bridge device which owns it? > > We should definitely explain this in the documentation, but > consider for instance a SCSI controller. Resetting the > SCSI controller puts all its registers back into whatever > the reset state is for the device, as well as resetting > everything on the SCSI bus. Resetting just the SCSI bus > resets the disks and so on on the bus, but doesn't change > the state of the controller itself, which remains programmed > with whatever state the guest has set up. > > PCI has a similar distinction between resetting the controller > and resetting the bus. > > Note that we have this distinction in the current APIs too: > qbus_reset_all() vs qdev_reset_all().
Yeah, sorry, I didn't express my concern very well... and now I've kind of forgotten the details of it. I think the oddities you also pointed out with the state saving made me think the two were sorta equivalent in this patchset, but the interface suggested otherwise. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature