Re: [Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-02 Thread Laszlo Ersek
On 07/02/19 11:37, Philippe Mathieu-Daudé wrote: > On 7/2/19 11:23 AM, Peter Maydell wrote: >> On Tue, 2 Jul 2019 at 04:16, John Snow 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

Re: [Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-02 Thread John Snow
On 7/2/19 5:23 AM, Peter Maydell wrote: > On Tue, 2 Jul 2019 at 04:16, John Snow 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

Re: [Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-02 Thread Laszlo Ersek
On 07/02/19 05:16, John Snow wrote: > > > On 7/1/19 8:12 PM, Philippe Mathieu-Daudé wrote: >> A "system reset" sets the device state machine in READ_ARRAY mode >> and, after some delay, set the SR.7 READY bit. >> >> We do not model timings, so we set the SR.7 bit directly. >> >> This pflash

Re: [Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-02 Thread Philippe Mathieu-Daudé
On 7/2/19 11:23 AM, Peter Maydell wrote: > On Tue, 2 Jul 2019 at 04:16, John Snow 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

Re: [Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-02 Thread Peter Maydell
On Tue, 2 Jul 2019 at 04:16, John Snow 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

Re: [Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-01 Thread John Snow
On 7/1/19 8:12 PM, Philippe Mathieu-Daudé wrote: > A "system reset" sets the device state machine in READ_ARRAY mode > and, after some delay, set the SR.7 READY bit. > > We do not model timings, so we set the SR.7 bit directly. > > This pflash device is a child of TYPE_DEVICE. > The

[Qemu-devel] [PATCH v2 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-01 Thread Philippe Mathieu-Daudé
A "system reset" sets the device state machine in READ_ARRAY mode and, after some delay, set the SR.7 READY bit. We do not model timings, so we set the SR.7 bit directly. This pflash device is a child of TYPE_DEVICE. The TYPE_DEVICE interface provide a DeviceReset handler which will be called