hw/watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
PATCH 1/1 hw/watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
QEMU currently aborts when the user tries to hot-unplug a diag288 device:
$ qemu-system-s390x -nographic -nodefaults -S -monitor stdio QEMU 2.9.92 monitor - type 'help' for more information (qemu) device_add diag288,id=x (qemu) device_del x ** ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl) Aborted (core dumped)
The device is not designed as hot-pluggable (it should only be used via the "-watchdog" parameter), so let's simply remove the possibility to hotplug it to prevent that users can run into this ugly situation.
--- hw/watchdog/wdt_diag288.c | 1 + 1 file changed, 1 insertion(+)
hw/watchdog/wdt_diag288.c +1 -0
@@ -121,6 +121,7 @@ static void wdt_diag288_class_init(ObjectClass *klass, void *data) dc->realize = wdt_diag288_realize; dc->unrealize = wdt_diag288_unrealize; dc->reset = wdt_diag288_reset; + dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->vmsd = &vmstate_diag288; diag288->handle_timer = wdt_diag288_handle_timer;
Signature · 1 line
1.8.3.1
Quoted 25 lines · On Wed, 16 Aug 2017 16:08:48 +0200 Thomas Huth <[email protected]> wrote:
QEMU currently aborts when the user tries to hot-unplug a diag288 device:
$ qemu-system-s390x -nographic -nodefaults -S -monitor stdio QEMU 2.9.92 monitor - type 'help' for more information (qemu) device_add diag288,id=x (qemu) device_del x ** ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl) Aborted (core dumped)The device is not designed as hot-pluggable (it should only be used via the "-watchdog" parameter), so let's simply remove the possibility to hotplug it to prevent that users can run into this ugly situation.
Signed-off-by Thomas Huth <[email protected]>--- hw/watchdog/wdt_diag288.c | 1 + 1 file changed, 1 insertion(+)hw/watchdog/wdt_diag288.c +0
-0
hw/watchdog/wdt_diag288.c static void wdt_diag288_class_init(ObjectClass *klass, void *data) · line 127
Quoted 7 lines
hw/watchdog/wdt_diag288.c +1
-0@@ -121,6 +121,7 @@ static void wdt_diag288_class_init(ObjectClass *klass, void *data) dc->realize = wdt_diag288_realize; dc->unrealize = wdt_diag288_unrealize; dc->reset = wdt_diag288_reset; + dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->vmsd = &vmstate_diag288; diag288->handle_timer = wdt_diag288_handle_timer;
Looks good. I'll queue it; I'll wire up diag288 for tcg as well.
Any more non-hotpluggable devices you found? :)