On 7/2/19 5:23 AM, Peter Maydell wrote: > On Tue, 2 Jul 2019 at 04:16, John Snow <js...@redhat.com> wrote: >> Does reset always get called as part of realize, really? >> >> Or are we just trusting that the device is probably going to get reset >> by the guest during bringup? > > Reset is not called "as part of realize", but it is guaranteed > to be called after realize and before we try to run the guest, > as long as the device is in the qbus tree. Things are in the > qbus tree if either: > * they're plugged into something already in the tree (eg > pci devices, scsi disks) > * they're a sysbus device (which is automatically plugged into > the 'main system bus' which is effectively the root of the > qbus tree) > > In this case TYPE_PFLASH_CFI01 is a subclass of TYPE_SYS_BUS_DEVICE, > so it will always be reset as part of system reset. > > (the main things which don't get automatically reset are direct > subclasses of TYPE_DEVICE, notably CPU objects.) > > thanks > -- PMM > Thank you for the lesson, that makes sense -- I saw the hotplug clause, but missed the sysbus routine. Thanks to Laszlo for pointing this out in great detail, too. Phil, a clarified commit message is perfectly sufficient, and please take my RB.
- Re: [Qemu-devel] [PATCH v2 8/9] hw/block/pfla... Alistair Francis
- [Qemu-devel] [PATCH v2 6/9] hw/block/pflash_cfi01:... Philippe Mathieu-Daudé
- Re: [Qemu-devel] [PATCH v2 6/9] hw/block/pfla... Alistair Francis
- [Qemu-devel] [PATCH v2 1/9] hw/block/pflash_cfi01:... Philippe Mathieu-Daudé
- Re: [Qemu-devel] [PATCH v2 1/9] hw/block/pfla... Alistair Francis
- [Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01:... Philippe Mathieu-Daudé
- Re: [Qemu-devel] [PATCH v2 5/9] hw/block/pfla... John Snow
- Re: [Qemu-devel] [PATCH v2 5/9] hw/block/... Peter Maydell
- Re: [Qemu-devel] [PATCH v2 5/9] hw/bl... Philippe Mathieu-Daudé
- Re: [Qemu-devel] [PATCH v2 5/9] h... Laszlo Ersek
- Re: [Qemu-devel] [PATCH v2 5/9] hw/bl... John Snow
- Re: [Qemu-devel] [PATCH v2 5/9] hw/block/... Laszlo Ersek
- [Qemu-devel] [PATCH v2 9/9] hw/block/pflash_cfi01:... Philippe Mathieu-Daudé
- Re: [Qemu-devel] [PATCH v2 9/9] hw/block/pfla... Alistair Francis
- Re: [Qemu-devel] [PATCH v2 0/9] hw/block/pflash_cf... no-reply
- Re: [Qemu-devel] [PATCH v2 0/9] hw/block/pfla... Philippe Mathieu-Daudé
- Re: [Qemu-devel] [PATCH v2 0/9] hw/block/pflash_cf... Laszlo Ersek
- Re: [Qemu-devel] [PATCH v2 0/9] hw/block/pfla... Laszlo Ersek
- Re: [Qemu-devel] [PATCH v2 0/9] hw/block/... Laszlo Ersek
- Re: [Qemu-devel] [PATCH v2 0/9] hw/block/pfla... Philippe Mathieu-Daudé