This patches provides support for the new watchdog model "diag288".
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
Reviewed-by: Daniel Hansel <daniel.hansel(a)linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi(a)linux.vnet.ibm.com>
Reviewed-by: Tony Krowiak <akrowiak(a)linux.vnet.ibm.com>
---
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 0ee555d..e0ae40e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5683,6 +5683,8 @@ qemu-kvm -net nic,model=? /dev/null
<li> 'i6300esb' — the recommended device,
emulating a PCI Intel 6300ESB </li>
<li> 'ib700' — emulating an ISA iBase IB700
</li>
+ <li> 'diag288' — 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 55dec4e..1f26c53 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 ecf7b0d..c27c8c6 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 e677f30..d5f1cd9 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 3886b4f..52bb1d1 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
@@ -2545,9 +2545,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