qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qdev: Reset hotplugged devices
@ 2010-08-03 16:19 Alex Williamson
  2010-08-03 17:41 ` [Qemu-devel] " Glauber Costa
  2010-08-20  9:00 ` [Qemu-devel] " Markus Armbruster
  0 siblings, 2 replies; 29+ messages in thread
From: Alex Williamson @ 2010-08-03 16:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: glommer, alex.williamson

Several devices rely on their reset() function being called to
initialize device state, e1000 and rtl8139 in particular.  When
the device is hot added, the reset doesn't occur, often leaving
the device in an unusable state.  Adding a call to reset() after
init() for hotplugged devices puts the device in the expected
state for the guest.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

 0.13 candidate?

 hw/qdev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/qdev.c b/hw/qdev.c
index e99c73f..b156272 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -278,6 +278,9 @@ int qdev_init(DeviceState *dev)
         qdev_free(dev);
         return rc;
     }
+    if (dev->hotplugged) {
+        qdev_reset(dev);
+    }
     qemu_register_reset(qdev_reset, dev);
     if (dev->info->vmsd) {
         vmstate_register_with_alias_id(dev, -1, dev->info->vmsd, dev,

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

end of thread, other threads:[~2010-08-27 17:44 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 16:19 [Qemu-devel] [PATCH] qdev: Reset hotplugged devices Alex Williamson
2010-08-03 17:41 ` [Qemu-devel] " Glauber Costa
2010-08-20  9:00 ` [Qemu-devel] " Markus Armbruster
2010-08-20 12:41   ` Alex Williamson
2010-08-20 15:47     ` Markus Armbruster
2010-08-20 15:56       ` Anthony Liguori
2010-08-20 16:14         ` Markus Armbruster
2010-08-20 18:12           ` Anthony Liguori
2010-08-20 22:05             ` Alex Williamson
2010-08-21 10:07             ` Markus Armbruster
2010-08-21 15:19               ` Anthony Liguori
2010-08-23 11:25             ` [Qemu-devel] " Paolo Bonzini
2010-08-23 13:27               ` Anthony Liguori
2010-08-25  3:07         ` [Qemu-devel] " Isaku Yamahata
2010-08-25 12:55           ` Anthony Liguori
2010-08-25 15:17             ` Isaku Yamahata
2010-08-25 16:49               ` Anthony Liguori
2010-08-26  8:38                 ` Isaku Yamahata
2010-08-26 13:02                   ` Anthony Liguori
2010-08-27  3:52                     ` Isaku Yamahata
2010-08-27 17:43                       ` Wei Xu
2010-08-27  7:28                     ` Isaku Yamahata
2010-08-26 13:04                   ` Anthony Liguori
2010-08-26 13:15             ` Avi Kivity
2010-08-26 13:25               ` Anthony Liguori
2010-08-26 14:29                 ` Avi Kivity
2010-08-26 17:39                   ` Blue Swirl
2010-08-23 12:00   ` Avi Kivity
2010-08-23 12:21     ` Anthony Liguori

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).