qemu: reset fixes
v2 cover qemu: reset fixes
Prettify qdev reset and fix virtio reset. Prettify pci reset and fix bus reset. Note that qdev patches 1-2 and
pci patches 3-4 are independent, and can be
applied separately.
Changes since v1:
- Addressed Paul and kraxel's comments, killing
extra reset functions
- Test info->reset within qdev_reset
- Added pci reset fixes
---
MST
Michael S. Tsirkin (4):
qemu/qdev: type safety in reset handler
qemu/virtio: fix reset with device removal
qemu/pci: refactor code/symbolic constants
qemu/pci: reset device registers on bus reset
hw/pci.c | 54 ++++++++++++++++++++++++++++++++++-------------------- hw/pci.h | 2 ++ hw/qdev.c | 13 +++++++++---- hw/qdev.h | 3 ++- hw/rtl8139.c | 10 +++++----- hw/tcx.c | 6 +++--- hw/virtio-pci.c | 14 ++++++++------ 7 files changed, 63 insertions(+), 39 deletions(-)