[Qemu-devel] [PATCH-for-4.1 v4 0/5] hw/block/pflash_cfi01: Add DeviceReset() handler

Philippe Mathieu-Daudé posted 5 patches 13 weeks ago
Test docker-clang@ubuntu passed
Test asan passed
Test docker-mingw@fedora passed
Test FreeBSD passed
Test checkpatch passed
Test s390x passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190711155703.15627-1-philmd@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Kevin Wolf <kwolf@redhat.com>
hw/block/pflash_cfi01.c | 109 +++++++++++++++++++++++++++-------------
hw/block/trace-events   |   1 +
2 files changed, 75 insertions(+), 35 deletions(-)

[Qemu-devel] [PATCH-for-4.1 v4 0/5] hw/block/pflash_cfi01: Add DeviceReset() handler

Posted by Philippe Mathieu-Daudé 13 weeks ago
The pflash device lacks a reset() function.
When a machine is resetted, the flash might be in an
inconsistent state, leading to unexpected behavior:
https://bugzilla.redhat.com/show_bug.cgi?id=1678713
Resolve this issue by adding a DeviceReset() handler.

Fix also two minor issues, and clean a bit the codebase.

Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg00962.html
- addressed Laszlo review comments

Since v2:
- consider migration (Laszlo, Peter)

Since v3:
- more reliable migration (Dave)
- dropped patches 6-9 not required for next release

$ git backport-diff -u v3
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/5:[----] [--] 'hw/block/pflash_cfi01: Removed an unused timer'
002/5:[0048] [FC] 'hw/block/pflash_cfi01: Use the correct READ_ARRAY value'
003/5:[----] [--] 'hw/block/pflash_cfi01: Extract pflash_mode_read_array()'
004/5:[----] [--] 'hw/block/pflash_cfi01: Start state machine as READY to accept commands'
005/5:[----] [--] 'hw/block/pflash_cfi01: Add the DeviceReset() handler'

Regards,

Phil.

Philippe Mathieu-Daudé (5):
  hw/block/pflash_cfi01: Removed an unused timer
  hw/block/pflash_cfi01: Use the correct READ_ARRAY value
  hw/block/pflash_cfi01: Extract pflash_mode_read_array()
  hw/block/pflash_cfi01: Start state machine as READY to accept commands
  hw/block/pflash_cfi01: Add the DeviceReset() handler

 hw/block/pflash_cfi01.c | 109 +++++++++++++++++++++++++++-------------
 hw/block/trace-events   |   1 +
 2 files changed, 75 insertions(+), 35 deletions(-)

-- 
2.20.1