Blame SOURCES/kvm-watchdog-wdt_diag288-Mark-diag288-watchdog-as-non-ho.patch

4a2fec
From 6471fec6246b152ac4ddfb8c13d80c5054e5792f Mon Sep 17 00:00:00 2001
4a2fec
From: Thomas Huth <thuth@redhat.com>
4a2fec
Date: Mon, 9 Oct 2017 12:32:43 +0200
4a2fec
Subject: [PATCH 24/34] watchdog/wdt_diag288: Mark diag288 watchdog as
4a2fec
 non-hotpluggable
4a2fec
4a2fec
RH-Author: Thomas Huth <thuth@redhat.com>
4a2fec
Message-id: <1507552368-9245-8-git-send-email-thuth@redhat.com>
4a2fec
Patchwork-id: 77027
4a2fec
O-Subject: [RHEL-7.5 qemu-kvm-ma PATCH 07/12] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
4a2fec
Bugzilla: 1492033
4a2fec
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
4a2fec
RH-Acked-by: David Gibson <dgibson@redhat.com>
4a2fec
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
4a2fec
QEMU currently aborts when the user tries to hot-unplug a diag288
4a2fec
device:
4a2fec
4a2fec
$ qemu-system-s390x -nographic -nodefaults -S -monitor stdio
4a2fec
QEMU 2.9.92 monitor - type 'help' for more information
4a2fec
(qemu) device_add diag288,id=x
4a2fec
(qemu) device_del x
4a2fec
**
4a2fec
ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)
4a2fec
Aborted (core dumped)
4a2fec
4a2fec
The device is not designed as hot-pluggable (it should only be used
4a2fec
via the "-watchdog" parameter), so let's simply remove the possibility
4a2fec
to hotplug it to prevent that users can run into this ugly situation.
4a2fec
4a2fec
Signed-off-by: Thomas Huth <thuth@redhat.com>
4a2fec
Message-Id: <1502892528-22618-1-git-send-email-thuth@redhat.com>
4a2fec
Reviewed-by: David Hildenbrand <david@redhat.com>
4a2fec
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
4a2fec
(cherry picked from commit 84ebd3e8c7d4fe955b359b9aac84395907b0412e)
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 hw/watchdog/wdt_diag288.c | 1 +
4a2fec
 1 file changed, 1 insertion(+)
4a2fec
4a2fec
diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c
4a2fec
index a7b64e2..47f2892 100644
4a2fec
--- a/hw/watchdog/wdt_diag288.c
4a2fec
+++ b/hw/watchdog/wdt_diag288.c
4a2fec
@@ -121,6 +121,7 @@ static void wdt_diag288_class_init(ObjectClass *klass, void *data)
4a2fec
     dc->realize = wdt_diag288_realize;
4a2fec
     dc->unrealize = wdt_diag288_unrealize;
4a2fec
     dc->reset = wdt_diag288_reset;
4a2fec
+    dc->hotpluggable = false;
4a2fec
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
4a2fec
     dc->vmsd = &vmstate_diag288;
4a2fec
     diag288->handle_timer = wdt_diag288_handle_timer;
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec