qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qdev: Reset hot-plugged devices


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH] qdev: Reset hot-plugged devices
Date: Sun, 24 Jul 2011 18:52:49 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

From: Jan Kiszka <address@hidden>

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 <address@hidden>
---

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]