qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1.5 0/3] qdev: switch reset to post-order
@ 2013-05-02  9:38 Paolo Bonzini
  2013-05-02  9:38 ` [Qemu-devel] [PATCH 1.5 1/3] pci: do not export pci_bus_reset Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Paolo Bonzini @ 2013-05-02  9:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: mst

I was going to keep these for 1.6, but since they have been tested
by the user and myself, and they fix a regression, it can be worthwhile
to include these in 1.5.

qdev reset (qdev_reset_all/qbus_reset_all) is currently done in
pre-order.  This is not right, because it means the parent devices
cannot expect anything about the children devices' state during the
reset callback.

With the traversal done *before* invoking the bus-reset callback,
there is no way for the bus-reset callback to take care of the device
tree traversal.  This is currently done only for PCI, which requires
some adjustments.

This fixes a crash in resetting the LSI SCSI adapter, as reported and
tested by Claudio Bley.

Paolo Bonzini (3):
  pci: do not export pci_bus_reset
  qdev: allow both pre- and post-order vists in qdev walking functions
  qdev: switch reset to post-order

 hw/core/qdev.c         | 47 ++++++++++++++++++++++++++++++++++-------------
 hw/pci/pci.c           | 37 +++++++++++++++++--------------------
 hw/pci/pci_bridge.c    |  2 +-
 include/hw/pci/pci.h   |  1 -
 include/hw/qdev-core.h | 15 ++++++++++-----
 5 files changed, 62 insertions(+), 40 deletions(-)

-- 
1.8.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-02 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02  9:38 [Qemu-devel] [PATCH 1.5 0/3] qdev: switch reset to post-order Paolo Bonzini
2013-05-02  9:38 ` [Qemu-devel] [PATCH 1.5 1/3] pci: do not export pci_bus_reset Paolo Bonzini
2013-05-02  9:38 ` [Qemu-devel] [PATCH 1.5 2/3] qdev: allow both pre- and post-order vists in qdev walking functions Paolo Bonzini
2013-05-02  9:38 ` [Qemu-devel] [PATCH 1.5 3/3] qdev: switch reset to post-order Paolo Bonzini
2013-05-02 10:35 ` [Qemu-devel] [PATCH 1.5 0/3] " Michael S. Tsirkin
2013-05-02 11:01   ` Paolo Bonzini
2013-05-02 11:34     ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).