qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qdev: Reset hot-plugged devices
@ 2011-07-24 16:52 Jan Kiszka
  2011-07-24 17:38 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2011-07-24 16:52 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster; +Cc: Gleb Natapov

From: Jan Kiszka <jan.kiszka@siemens.com>

Device models rely on the core invoking their reset handlers after init.
We do this in the cold-plug case, but so far we miss this step after
hot-plug.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This is also one piece in the puzzle of getting CPU hot-plug work.

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

diff --git a/hw/qdev.c b/hw/qdev.c
index a0fcd06..404a91e 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -265,6 +265,9 @@ DeviceState *qdev_device_add(QemuOpts *opts)
         return NULL;
     }
     qdev->opts = opts;
+    if (qdev->hotplugged && qdev->info->reset) {
+        qdev->info->reset(qdev);
+    }
     return qdev;
 }
 
-- 
1.7.3.4

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

end of thread, other threads:[~2011-07-29 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-24 16:52 [Qemu-devel] [PATCH] qdev: Reset hot-plugged devices Jan Kiszka
2011-07-24 17:38 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2011-07-29 14:17   ` 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).