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

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