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

Philippe Mathieu-Daudé posted 1 patch 4 years, 9 months ago
Test docker-clang@ubuntu passed
Test asan passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test s390x passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190718104837.13905-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 | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
[Qemu-devel] [PATCH-for-4.1 v7 0/1] hw/block/pflash_cfi01: Add DeviceReset() handler
Posted by Philippe Mathieu-Daudé 4 years, 9 months 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.
Resolve this issue by adding a DeviceReset() handler.

v7: Surgical bugfix, do not attempt to improve the model in any
    way, thus ignoring all comments from previous versions.
    No migration impact.

Usual regression testing is welcomed, but probably pointless,
except done in the way describes in the following bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=1678713
https://bugzilla.redhat.com/show_bug.cgi?id=1704584
That is, resetting the machine when it is accessing the flash
device. IMO testing after the guest is done accessing the flash
device is totally pointless.

If no objection on this series after a day, I plan to send a
pull request to get this bugfix into 4.1.0-rc2.

Regards,

Phil.

Philippe Mathieu-Daudé (1):
  hw/block/pflash_cfi01: Add missing DeviceReset() handler

 hw/block/pflash_cfi01.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

-- 
2.20.1