[PATCH v2 3/4] Support for the new watchdog model diag288

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

 



This patch provides support for the new watchdog model "diag288".

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Daniel Hansel <daniel.hansel@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Stefan Zimmermann <stzi@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Tony Krowiak <akrowiak@xxxxxxxxxxxxxxxxxx>
---
 docs/formatdomain.html.in     | 2 ++
 docs/schemas/domaincommon.rng | 1 +
 src/conf/domain_conf.c        | 3 ++-
 src/conf/domain_conf.h        | 1 +
 src/qemu/qemu_command.c       | 6 +++---
 5 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index a97e246..c432aeb 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5717,6 +5717,8 @@ qemu-kvm -net nic,model=? /dev/null
           <li> 'i6300esb' &mdash; the recommended device,
             emulating a PCI Intel 6300ESB </li>
           <li> 'ib700' &mdash; emulating an ISA iBase IB700 </li>
+          <li> 'diag288' &mdash; emulating an S390 DIAG288 device
+            <span class="since">Since 1.3.0</span></li>
         </ul>
       </dd>
       <dt><code>action</code></dt>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 3040797..1120003 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3261,6 +3261,7 @@
         <choice>
           <value>i6300esb</value>
           <value>ib700</value>
+          <value>diag288</value>
         </choice>
       </attribute>
       <optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 369d155..03c3f74 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -498,7 +498,8 @@ VIR_ENUM_IMPL(virDomainSmbiosMode, VIR_DOMAIN_SMBIOS_LAST,
 
 VIR_ENUM_IMPL(virDomainWatchdogModel, VIR_DOMAIN_WATCHDOG_MODEL_LAST,
               "i6300esb",
-              "ib700")
+              "ib700",
+              "diag288")
 
 VIR_ENUM_IMPL(virDomainWatchdogAction, VIR_DOMAIN_WATCHDOG_ACTION_LAST,
               "reset",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 8912bbb..aeba5a5 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1304,6 +1304,7 @@ struct _virDomainSoundDef {
 typedef enum {
     VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB,
     VIR_DOMAIN_WATCHDOG_MODEL_IB700,
+    VIR_DOMAIN_WATCHDOG_MODEL_DIAG288,
 
     VIR_DOMAIN_WATCHDOG_MODEL_LAST
 } virDomainWatchdogModel;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5444638..99755f1 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2308,7 +2308,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
  *  - VirtIO block
  *  - VirtIO balloon
  *  - Host device passthrough
- *  - Watchdog (not IB700)
+ *  - Watchdog
  *  - pci serial devices
  *
  * Prior to this function being invoked, qemuCollectPCIAddress() will have
@@ -2543,9 +2543,9 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
             goto error;
     }
 
-    /* A watchdog - skip IB700, it is not a PCI device */
+    /* A watchdog - check if it is a PCI device */
     if (def->watchdog &&
-        def->watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_IB700 &&
+        def->watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB &&
         def->watchdog->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
         if (virDomainPCIAddressReserveNextSlot(addrs, &def->watchdog->info,
                                                flags) < 0)
-- 
2.3.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]