[PATCH 4/7] qemu: Enable iTCO watchdog by disabling its noreboot pin strap

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

 



In order for the iTCO watchdog to be operational we must disable the noreboot
pin strap in qemu.  This is the default starting from 8.0 machine types, but
desirable for older ones as well.  And we can safely do that since that is not
guest-visible.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 6e28f8b15e1c..32a90065717e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4048,6 +4048,7 @@ qemuBuildWatchdogCommandLine(virCommand *cmd,
     const char *action;
     int actualAction;
     ssize_t i = 0;
+    bool itco_pin_strap = false;
 
     if (def->nwatchdogs == 0)
         return 0;
@@ -4057,6 +4058,12 @@ qemuBuildWatchdogCommandLine(virCommand *cmd,
 
         watchdog = def->watchdogs[i];
 
+        /* iTCO is part of q35 and cannot be added */
+        if (watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_ITCO) {
+            itco_pin_strap = true;
+            continue;
+        }
+
         if (qemuCommandAddExtDevice(cmd, &watchdog->info, def, qemuCaps) < 0)
             return -1;
 
@@ -4067,6 +4074,9 @@ qemuBuildWatchdogCommandLine(virCommand *cmd,
             return -1;
     }
 
+    if (itco_pin_strap)
+        virCommandAddArgList(cmd, "-global", "ICH9-LPC.noreboot=off", NULL);
+
     /* qemu doesn't have a 'dump' action; we tell qemu to 'pause', then
        libvirt listens for the watchdog event, and we perform the dump
        ourselves. so convert 'dump' to 'pause' for the qemu cli */
-- 
2.39.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux