[PATCH 0/7] qemu: Fix implicit q35 watchdog

More info in commit messages (duh). Martin Kletzander (7): Avoid unnecessary nesting Support multiple watchdog devices Add iTCO watchdog support qemu: Enable iTCO watchdog by disabling its noreboot pin strap qemu: Add implicit watchdog for q35 machine types Document change to multiple watchdogs news: Add information about iTCO watchdog changes NEWS.rst | 6 ++ docs/formatdomain.rst | 10 ++- src/conf/domain_conf.c | 83 +++++++++++++------ src/conf/domain_conf.h | 9 +- src/conf/schemas/domaincommon.rng | 5 +- src/libvirt_private.syms | 1 + src/qemu/qemu_alias.c | 26 ++++-- src/qemu/qemu_alias.h | 5 +- src/qemu/qemu_command.c | 34 ++++++-- src/qemu/qemu_domain.c | 44 ++++++++++ src/qemu/qemu_domain_address.c | 9 +- src/qemu/qemu_driver.c | 14 ++-- src/qemu/qemu_hotplug.c | 71 +++++++--------- src/qemu/qemu_process.c | 3 +- src/qemu/qemu_validate.c | 50 +++++++++++ .../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 + tests/qemuxml2argvdata/autoindex.args | 2 + .../boot-floppy-q35.x86_64-latest.args | 2 + tests/qemuxml2argvdata/boot-floppy-q35.xml | 1 + tests/qemuxml2argvdata/cpu-host-model.args | 2 + .../cpu-host-model.x86_64-4.2.0.args | 2 + .../cpu-host-model.x86_64-5.0.0.args | 2 + .../cpu-host-model.x86_64-5.1.0.args | 2 + .../cpu-host-model.x86_64-5.2.0.args | 2 + .../cpu-host-model.x86_64-6.0.0.args | 2 + .../cpu-host-model.x86_64-6.1.0.args | 2 + .../cpu-host-model.x86_64-latest.args | 2 + .../disk-floppy-q35.x86_64-latest.args | 2 + ...are-auto-bios-stateless.x86_64-latest.args | 2 + .../firmware-auto-bios.x86_64-latest.args | 2 + ...-auto-efi-enrolled-keys.x86_64-latest.args | 2 + ...-auto-efi-loader-secure.x86_64-latest.args | 2 + ...to-efi-no-enrolled-keys.x86_64-latest.args | 2 + ...are-auto-efi-no-secboot.x86_64-latest.args | 2 + ...firmware-auto-efi-nvram.x86_64-latest.args | 2 + ...rmware-auto-efi-secboot.x86_64-latest.args | 2 + ...ware-auto-efi-stateless.x86_64-latest.args | 2 + .../firmware-auto-efi.x86_64-latest.args | 2 + .../firmware-manual-efi-acpi-q35.args | 2 + .../firmware-manual-efi-secure.args | 2 + .../firmware-manual-noefi-acpi-q35.args | 2 + .../firmware-manual-noefi-noacpi-q35.args | 2 + ...dev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args | 2 + ...ev-scsi-vhost-scsi-pcie.x86_64-latest.args | 2 + .../hvf-x86_64-q35-headless.args | 2 + .../intel-iommu-aw-bits.x86_64-latest.args | 2 + .../qemuxml2argvdata/intel-iommu-aw-bits.xml | 1 + ...ntel-iommu-caching-mode.x86_64-latest.args | 2 + .../intel-iommu-caching-mode.xml | 1 + ...ntel-iommu-device-iotlb.x86_64-latest.args | 2 + .../intel-iommu-device-iotlb.xml | 1 + .../intel-iommu-eim.x86_64-latest.args | 2 + tests/qemuxml2argvdata/intel-iommu-eim.xml | 1 + .../intel-iommu.x86_64-latest.args | 2 + tests/qemuxml2argvdata/intel-iommu.xml | 1 + ...othreads-ids-pool-sizes.x86_64-latest.args | 2 + .../iothreads-ids-pool-sizes.xml | 1 + .../machine-smm-off.x86_64-latest.args | 2 + .../machine-smm-on.x86_64-latest.args | 2 + tests/qemuxml2argvdata/pcie-expander-bus.args | 2 + .../pcie-root-port-model-generic.args | 2 + .../pcie-root-port-model-ioh3420.args | 2 + ...cie-root-port-nohotplug.x86_64-latest.args | 2 + tests/qemuxml2argvdata/pcie-root-port.args | 2 + tests/qemuxml2argvdata/pcie-root.args | 2 + .../pcie-switch-downstream-port.args | 2 + .../pcie-switch-upstream-port.args | 2 + tests/qemuxml2argvdata/pcihole64-q35.args | 2 + ...q35-default-devices-only.x86_64-4.2.0.args | 2 + ...35-default-devices-only.x86_64-latest.args | 2 + .../q35-multifunction.x86_64-4.2.0.args | 2 + .../q35-multifunction.x86_64-latest.args | 2 + .../q35-pci-force-address.args | 2 + .../q35-pcie-autoadd.x86_64-4.2.0.args | 2 + .../q35-pcie-autoadd.x86_64-latest.args | 2 + .../q35-pcie.x86_64-4.2.0.args | 2 + .../q35-pcie.x86_64-latest.args | 2 + .../q35-pm-disable-fallback.args | 2 + tests/qemuxml2argvdata/q35-pm-disable.args | 2 + tests/qemuxml2argvdata/q35-usb2-multi.args | 2 + tests/qemuxml2argvdata/q35-usb2-reorder.args | 2 + tests/qemuxml2argvdata/q35-usb2.args | 2 + .../q35-virt-manager-basic.x86_64-4.2.0.args | 2 + .../q35-virt-manager-basic.x86_64-latest.args | 2 + tests/qemuxml2argvdata/q35.args | 2 + .../sgx-epc.x86_64-7.0.0.args | 2 + tests/qemuxml2argvdata/sgx-epc.xml | 1 + .../tseg-explicit-size.x86_64-latest.args | 2 + .../usb-controller-default-q35.args | 2 + .../usb-controller-explicit-q35.args | 2 + .../user-aliases2.x86_64-latest.args | 2 + .../vcpu-placement-static.args | 2 + .../vcpu-placement-static.xml | 1 + ...vhost-user-fs-hugepages.x86_64-latest.args | 2 + .../vhost-user-fs-hugepages.xml | 1 + .../virtio-iommu-x86_64.x86_64-latest.args | 2 + ...virtio-non-transitional.x86_64-latest.args | 2 + .../virtio-transitional.x86_64-latest.args | 2 + .../watchdog-q35-multiple.x86_64-latest.args | 40 +++++++++ .../watchdog-q35-multiple.xml | 25 ++++++ ...default-cpu-kvm-q35-4.2.x86_64-latest.args | 2 + ...efault-cpu-tcg-features.x86_64-latest.args | 2 + .../x86_64-default-cpu-tcg-features.xml | 1 + ...default-cpu-tcg-q35-4.2.x86_64-latest.args | 2 + .../x86_64-q35-graphics.x86_64-latest.args | 2 + .../x86_64-q35-headless.x86_64-latest.args | 2 + tests/qemuxml2argvtest.c | 1 + tests/qemuxml2xmloutdata/autoindex.xml | 1 + ...ware-auto-bios-stateless.x86_64-latest.xml | 1 + .../firmware-auto-bios.x86_64-latest.xml | 1 + ...e-auto-efi-enrolled-keys.x86_64-latest.xml | 1 + ...e-auto-efi-loader-secure.x86_64-latest.xml | 1 + ...uto-efi-no-enrolled-keys.x86_64-latest.xml | 1 + ...ware-auto-efi-no-secboot.x86_64-latest.xml | 1 + .../firmware-auto-efi-nvram.x86_64-latest.xml | 1 + ...irmware-auto-efi-secboot.x86_64-latest.xml | 1 + .../firmware-auto-efi.x86_64-latest.xml | 1 + ...dev-scsi-vhost-scsi-pcie.x86_64-latest.xml | 1 + .../hvf-x86_64-q35-headless.xml | 1 + .../machine-smm-off.x86_64-latest.xml | 1 + .../machine-smm-on.x86_64-latest.xml | 1 + .../net-isolated-port.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/pcie-expander-bus.xml | 1 + .../pcie-root-port-model-generic.xml | 1 + .../pcie-root-port-model-ioh3420.xml | 1 + ...pcie-root-port-nohotplug.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/pcie-root-port.xml | 1 + tests/qemuxml2xmloutdata/pcie-root.xml | 1 + .../pcie-switch-downstream-port.xml | 1 + .../pcie-switch-upstream-port.xml | 1 + tests/qemuxml2xmloutdata/pcihole64-q35.xml | 1 + ...q35-default-devices-only.x86_64-latest.xml | 1 + .../q35-multifunction.x86_64-latest.xml | 1 + .../q35-pci-force-address.xml | 1 + .../q35-pcie-autoadd.x86_64-latest.xml | 1 + .../q35-pcie.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/q35-usb2-multi.xml | 1 + tests/qemuxml2xmloutdata/q35-usb2-reorder.xml | 1 + tests/qemuxml2xmloutdata/q35-usb2.xml | 1 + .../q35-virt-manager-basic.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/q35.xml | 1 + .../tseg-explicit-size.x86_64-latest.xml | 1 + .../usb-controller-default-q35.xml | 1 + .../usb-controller-explicit-q35.xml | 1 + .../virtio-iommu-x86_64.x86_64-latest.xml | 1 + .../virtio-non-transitional.x86_64-latest.xml | 1 + .../virtio-transitional.x86_64-latest.xml | 1 + .../watchdog-q35-multiple.x86_64-latest.xml | 51 ++++++++++++ ...-default-cpu-kvm-q35-4.2.x86_64-latest.xml | 1 + ...-default-cpu-tcg-q35-4.2.x86_64-latest.xml | 1 + .../x86_64-q35-graphics.x86_64-latest.xml | 1 + .../x86_64-q35-headless.x86_64-latest.xml | 1 + tests/qemuxml2xmltest.c | 1 + 153 files changed, 601 insertions(+), 97 deletions(-) create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.xml create mode 100644 tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml -- 2.39.1

Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_hotplug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 026e1ee5add7..1fa3cc3ea9b1 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2938,17 +2938,17 @@ qemuDomainAttachWatchdog(virDomainObj *vm, qemuAssignDeviceWatchdogAlias(watchdog); - if (watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { - if (qemuDomainEnsurePCIAddress(vm, &dev) < 0) - goto cleanup; - releaseAddress = true; - } else { + if (watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("hotplug of watchdog of model %s is not supported"), virDomainWatchdogModelTypeToString(watchdog->model)); goto cleanup; } + if (qemuDomainEnsurePCIAddress(vm, &dev) < 0) + goto cleanup; + releaseAddress = true; + if (!(props = qemuBuildWatchdogDevProps(vm->def, watchdog))) goto cleanup; -- 2.39.1

On 1/23/23 15:57, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
How about prefixing the subject with "qemuDomainAttachWatchdog: "?
--- src/qemu/qemu_hotplug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 026e1ee5add7..1fa3cc3ea9b1 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2938,17 +2938,17 @@ qemuDomainAttachWatchdog(virDomainObj *vm,
qemuAssignDeviceWatchdogAlias(watchdog);
- if (watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { - if (qemuDomainEnsurePCIAddress(vm, &dev) < 0) - goto cleanup; - releaseAddress = true; - } else { + if (watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("hotplug of watchdog of model %s is not supported"), virDomainWatchdogModelTypeToString(watchdog->model)); goto cleanup; }
+ if (qemuDomainEnsurePCIAddress(vm, &dev) < 0) + goto cleanup; + releaseAddress = true; + if (!(props = qemuBuildWatchdogDevProps(vm->def, watchdog))) goto cleanup;
Michal

This is already possible with qemu, and actually already happening with q35 machines and a specified watchdog since q35 already includes a watchdog we do not include in the XML. In order to express such posibility multiple watchdogs need to be supported. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/conf/domain_conf.c | 82 +++++++++++++------ src/conf/domain_conf.h | 8 +- src/conf/schemas/domaincommon.rng | 4 +- src/libvirt_private.syms | 1 + src/qemu/qemu_alias.c | 26 ++++-- src/qemu/qemu_alias.h | 5 +- src/qemu/qemu_command.c | 24 ++++-- src/qemu/qemu_domain_address.c | 8 +- src/qemu/qemu_driver.c | 14 ++-- src/qemu/qemu_hotplug.c | 61 ++++++-------- src/qemu/qemu_process.c | 3 +- src/qemu/qemu_validate.c | 25 ++++++ .../watchdog-q35-multiple.x86_64-latest.args | 39 +++++++++ .../watchdog-q35-multiple.xml | 25 ++++++ tests/qemuxml2argvtest.c | 1 + .../watchdog-q35-multiple.x86_64-latest.xml | 50 +++++++++++ tests/qemuxml2xmltest.c | 1 + 17 files changed, 287 insertions(+), 90 deletions(-) create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.xml create mode 100644 tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 733399e6da0d..7c61da1d765b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3875,7 +3875,9 @@ void virDomainDefFree(virDomainDef *def) def->blkio.ndevices); g_free(def->blkio.devices); - virDomainWatchdogDefFree(def->watchdog); + for (i = 0; i < def->nwatchdogs; i++) + virDomainWatchdogDefFree(def->watchdogs[i]); + g_free(def->watchdogs); virDomainMemballoonDefFree(def->memballoon); virDomainNVRAMDefFree(def->nvram); @@ -4647,10 +4649,10 @@ virDomainDeviceInfoIterateFlags(virDomainDef *def, if ((rc = cb(def, &device, &def->fss[i]->info, opaque)) != 0) return rc; } - if (def->watchdog) { - device.type = VIR_DOMAIN_DEVICE_WATCHDOG; - device.data.watchdog = def->watchdog; - if ((rc = cb(def, &device, &def->watchdog->info, opaque)) != 0) + device.type = VIR_DOMAIN_DEVICE_WATCHDOG; + for (i = 0; i < def->nwatchdogs; i++) { + device.data.watchdog = def->watchdogs[i]; + if ((rc = cb(def, &device, &def->watchdogs[i]->info, opaque)) != 0) return rc; } if (def->memballoon) { @@ -18809,24 +18811,21 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt, VIR_FREE(nodes); /* analysis of the watchdog devices */ - def->watchdog = NULL; - if ((n = virXPathNodeSet("./devices/watchdog", ctxt, &nodes)) < 0) + n = virXPathNodeSet("./devices/watchdog", ctxt, &nodes); + if (n < 0) return NULL; - if (n > 1) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("only a single watchdog device is supported")); - return NULL; - } - if (n > 0) { + if (n) + def->watchdogs = g_new0(virDomainWatchdogDef *, n); + for (i = 0; i < n; i++) { virDomainWatchdogDef *watchdog; - watchdog = virDomainWatchdogDefParseXML(xmlopt, nodes[0], ctxt, flags); + watchdog = virDomainWatchdogDefParseXML(xmlopt, nodes[i], ctxt, flags); if (!watchdog) return NULL; - def->watchdog = watchdog; - VIR_FREE(nodes); + def->watchdogs[def->nwatchdogs++] = watchdog; } + VIR_FREE(nodes); /* analysis of the memballoon devices */ def->memballoon = NULL; @@ -21255,18 +21254,19 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *src, dst->redirfilter)) goto error; - if ((!src->watchdog && dst->watchdog) || - (src->watchdog && !dst->watchdog)) { + + if (src->nwatchdogs != dst->nwatchdogs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain watchdog count %d " - "does not match source %d"), - dst->watchdog ? 1 : 0, src->watchdog ? 1 : 0); + _("Target domain watchdog device count %zu " + "does not match source %zu"), + dst->nwatchdogs, src->nwatchdogs); goto error; } - if (src->watchdog && - !virDomainWatchdogDefCheckABIStability(src->watchdog, dst->watchdog)) - goto error; + for (i = 0; i < src->nwatchdogs; i++) { + if (!virDomainWatchdogDefCheckABIStability(src->watchdogs[i], dst->watchdogs[i])) + goto error; + } if ((!src->memballoon && dst->memballoon) || (src->memballoon && !dst->memballoon)) { @@ -27517,8 +27517,8 @@ virDomainDefFormatInternalSetRootName(virDomainDef *def, return -1; } - if (def->watchdog) - virDomainWatchdogDefFormat(buf, def->watchdog, flags); + for (n = 0; n < def->nwatchdogs; n++) + virDomainWatchdogDefFormat(buf, def->watchdogs[n], flags); if (def->memballoon) virDomainMemballoonDefFormat(buf, def->memballoon, flags); @@ -30578,3 +30578,33 @@ virDomainDefHasSpiceGraphics(const virDomainDef *def) return false; } + + +ssize_t +virDomainWatchdogDefFind(const virDomainDef *def, + const virDomainWatchdogDef *watchdog) +{ + size_t i; + + for (i = 0; i < def->nwatchdogs; i++) { + const virDomainWatchdogDef *tmp = def->watchdogs[i]; + + if (tmp->model != watchdog->model) + continue; + + if (tmp->action != watchdog->action) + continue; + + if (watchdog->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && + !virDomainDeviceInfoAddressIsEqual(&watchdog->info, &tmp->info)) + continue; + + if (watchdog->info.alias && + STRNEQ_NULLABLE(watchdog->info.alias, tmp->info.alias)) + continue; + + return i; + } + + return -1; +} diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 3e4985a67da2..da785076151d 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3062,12 +3062,14 @@ struct _virDomainDef { size_t nsysinfo; virSysinfoDef **sysinfo; + size_t nwatchdogs; + virDomainWatchdogDef **watchdogs; + /* At maximum 2 TPMs on the domain if a TPM Proxy is present. */ size_t ntpms; virDomainTPMDef **tpms; /* Only 1 */ - virDomainWatchdogDef *watchdog; virDomainMemballoonDef *memballoon; virDomainNVRAMDef *nvram; virCPUDef *cpu; @@ -3526,6 +3528,10 @@ virDomainSoundDef *virDomainSoundDefRemove(virDomainDef *def, size_t idx); void virDomainAudioDefFree(virDomainAudioDef *def); void virDomainMemballoonDefFree(virDomainMemballoonDef *def); void virDomainNVRAMDefFree(virDomainNVRAMDef *def); +ssize_t +virDomainWatchdogDefFind(const virDomainDef *def, + const virDomainWatchdogDef *watchdog) + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; void virDomainWatchdogDefFree(virDomainWatchdogDef *def); virDomainVideoDef *virDomainVideoDefNew(virDomainXMLOption *xmlopt); void virDomainVideoDefFree(virDomainVideoDef *def); diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 6cb0a20e1e10..a5d0505d9b9b 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -6428,9 +6428,9 @@ <ref name="memorydev"/> </choice> </zeroOrMore> - <optional> + <zeroOrMore> <ref name="watchdog"/> - </optional> + </zeroOrMore> <optional> <ref name="memballoon"/> </optional> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 576ec8f95f17..2c5489b2b86e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -692,6 +692,7 @@ virDomainVsockDefFree; virDomainVsockDefNew; virDomainWatchdogActionTypeFromString; virDomainWatchdogActionTypeToString; +virDomainWatchdogDefFind; virDomainWatchdogDefFree; virDomainWatchdogModelTypeFromString; virDomainWatchdogModelTypeToString; diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index ef8e87ab58a2..809a6f03ed46 100644 --- a/src/qemu/qemu_alias.c +++ b/src/qemu/qemu_alias.c @@ -560,12 +560,26 @@ qemuAssignDeviceShmemAlias(virDomainDef *def, void -qemuAssignDeviceWatchdogAlias(virDomainWatchdogDef *watchdog) +qemuAssignDeviceWatchdogAlias(virDomainDef *def, + virDomainWatchdogDef *watchdog, + int idx) { - /* Currently, there's just one watchdog per domain */ + ssize_t i = 0; + + if (watchdog->info.alias) + return; + + if (idx == -1) { + for (i = 0; i < def->nwatchdogs; i++) { + idx = MAX(idx, + qemuDomainDeviceAliasIndex(&def->watchdogs[i]->info, + "watchdog")); + } + + idx++; + } - if (!watchdog->info.alias) - watchdog->info.alias = g_strdup("watchdog0"); + watchdog->info.alias = g_strdup_printf("watchdog%d", idx); } @@ -671,8 +685,8 @@ qemuAssignDeviceAliases(virDomainDef *def) for (i = 0; i < def->nsmartcards; i++) { qemuAssignDeviceSmartcardAlias(def->smartcards[i], i); } - if (def->watchdog) { - qemuAssignDeviceWatchdogAlias(def->watchdog); + for (i = 0; i < def->nwatchdogs; i++) { + qemuAssignDeviceWatchdogAlias(def, def->watchdogs[i], i); } if (def->memballoon && def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_NONE) { diff --git a/src/qemu/qemu_alias.h b/src/qemu/qemu_alias.h index 6433ae4cecaf..d7f34489f570 100644 --- a/src/qemu/qemu_alias.h +++ b/src/qemu/qemu_alias.h @@ -62,7 +62,10 @@ void qemuAssignDeviceShmemAlias(virDomainDef *def, virDomainShmemDef *shmem, int idx); -void qemuAssignDeviceWatchdogAlias(virDomainWatchdogDef *watchdog); +void +qemuAssignDeviceWatchdogAlias(virDomainDef *def, + virDomainWatchdogDef *watchdog, + int idx); void qemuAssignDeviceInputAlias(virDomainDef *def, virDomainInputDef *input, diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b96f2d33c158..6e28f8b15e1c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4044,22 +4044,28 @@ qemuBuildWatchdogCommandLine(virCommand *cmd, const virDomainDef *def, virQEMUCaps *qemuCaps) { - virDomainWatchdogDef *watchdog = def->watchdog; - g_autoptr(virJSONValue) props = NULL; + virDomainWatchdogDef *watchdog = NULL; const char *action; int actualAction; + ssize_t i = 0; - if (!def->watchdog) + if (def->nwatchdogs == 0) return 0; - if (qemuCommandAddExtDevice(cmd, &def->watchdog->info, def, qemuCaps) < 0) - return -1; + for (i = 0; i < def->nwatchdogs; i++) { + g_autoptr(virJSONValue) props = NULL; - if (!(props = qemuBuildWatchdogDevProps(def, watchdog))) - return -1; + watchdog = def->watchdogs[i]; - if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps)) - return -1; + if (qemuCommandAddExtDevice(cmd, &watchdog->info, def, qemuCaps) < 0) + return -1; + + if (!(props = qemuBuildWatchdogDevProps(def, watchdog))) + return -1; + + if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps)) + return -1; + } /* qemu doesn't have a 'dump' action; we tell qemu to 'pause', then libvirt listens for the watchdog event, and we perform the dump diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index b8d1969fbebd..db4e91501d3f 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2326,10 +2326,10 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, } /* A watchdog - check if it is a PCI device */ - if (def->watchdog && - def->watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB && - virDeviceInfoPCIAddressIsWanted(&def->watchdog->info)) { - if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->watchdog->info) < 0) + for (i = 0; i < def->nwatchdogs; i++) { + if (def->watchdogs[i]->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB && + virDeviceInfoPCIAddressIsWanted(&def->watchdogs[i]->info) && + qemuDomainPCIAddressReserveNextAddr(addrs, &def->watchdogs[i]->info) < 0) return -1; } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d6879175fece..dce3bef5b85b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7258,12 +7258,13 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, break; case VIR_DOMAIN_DEVICE_WATCHDOG: - if (vmdef->watchdog) { + if (virDomainWatchdogDefFind(vmdef, dev->data.watchdog) >= 0) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("domain already has a watchdog")); + _("device is already in the domain configuration")); return -1; } - vmdef->watchdog = g_steal_pointer(&dev->data.watchdog); + + VIR_APPEND_ELEMENT(vmdef->watchdogs, vmdef->nwatchdogs, dev->data.watchdog); break; case VIR_DOMAIN_DEVICE_INPUT: @@ -7457,12 +7458,13 @@ qemuDomainDetachDeviceConfig(virDomainDef *vmdef, case VIR_DOMAIN_DEVICE_WATCHDOG: - if (!vmdef->watchdog) { + idx = virDomainWatchdogDefFind(vmdef, dev->data.watchdog); + if (idx < 0) { virReportError(VIR_ERR_DEVICE_MISSING, "%s", - _("domain has no watchdog")); + _("no matching watchdog was found")); return -1; } - g_clear_pointer(&vmdef->watchdog, virDomainWatchdogDefFree); + VIR_DELETE_ELEMENT(vmdef->watchdogs, idx, vmdef->nwatchdogs); break; case VIR_DOMAIN_DEVICE_INPUT: diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1fa3cc3ea9b1..b9832ea7815a 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2928,15 +2928,9 @@ qemuDomainAttachWatchdog(virDomainObj *vm, virDomainDeviceDef dev = { VIR_DOMAIN_DEVICE_WATCHDOG, { .watchdog = watchdog } }; g_autoptr(virJSONValue) props = NULL; bool releaseAddress = false; - int rv; + int rv = 0; - if (vm->def->watchdog) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("domain already has a watchdog")); - return -1; - } - - qemuAssignDeviceWatchdogAlias(watchdog); + qemuAssignDeviceWatchdogAlias(vm->def, watchdog, -1); if (watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, @@ -2954,10 +2948,13 @@ qemuDomainAttachWatchdog(virDomainObj *vm, qemuDomainObjEnterMonitor(vm); - /* 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 */ - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { + if (vm->def->nwatchdogs) { + /* Domain already has a watchdog and all must have the same action. */ + rv = 0; + } else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { + /* 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 */ qemuMonitorActionWatchdog watchdogaction = QEMU_MONITOR_ACTION_WATCHDOG_KEEP; switch (watchdog->action) { @@ -3015,7 +3012,7 @@ qemuDomainAttachWatchdog(virDomainObj *vm, goto cleanup; releaseAddress = false; - vm->def->watchdog = watchdog; + VIR_APPEND_ELEMENT_COPY(vm->def->watchdogs, vm->def->nwatchdogs, watchdog); ret = 0; cleanup: @@ -4848,11 +4845,20 @@ static int qemuDomainRemoveWatchdog(virDomainObj *vm, virDomainWatchdogDef *watchdog) { + size_t i = 0; + VIR_DEBUG("Removing watchdog %s from domain %p %s", watchdog->info.alias, vm, vm->def->name); + for (i = 0; i < vm->def->nwatchdogs; i++) { + if (vm->def->watchdogs[i] == watchdog) + break; + } + qemuDomainReleaseDeviceAddress(vm, &watchdog->info); - g_clear_pointer(&vm->def->watchdog, virDomainWatchdogDefFree); + virDomainWatchdogDefFree(watchdog); + VIR_DELETE_ELEMENT(vm->def->watchdogs, i, vm->def->nwatchdogs); + return 0; } @@ -5603,33 +5609,20 @@ qemuDomainDetachPrepWatchdog(virDomainObj *vm, virDomainWatchdogDef *match, virDomainWatchdogDef **detach) { - virDomainWatchdogDef *watchdog; - - *detach = watchdog = vm->def->watchdog; + ssize_t idx = virDomainWatchdogDefFind(vm->def, match); - if (!watchdog) { - virReportError(VIR_ERR_DEVICE_MISSING, "%s", - _("watchdog device not present in domain configuration")); + if (idx < 0) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("no matching watchdog was found")); return -1; } - /* While domains can have up to one watchdog, the one supplied by the user - * doesn't necessarily match the one domain has. Refuse to detach in such - * case. */ - if (!(watchdog->model == match->model && - watchdog->action == match->action && - virDomainDeviceInfoAddressIsEqual(&match->info, &watchdog->info))) { - virReportError(VIR_ERR_DEVICE_MISSING, - _("model '%s' watchdog device not present " - "in domain configuration"), - virDomainWatchdogModelTypeToString(watchdog->model)); - return -1; - } + *detach = vm->def->watchdogs[idx]; - if (watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { + if ((*detach)->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("hot unplug of watchdog of model %s is not supported"), - virDomainWatchdogModelTypeToString(watchdog->model)); + virDomainWatchdogModelTypeToString((*detach)->model)); return -1; } diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ee9f0784d3a3..218231f3596c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -804,7 +804,8 @@ qemuProcessHandleWatchdog(qemuMonitor *mon G_GNUC_UNUSED, qemuDomainSaveStatus(vm); } - if (vm->def->watchdog->action == VIR_DOMAIN_WATCHDOG_ACTION_DUMP) { + if (vm->def->nwatchdogs && + vm->def->watchdogs[0]->action == VIR_DOMAIN_WATCHDOG_ACTION_DUMP) { qemuProcessEventSubmit(vm, QEMU_PROCESS_EVENT_WATCHDOG, VIR_DOMAIN_WATCHDOG_ACTION_DUMP, 0, NULL); } diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 6e04b22da43f..cb002dee0eb9 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1188,6 +1188,28 @@ qemuValidateDomainDefTPMs(const virDomainDef *def) } +static int +qemuValidateDomainDefWatchdogs(const virDomainDef *def) +{ + ssize_t i = 0; + + for (i = 0; i < def->nwatchdogs; i++) { + /* We could theoretically support different watchdogs having dump and + * pause, but let's be honest, we support multiple watchdogs only + * because we need to be able to add a second, implicit one, not because + * it is a brilliant idea to have multiple watchdogs. */ + if (def->watchdogs[i]->action != def->watchdogs[0]->action) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("watchdogs with different actions are not supported " + "with this QEMU binary")); + return -1; + } + } + + return 0; +} + + int qemuValidateLifecycleAction(virDomainLifecycleAction onPoweroff, virDomainLifecycleAction onReboot, @@ -1388,6 +1410,9 @@ qemuValidateDomainDef(const virDomainDef *def, if (qemuValidateDomainDefTPMs(def) < 0) return -1; + if (qemuValidateDomainDefWatchdogs(def) < 0) + return -1; + if (def->sec) { switch ((virDomainLaunchSecurity) def->sec->sectype) { case VIR_DOMAIN_LAUNCH_SECURITY_SEV: diff --git a/tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args b/tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args new file mode 100644 index 000000000000..eccf5a2e119f --- /dev/null +++ b/tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args @@ -0,0 +1,39 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.2","addr":"0x1"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"ib700","id":"watchdog0"}' \ +-device '{"driver":"i6300esb","id":"watchdog1","bus":"pci.2","addr":"0x2"}' \ +-watchdog-action poweroff \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/watchdog-q35-multiple.xml b/tests/qemuxml2argvdata/watchdog-q35-multiple.xml new file mode 100644 index 000000000000..af0cb169f0d9 --- /dev/null +++ b/tests/qemuxml2argvdata/watchdog-q35-multiple.xml @@ -0,0 +1,25 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='usb' index='0'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <watchdog model='ib700' action='poweroff'/> + <watchdog model='i6300esb' action='poweroff'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 8c52feb83c3c..9faa6f7791b1 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1756,6 +1756,7 @@ mymain(void) DO_TEST_CAPS_LATEST("watchdog-device"); DO_TEST_CAPS_LATEST("watchdog-dump"); DO_TEST_CAPS_LATEST("watchdog-injectnmi"); + DO_TEST_CAPS_LATEST("watchdog-q35-multiple"); DO_TEST_CAPS_ARCH_LATEST("watchdog-diag288", "s390x"); DO_TEST_NOCAPS("balloon-device"); DO_TEST("balloon-device-deflate", diff --git a/tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml b/tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml new file mode 100644 index 000000000000..e507576085f7 --- /dev/null +++ b/tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml @@ -0,0 +1,50 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> + </controller> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-to-pci-bridge'> + <model name='pcie-pci-bridge'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <watchdog model='ib700' action='poweroff'/> + <watchdog model='i6300esb' action='poweroff'> + <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> + </watchdog> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 72f724bfcec7..59ec90467e71 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -489,6 +489,7 @@ mymain(void) QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_HDA_OUTPUT); DO_TEST_NOCAPS("watchdog"); + DO_TEST_CAPS_LATEST("watchdog-q35-multiple"); DO_TEST("net-bandwidth", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC); DO_TEST("net-bandwidth2", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC); DO_TEST_NOCAPS("net-mtu"); -- 2.39.1

On 1/23/23 15:57, Martin Kletzander wrote:
This is already possible with qemu, and actually already happening with q35 machines and a specified watchdog since q35 already includes a watchdog we do not include in the XML. In order to express such posibility multiple watchdogs need to be supported.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/conf/domain_conf.c | 82 +++++++++++++------ src/conf/domain_conf.h | 8 +- src/conf/schemas/domaincommon.rng | 4 +- src/libvirt_private.syms | 1 + src/qemu/qemu_alias.c | 26 ++++-- src/qemu/qemu_alias.h | 5 +- src/qemu/qemu_command.c | 24 ++++-- src/qemu/qemu_domain_address.c | 8 +- src/qemu/qemu_driver.c | 14 ++-- src/qemu/qemu_hotplug.c | 61 ++++++-------- src/qemu/qemu_process.c | 3 +- src/qemu/qemu_validate.c | 25 ++++++ .../watchdog-q35-multiple.x86_64-latest.args | 39 +++++++++ .../watchdog-q35-multiple.xml | 25 ++++++ tests/qemuxml2argvtest.c | 1 + .../watchdog-q35-multiple.x86_64-latest.xml | 50 +++++++++++ tests/qemuxml2xmltest.c | 1 + 17 files changed, 287 insertions(+), 90 deletions(-) create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/watchdog-q35-multiple.xml create mode 100644 tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 733399e6da0d..7c61da1d765b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3875,7 +3875,9 @@ void virDomainDefFree(virDomainDef *def) def->blkio.ndevices); g_free(def->blkio.devices);
- virDomainWatchdogDefFree(def->watchdog); + for (i = 0; i < def->nwatchdogs; i++) + virDomainWatchdogDefFree(def->watchdogs[i]); + g_free(def->watchdogs);
virDomainMemballoonDefFree(def->memballoon); virDomainNVRAMDefFree(def->nvram); @@ -4647,10 +4649,10 @@ virDomainDeviceInfoIterateFlags(virDomainDef *def, if ((rc = cb(def, &device, &def->fss[i]->info, opaque)) != 0) return rc; } - if (def->watchdog) { - device.type = VIR_DOMAIN_DEVICE_WATCHDOG; - device.data.watchdog = def->watchdog; - if ((rc = cb(def, &device, &def->watchdog->info, opaque)) != 0) + device.type = VIR_DOMAIN_DEVICE_WATCHDOG; + for (i = 0; i < def->nwatchdogs; i++) { + device.data.watchdog = def->watchdogs[i]; + if ((rc = cb(def, &device, &def->watchdogs[i]->info, opaque)) != 0) return rc; } if (def->memballoon) { @@ -18809,24 +18811,21 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt, VIR_FREE(nodes);
/* analysis of the watchdog devices */ - def->watchdog = NULL; - if ((n = virXPathNodeSet("./devices/watchdog", ctxt, &nodes)) < 0) + n = virXPathNodeSet("./devices/watchdog", ctxt, &nodes); + if (n < 0) return NULL; - if (n > 1) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("only a single watchdog device is supported")); - return NULL; - } - if (n > 0) { + if (n) + def->watchdogs = g_new0(virDomainWatchdogDef *, n); + for (i = 0; i < n; i++) { virDomainWatchdogDef *watchdog;
- watchdog = virDomainWatchdogDefParseXML(xmlopt, nodes[0], ctxt, flags); + watchdog = virDomainWatchdogDefParseXML(xmlopt, nodes[i], ctxt, flags); if (!watchdog) return NULL;
- def->watchdog = watchdog; - VIR_FREE(nodes); + def->watchdogs[def->nwatchdogs++] = watchdog; } + VIR_FREE(nodes);
/* analysis of the memballoon devices */ def->memballoon = NULL; @@ -21255,18 +21254,19 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *src, dst->redirfilter)) goto error;
- if ((!src->watchdog && dst->watchdog) || - (src->watchdog && !dst->watchdog)) { + + if (src->nwatchdogs != dst->nwatchdogs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain watchdog count %d " - "does not match source %d"), - dst->watchdog ? 1 : 0, src->watchdog ? 1 : 0); + _("Target domain watchdog device count %zu " + "does not match source %zu"),
Since you're touching this commit message, put it onto a single line please.
+ dst->nwatchdogs, src->nwatchdogs); goto error; }
- if (src->watchdog && - !virDomainWatchdogDefCheckABIStability(src->watchdog, dst->watchdog)) - goto error; + for (i = 0; i < src->nwatchdogs; i++) { + if (!virDomainWatchdogDefCheckABIStability(src->watchdogs[i], dst->watchdogs[i])) + goto error; + }
if ((!src->memballoon && dst->memballoon) || (src->memballoon && !dst->memballoon)) { @@ -27517,8 +27517,8 @@ virDomainDefFormatInternalSetRootName(virDomainDef *def, return -1; }
- if (def->watchdog) - virDomainWatchdogDefFormat(buf, def->watchdog, flags); + for (n = 0; n < def->nwatchdogs; n++) + virDomainWatchdogDefFormat(buf, def->watchdogs[n], flags);
if (def->memballoon) virDomainMemballoonDefFormat(buf, def->memballoon, flags); @@ -30578,3 +30578,33 @@ virDomainDefHasSpiceGraphics(const virDomainDef *def)
return false; } + + +ssize_t +virDomainWatchdogDefFind(const virDomainDef *def, + const virDomainWatchdogDef *watchdog) +{ + size_t i; + + for (i = 0; i < def->nwatchdogs; i++) { + const virDomainWatchdogDef *tmp = def->watchdogs[i]; + + if (tmp->model != watchdog->model) + continue; + + if (tmp->action != watchdog->action) + continue; + + if (watchdog->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && + !virDomainDeviceInfoAddressIsEqual(&watchdog->info, &tmp->info)) + continue; + + if (watchdog->info.alias && + STRNEQ_NULLABLE(watchdog->info.alias, tmp->info.alias)) + continue; + + return i; + } + + return -1; +} diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 3e4985a67da2..da785076151d 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3062,12 +3062,14 @@ struct _virDomainDef { size_t nsysinfo; virSysinfoDef **sysinfo;
+ size_t nwatchdogs; + virDomainWatchdogDef **watchdogs; + /* At maximum 2 TPMs on the domain if a TPM Proxy is present. */ size_t ntpms; virDomainTPMDef **tpms;
/* Only 1 */ - virDomainWatchdogDef *watchdog; virDomainMemballoonDef *memballoon; virDomainNVRAMDef *nvram; virCPUDef *cpu; @@ -3526,6 +3528,10 @@ virDomainSoundDef *virDomainSoundDefRemove(virDomainDef *def, size_t idx); void virDomainAudioDefFree(virDomainAudioDef *def); void virDomainMemballoonDefFree(virDomainMemballoonDef *def); void virDomainNVRAMDefFree(virDomainNVRAMDef *def); +ssize_t +virDomainWatchdogDefFind(const virDomainDef *def, + const virDomainWatchdogDef *watchdog) + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; void virDomainWatchdogDefFree(virDomainWatchdogDef *def); virDomainVideoDef *virDomainVideoDefNew(virDomainXMLOption *xmlopt); void virDomainVideoDefFree(virDomainVideoDef *def); diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 6cb0a20e1e10..a5d0505d9b9b 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -6428,9 +6428,9 @@ <ref name="memorydev"/> </choice> </zeroOrMore> - <optional> + <zeroOrMore> <ref name="watchdog"/> - </optional> + </zeroOrMore> <optional> <ref name="memballoon"/> </optional> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 576ec8f95f17..2c5489b2b86e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -692,6 +692,7 @@ virDomainVsockDefFree; virDomainVsockDefNew; virDomainWatchdogActionTypeFromString; virDomainWatchdogActionTypeToString; +virDomainWatchdogDefFind; virDomainWatchdogDefFree; virDomainWatchdogModelTypeFromString; virDomainWatchdogModelTypeToString; diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index ef8e87ab58a2..809a6f03ed46 100644 --- a/src/qemu/qemu_alias.c +++ b/src/qemu/qemu_alias.c @@ -560,12 +560,26 @@ qemuAssignDeviceShmemAlias(virDomainDef *def,
void -qemuAssignDeviceWatchdogAlias(virDomainWatchdogDef *watchdog) +qemuAssignDeviceWatchdogAlias(virDomainDef *def, + virDomainWatchdogDef *watchdog, + int idx) { - /* Currently, there's just one watchdog per domain */ + ssize_t i = 0; + + if (watchdog->info.alias) + return; + + if (idx == -1) { + for (i = 0; i < def->nwatchdogs; i++) { + idx = MAX(idx, + qemuDomainDeviceAliasIndex(&def->watchdogs[i]->info, + "watchdog"));
The MAX() macro is a glibc-ism, and worse - it evaluates arguments twice. Please switch to pattern we use elsewhere, e.g. in qemuAssignDeviceShmemAlias() just above.
+ } + + idx++; + }
- if (!watchdog->info.alias) - watchdog->info.alias = g_strdup("watchdog0"); + watchdog->info.alias = g_strdup_printf("watchdog%d", idx); }
@@ -671,8 +685,8 @@ qemuAssignDeviceAliases(virDomainDef *def) for (i = 0; i < def->nsmartcards; i++) { qemuAssignDeviceSmartcardAlias(def->smartcards[i], i); } - if (def->watchdog) { - qemuAssignDeviceWatchdogAlias(def->watchdog); + for (i = 0; i < def->nwatchdogs; i++) { + qemuAssignDeviceWatchdogAlias(def, def->watchdogs[i], i); } if (def->memballoon && def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_NONE) { diff --git a/src/qemu/qemu_alias.h b/src/qemu/qemu_alias.h index 6433ae4cecaf..d7f34489f570 100644 --- a/src/qemu/qemu_alias.h +++ b/src/qemu/qemu_alias.h @@ -62,7 +62,10 @@ void qemuAssignDeviceShmemAlias(virDomainDef *def, virDomainShmemDef *shmem, int idx);
-void qemuAssignDeviceWatchdogAlias(virDomainWatchdogDef *watchdog); +void +qemuAssignDeviceWatchdogAlias(virDomainDef *def, + virDomainWatchdogDef *watchdog, + int idx);
void qemuAssignDeviceInputAlias(virDomainDef *def, virDomainInputDef *input, diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b96f2d33c158..6e28f8b15e1c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4044,22 +4044,28 @@ qemuBuildWatchdogCommandLine(virCommand *cmd, const virDomainDef *def, virQEMUCaps *qemuCaps) { - virDomainWatchdogDef *watchdog = def->watchdog; - g_autoptr(virJSONValue) props = NULL; + virDomainWatchdogDef *watchdog = NULL; const char *action; int actualAction; + ssize_t i = 0;
- if (!def->watchdog) + if (def->nwatchdogs == 0) return 0;
- if (qemuCommandAddExtDevice(cmd, &def->watchdog->info, def, qemuCaps) < 0) - return -1; + for (i = 0; i < def->nwatchdogs; i++) { + g_autoptr(virJSONValue) props = NULL;
- if (!(props = qemuBuildWatchdogDevProps(def, watchdog))) - return -1; + watchdog = def->watchdogs[i];
- if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps)) - return -1; + if (qemuCommandAddExtDevice(cmd, &watchdog->info, def, qemuCaps) < 0) + return -1; + + if (!(props = qemuBuildWatchdogDevProps(def, watchdog))) + return -1; + + if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps)) + return -1; + }
/* qemu doesn't have a 'dump' action; we tell qemu to 'pause', then libvirt listens for the watchdog event, and we perform the dump
Here, I'd mention in the comment that a validator made sure that ALL watchdogs have the same action. It's not obvious at the first glance.
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index b8d1969fbebd..db4e91501d3f 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2326,10 +2326,10 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, }
/* A watchdog - check if it is a PCI device */ - if (def->watchdog && - def->watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB && - virDeviceInfoPCIAddressIsWanted(&def->watchdog->info)) { - if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->watchdog->info) < 0) + for (i = 0; i < def->nwatchdogs; i++) { + if (def->watchdogs[i]->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB && + virDeviceInfoPCIAddressIsWanted(&def->watchdogs[i]->info) && + qemuDomainPCIAddressReserveNextAddr(addrs, &def->watchdogs[i]->info) < 0) return -1; }
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d6879175fece..dce3bef5b85b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7258,12 +7258,13 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, break;
case VIR_DOMAIN_DEVICE_WATCHDOG: - if (vmdef->watchdog) { + if (virDomainWatchdogDefFind(vmdef, dev->data.watchdog) >= 0) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("domain already has a watchdog")); + _("device is already in the domain configuration")); return -1; } - vmdef->watchdog = g_steal_pointer(&dev->data.watchdog); + + VIR_APPEND_ELEMENT(vmdef->watchdogs, vmdef->nwatchdogs, dev->data.watchdog); break;
case VIR_DOMAIN_DEVICE_INPUT: @@ -7457,12 +7458,13 @@ qemuDomainDetachDeviceConfig(virDomainDef *vmdef,
case VIR_DOMAIN_DEVICE_WATCHDOG: - if (!vmdef->watchdog) { + idx = virDomainWatchdogDefFind(vmdef, dev->data.watchdog); + if (idx < 0) { virReportError(VIR_ERR_DEVICE_MISSING, "%s", - _("domain has no watchdog")); + _("no matching watchdog was found")); return -1; } - g_clear_pointer(&vmdef->watchdog, virDomainWatchdogDefFree); + VIR_DELETE_ELEMENT(vmdef->watchdogs, idx, vmdef->nwatchdogs); break;
case VIR_DOMAIN_DEVICE_INPUT: diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1fa3cc3ea9b1..b9832ea7815a 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2928,15 +2928,9 @@ qemuDomainAttachWatchdog(virDomainObj *vm, virDomainDeviceDef dev = { VIR_DOMAIN_DEVICE_WATCHDOG, { .watchdog = watchdog } }; g_autoptr(virJSONValue) props = NULL; bool releaseAddress = false; - int rv; + int rv = 0;
- if (vm->def->watchdog) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("domain already has a watchdog")); - return -1; - } - - qemuAssignDeviceWatchdogAlias(watchdog); + qemuAssignDeviceWatchdogAlias(vm->def, watchdog, -1);
if (watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, @@ -2954,10 +2948,13 @@ qemuDomainAttachWatchdog(virDomainObj *vm,
qemuDomainObjEnterMonitor(vm);
- /* 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 */ - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { + if (vm->def->nwatchdogs) { + /* Domain already has a watchdog and all must have the same action. */ + rv = 0; + } else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { + /* 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 */ qemuMonitorActionWatchdog watchdogaction = QEMU_MONITOR_ACTION_WATCHDOG_KEEP;
switch (watchdog->action) { @@ -3015,7 +3012,7 @@ qemuDomainAttachWatchdog(virDomainObj *vm, goto cleanup;
releaseAddress = false; - vm->def->watchdog = watchdog; + VIR_APPEND_ELEMENT_COPY(vm->def->watchdogs, vm->def->nwatchdogs, watchdog); ret = 0;
cleanup: @@ -4848,11 +4845,20 @@ static int qemuDomainRemoveWatchdog(virDomainObj *vm, virDomainWatchdogDef *watchdog) { + size_t i = 0; + VIR_DEBUG("Removing watchdog %s from domain %p %s", watchdog->info.alias, vm, vm->def->name);
+ for (i = 0; i < vm->def->nwatchdogs; i++) { + if (vm->def->watchdogs[i] == watchdog) + break; + } + qemuDomainReleaseDeviceAddress(vm, &watchdog->info); - g_clear_pointer(&vm->def->watchdog, virDomainWatchdogDefFree); + virDomainWatchdogDefFree(watchdog); + VIR_DELETE_ELEMENT(vm->def->watchdogs, i, vm->def->nwatchdogs); + return 0; }
@@ -5603,33 +5609,20 @@ qemuDomainDetachPrepWatchdog(virDomainObj *vm, virDomainWatchdogDef *match, virDomainWatchdogDef **detach) { - virDomainWatchdogDef *watchdog; - - *detach = watchdog = vm->def->watchdog; + ssize_t idx = virDomainWatchdogDefFind(vm->def, match);
- if (!watchdog) { - virReportError(VIR_ERR_DEVICE_MISSING, "%s", - _("watchdog device not present in domain configuration")); + if (idx < 0) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("no matching watchdog was found")); return -1; }
- /* While domains can have up to one watchdog, the one supplied by the user - * doesn't necessarily match the one domain has. Refuse to detach in such - * case. */ - if (!(watchdog->model == match->model && - watchdog->action == match->action && - virDomainDeviceInfoAddressIsEqual(&match->info, &watchdog->info))) { - virReportError(VIR_ERR_DEVICE_MISSING, - _("model '%s' watchdog device not present " - "in domain configuration"), - virDomainWatchdogModelTypeToString(watchdog->model)); - return -1; - } + *detach = vm->def->watchdogs[idx];
- if (watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { + if ((*detach)->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("hot unplug of watchdog of model %s is not supported"), - virDomainWatchdogModelTypeToString(watchdog->model)); + virDomainWatchdogModelTypeToString((*detach)->model)); return -1; }
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ee9f0784d3a3..218231f3596c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -804,7 +804,8 @@ qemuProcessHandleWatchdog(qemuMonitor *mon G_GNUC_UNUSED, qemuDomainSaveStatus(vm); }
- if (vm->def->watchdog->action == VIR_DOMAIN_WATCHDOG_ACTION_DUMP) { + if (vm->def->nwatchdogs && + vm->def->watchdogs[0]->action == VIR_DOMAIN_WATCHDOG_ACTION_DUMP) { qemuProcessEventSubmit(vm, QEMU_PROCESS_EVENT_WATCHDOG, VIR_DOMAIN_WATCHDOG_ACTION_DUMP, 0, NULL); } diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 6e04b22da43f..cb002dee0eb9 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1188,6 +1188,28 @@ qemuValidateDomainDefTPMs(const virDomainDef *def) }
+static int +qemuValidateDomainDefWatchdogs(const virDomainDef *def) +{ + ssize_t i = 0; + + for (i = 0; i < def->nwatchdogs; i++) {
Here, you can init i to 1, as ...
+ /* We could theoretically support different watchdogs having dump and + * pause, but let's be honest, we support multiple watchdogs only + * because we need to be able to add a second, implicit one, not because + * it is a brilliant idea to have multiple watchdogs. */ + if (def->watchdogs[i]->action != def->watchdogs[0]->action) {
... for i=0 case, this is never ever gonna be true.
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("watchdogs with different actions are not supported " + "with this QEMU binary")); + return -1; + } + } + + return 0; +} + +
Michal

Supported only with q35 machine types. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_domain_address.c | 1 + src/qemu/qemu_validate.c | 25 +++++++++++++++++++++++++ 5 files changed, 29 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7c61da1d765b..4a5f538a565a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -837,6 +837,7 @@ VIR_ENUM_IMPL(virDomainWatchdogModel, "i6300esb", "ib700", "diag288", + "itco", ); VIR_ENUM_IMPL(virDomainWatchdogAction, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index da785076151d..f125ace9c082 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1745,6 +1745,7 @@ typedef enum { VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB, VIR_DOMAIN_WATCHDOG_MODEL_IB700, VIR_DOMAIN_WATCHDOG_MODEL_DIAG288, + VIR_DOMAIN_WATCHDOG_MODEL_ITCO, VIR_DOMAIN_WATCHDOG_MODEL_LAST } virDomainWatchdogModel; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index a5d0505d9b9b..c051bb7a697d 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -5345,6 +5345,7 @@ <value>i6300esb</value> <value>ib700</value> <value>diag288</value> + <value>itco</value> </choice> </attribute> <optional> diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index db4e91501d3f..a0168b2f2a2c 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -925,6 +925,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev, case VIR_DOMAIN_WATCHDOG_MODEL_IB700: case VIR_DOMAIN_WATCHDOG_MODEL_DIAG288: + case VIR_DOMAIN_WATCHDOG_MODEL_ITCO: case VIR_DOMAIN_WATCHDOG_MODEL_LAST: return 0; } diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index cb002dee0eb9..03f5a84ffec2 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1191,6 +1191,7 @@ qemuValidateDomainDefTPMs(const virDomainDef *def) static int qemuValidateDomainDefWatchdogs(const virDomainDef *def) { + bool found_itco = false; ssize_t i = 0; for (i = 0; i < def->nwatchdogs; i++) { @@ -1204,6 +1205,15 @@ qemuValidateDomainDefWatchdogs(const virDomainDef *def) "with this QEMU binary")); return -1; } + + if (def->watchdogs[i]->model == VIR_DOMAIN_WATCHDOG_MODEL_ITCO) { + if (found_itco) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Multiple iTCO watchdogs are not supported")); + return -1; + } + found_itco = true; + } } return 0; @@ -2410,6 +2420,21 @@ qemuValidateDomainWatchdogDef(const virDomainWatchdogDef *dev, } break; + case VIR_DOMAIN_WATCHDOG_MODEL_ITCO: + if (dev->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("%s model of watchdog is part of the machine and cannot have any address set."), + virDomainWatchdogModelTypeToString(dev->model)); + return -1; + } + if (!qemuDomainIsQ35(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("%s model of watchdog is only part of q35 machine"), + virDomainWatchdogModelTypeToString(dev->model)); + return -1; + } + break; + case VIR_DOMAIN_WATCHDOG_MODEL_LAST: default: virReportEnumRangeError(virDomainWatchdogModel, dev->model); -- 2.39.1

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@redhat.com> --- 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

On Mon, Jan 23, 2023 at 03:57:53PM +0100, Martin Kletzander wrote:
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.
Nit-pick, it is not a guest machine ABI visible change. It is a guest visible behaviour change, in that until now the iTCO watchdog always existed but was a no-op. Now the iTCO watchdog will fire. Conceivably someone could have been using the watchdog until now and not realizing their guest was making it fire. None the less, I consider it deeply conceptually flawed to be exposing a watchdog whose action is forced to be a no-op, because it is telling guests they have a safety net without actually providing the safety net. IOW, I think can call this a bug fix, because people have indeed filed bug reports complaining that the watchdog is broken. Lets just be very clear in release notes that the default enable watchdog is a guest visible change, and explain how users might get it disabled in the worst case (setting action=none) With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

The iTCO watchdog is part of the q35 machine type since its inception, we just did not add it implicitly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2137346 Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/qemu/qemu_domain.c | 44 +++++++++++++++++++ .../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 + tests/qemuxml2argvdata/autoindex.args | 2 + .../boot-floppy-q35.x86_64-latest.args | 2 + tests/qemuxml2argvdata/boot-floppy-q35.xml | 1 + tests/qemuxml2argvdata/cpu-host-model.args | 2 + .../cpu-host-model.x86_64-4.2.0.args | 2 + .../cpu-host-model.x86_64-5.0.0.args | 2 + .../cpu-host-model.x86_64-5.1.0.args | 2 + .../cpu-host-model.x86_64-5.2.0.args | 2 + .../cpu-host-model.x86_64-6.0.0.args | 2 + .../cpu-host-model.x86_64-6.1.0.args | 2 + .../cpu-host-model.x86_64-latest.args | 2 + .../disk-floppy-q35.x86_64-latest.args | 2 + ...are-auto-bios-stateless.x86_64-latest.args | 2 + .../firmware-auto-bios.x86_64-latest.args | 2 + ...-auto-efi-enrolled-keys.x86_64-latest.args | 2 + ...-auto-efi-loader-secure.x86_64-latest.args | 2 + ...to-efi-no-enrolled-keys.x86_64-latest.args | 2 + ...are-auto-efi-no-secboot.x86_64-latest.args | 2 + ...firmware-auto-efi-nvram.x86_64-latest.args | 2 + ...rmware-auto-efi-secboot.x86_64-latest.args | 2 + ...ware-auto-efi-stateless.x86_64-latest.args | 2 + .../firmware-auto-efi.x86_64-latest.args | 2 + .../firmware-manual-efi-acpi-q35.args | 2 + .../firmware-manual-efi-secure.args | 2 + .../firmware-manual-noefi-acpi-q35.args | 2 + .../firmware-manual-noefi-noacpi-q35.args | 2 + ...dev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args | 2 + ...ev-scsi-vhost-scsi-pcie.x86_64-latest.args | 2 + .../hvf-x86_64-q35-headless.args | 2 + .../intel-iommu-aw-bits.x86_64-latest.args | 2 + .../qemuxml2argvdata/intel-iommu-aw-bits.xml | 1 + ...ntel-iommu-caching-mode.x86_64-latest.args | 2 + .../intel-iommu-caching-mode.xml | 1 + ...ntel-iommu-device-iotlb.x86_64-latest.args | 2 + .../intel-iommu-device-iotlb.xml | 1 + .../intel-iommu-eim.x86_64-latest.args | 2 + tests/qemuxml2argvdata/intel-iommu-eim.xml | 1 + .../intel-iommu.x86_64-latest.args | 2 + tests/qemuxml2argvdata/intel-iommu.xml | 1 + ...othreads-ids-pool-sizes.x86_64-latest.args | 2 + .../iothreads-ids-pool-sizes.xml | 1 + .../machine-smm-off.x86_64-latest.args | 2 + .../machine-smm-on.x86_64-latest.args | 2 + tests/qemuxml2argvdata/pcie-expander-bus.args | 2 + .../pcie-root-port-model-generic.args | 2 + .../pcie-root-port-model-ioh3420.args | 2 + ...cie-root-port-nohotplug.x86_64-latest.args | 2 + tests/qemuxml2argvdata/pcie-root-port.args | 2 + tests/qemuxml2argvdata/pcie-root.args | 2 + .../pcie-switch-downstream-port.args | 2 + .../pcie-switch-upstream-port.args | 2 + tests/qemuxml2argvdata/pcihole64-q35.args | 2 + ...q35-default-devices-only.x86_64-4.2.0.args | 2 + ...35-default-devices-only.x86_64-latest.args | 2 + .../q35-multifunction.x86_64-4.2.0.args | 2 + .../q35-multifunction.x86_64-latest.args | 2 + .../q35-pci-force-address.args | 2 + .../q35-pcie-autoadd.x86_64-4.2.0.args | 2 + .../q35-pcie-autoadd.x86_64-latest.args | 2 + .../q35-pcie.x86_64-4.2.0.args | 2 + .../q35-pcie.x86_64-latest.args | 2 + .../q35-pm-disable-fallback.args | 2 + tests/qemuxml2argvdata/q35-pm-disable.args | 2 + tests/qemuxml2argvdata/q35-usb2-multi.args | 2 + tests/qemuxml2argvdata/q35-usb2-reorder.args | 2 + tests/qemuxml2argvdata/q35-usb2.args | 2 + .../q35-virt-manager-basic.x86_64-4.2.0.args | 2 + .../q35-virt-manager-basic.x86_64-latest.args | 2 + tests/qemuxml2argvdata/q35.args | 2 + .../sgx-epc.x86_64-7.0.0.args | 2 + tests/qemuxml2argvdata/sgx-epc.xml | 1 + .../tseg-explicit-size.x86_64-latest.args | 2 + .../usb-controller-default-q35.args | 2 + .../usb-controller-explicit-q35.args | 2 + .../user-aliases2.x86_64-latest.args | 2 + .../vcpu-placement-static.args | 2 + .../vcpu-placement-static.xml | 1 + ...vhost-user-fs-hugepages.x86_64-latest.args | 2 + .../vhost-user-fs-hugepages.xml | 1 + .../virtio-iommu-x86_64.x86_64-latest.args | 2 + ...virtio-non-transitional.x86_64-latest.args | 2 + .../virtio-transitional.x86_64-latest.args | 2 + .../watchdog-q35-multiple.x86_64-latest.args | 1 + ...default-cpu-kvm-q35-4.2.x86_64-latest.args | 2 + ...efault-cpu-tcg-features.x86_64-latest.args | 2 + .../x86_64-default-cpu-tcg-features.xml | 1 + ...default-cpu-tcg-q35-4.2.x86_64-latest.args | 2 + .../x86_64-q35-graphics.x86_64-latest.args | 2 + .../x86_64-q35-headless.x86_64-latest.args | 2 + tests/qemuxml2xmloutdata/autoindex.xml | 1 + ...ware-auto-bios-stateless.x86_64-latest.xml | 1 + .../firmware-auto-bios.x86_64-latest.xml | 1 + ...e-auto-efi-enrolled-keys.x86_64-latest.xml | 1 + ...e-auto-efi-loader-secure.x86_64-latest.xml | 1 + ...uto-efi-no-enrolled-keys.x86_64-latest.xml | 1 + ...ware-auto-efi-no-secboot.x86_64-latest.xml | 1 + .../firmware-auto-efi-nvram.x86_64-latest.xml | 1 + ...irmware-auto-efi-secboot.x86_64-latest.xml | 1 + .../firmware-auto-efi.x86_64-latest.xml | 1 + ...dev-scsi-vhost-scsi-pcie.x86_64-latest.xml | 1 + .../hvf-x86_64-q35-headless.xml | 1 + .../machine-smm-off.x86_64-latest.xml | 1 + .../machine-smm-on.x86_64-latest.xml | 1 + .../net-isolated-port.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/pcie-expander-bus.xml | 1 + .../pcie-root-port-model-generic.xml | 1 + .../pcie-root-port-model-ioh3420.xml | 1 + ...pcie-root-port-nohotplug.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/pcie-root-port.xml | 1 + tests/qemuxml2xmloutdata/pcie-root.xml | 1 + .../pcie-switch-downstream-port.xml | 1 + .../pcie-switch-upstream-port.xml | 1 + tests/qemuxml2xmloutdata/pcihole64-q35.xml | 1 + ...q35-default-devices-only.x86_64-latest.xml | 1 + .../q35-multifunction.x86_64-latest.xml | 1 + .../q35-pci-force-address.xml | 1 + .../q35-pcie-autoadd.x86_64-latest.xml | 1 + .../q35-pcie.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/q35-usb2-multi.xml | 1 + tests/qemuxml2xmloutdata/q35-usb2-reorder.xml | 1 + tests/qemuxml2xmloutdata/q35-usb2.xml | 1 + .../q35-virt-manager-basic.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/q35.xml | 1 + .../tseg-explicit-size.x86_64-latest.xml | 1 + .../usb-controller-default-q35.xml | 1 + .../usb-controller-explicit-q35.xml | 1 + .../virtio-iommu-x86_64.x86_64-latest.xml | 1 + .../virtio-non-transitional.x86_64-latest.xml | 1 + .../virtio-transitional.x86_64-latest.xml | 1 + .../watchdog-q35-multiple.x86_64-latest.xml | 1 + ...-default-cpu-kvm-q35-4.2.x86_64-latest.xml | 1 + ...-default-cpu-tcg-q35-4.2.x86_64-latest.xml | 1 + .../x86_64-q35-graphics.x86_64-latest.xml | 1 + .../x86_64-q35-headless.x86_64-latest.xml | 1 + 136 files changed, 256 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2eb5653254e1..af9d6a9e6258 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3996,6 +3996,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, bool addDefaultUSBKBD = false; bool addDefaultUSBMouse = false; bool addPanicDevice = false; + bool addITCOWatchdog = false; /* add implicit input devices */ if (qemuDomainDefAddImplicitInputDevice(def) < 0) @@ -4012,6 +4013,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, if (qemuDomainIsQ35(def)) { addPCIeRoot = true; addImplicitSATA = true; + addITCOWatchdog = true; /* Prefer adding a USB3 controller if supported, fall back * to USB2 if there is no USB3 available, and if that's @@ -4231,6 +4233,27 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, } } + if (addITCOWatchdog) { + size_t i = 0; + + for (i = 0; i < def->nwatchdogs; i++) { + if (def->watchdogs[i]->model == VIR_DOMAIN_WATCHDOG_MODEL_ITCO) + break; + } + + if (i == def->nwatchdogs) { + virDomainWatchdogDef *watchdog = g_new0(virDomainWatchdogDef, 1); + + watchdog->model = VIR_DOMAIN_WATCHDOG_MODEL_ITCO; + if (def->nwatchdogs) + watchdog->action = def->watchdogs[0]->action; + else + watchdog->action = VIR_DOMAIN_WATCHDOG_ACTION_RESET; + + VIR_APPEND_ELEMENT(def->watchdogs, def->nwatchdogs, watchdog); + } + } + if (qemuDomainDefAddDefaultAudioBackend(driver, def) < 0) return -1; @@ -6469,6 +6492,27 @@ qemuDomainDefFormatBufInternal(virQEMUDriver *driver, */ if (qemuDomainDefClearDefaultAudioBackend(driver, def) < 0) return -1; + + /* Old libvirt did not know about the iTCO watchdog in q35 machine + * types, but nevertheless it was always present. Remove it if it has + * the default action set. */ + if (qemuDomainIsQ35(def)) { + virDomainWatchdogDef *watchdog = NULL; + + for (i = 0; i < def->nwatchdogs; i++) { + if (def->watchdogs[i]->model == VIR_DOMAIN_WATCHDOG_MODEL_ITCO) + break; + } + + if (i < def->nwatchdogs) { + watchdog = def->watchdogs[i]; + + if (watchdog->action == VIR_DOMAIN_WATCHDOG_ACTION_RESET) { + VIR_DELETE_ELEMENT(def->watchdogs, i, def->nwatchdogs); + virDomainWatchdogDefFree(watchdog); + } + } + } } format: diff --git a/tests/qemustatusxml2xmldata/vcpus-multi-in.xml b/tests/qemustatusxml2xmldata/vcpus-multi-in.xml index e71d6a83c70b..648eafc64c0c 100644 --- a/tests/qemustatusxml2xmldata/vcpus-multi-in.xml +++ b/tests/qemustatusxml2xmldata/vcpus-multi-in.xml @@ -338,6 +338,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='intel'> <driver intremap='on' eim='on'/> diff --git a/tests/qemuxml2argvdata/autoindex.args b/tests/qemuxml2argvdata/autoindex.args index a80f49c46167..26965b328b4e 100644 --- a/tests/qemuxml2argvdata/autoindex.args +++ b/tests/qemuxml2argvdata/autoindex.args @@ -58,4 +58,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args b/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args index 7f34c7a96526..db55573402e1 100644 --- a/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args +++ b/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args @@ -35,5 +35,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ -device '{"driver":"floppy","unit":0,"drive":"libvirt-1-format","id":"fdc0-0-0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/boot-floppy-q35.xml b/tests/qemuxml2argvdata/boot-floppy-q35.xml index 0604cd155b2e..384993c79f3b 100644 --- a/tests/qemuxml2argvdata/boot-floppy-q35.xml +++ b/tests/qemuxml2argvdata/boot-floppy-q35.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/cpu-host-model.args b/tests/qemuxml2argvdata/cpu-host-model.args index 5360947e3d8f..6ac535b189c1 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.args +++ b/tests/qemuxml2argvdata/cpu-host-model.args @@ -34,5 +34,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \ -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args index 4b2b55be6239..dfa66e5e91c4 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args @@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args index 2ea818cc1356..d7c26657dd6c 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args @@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args index c6e2f345b80a..4b57cf34d207 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args @@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args index 5bb6545e628c..58b80f7a02ee 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args @@ -32,6 +32,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args index 57ae8a19d8ea..3fb471b46662 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args @@ -32,6 +32,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args index baf095502757..7b1667ab08c5 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args @@ -32,6 +32,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args index 2610e65d16d2..9ca4d23edc87 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args @@ -32,6 +32,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \ -device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args index 810cc0796d8e..a8da3c53d4b4 100644 --- a/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args @@ -38,5 +38,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \ -device '{"driver":"floppy","unit":1,"drive":"libvirt-1-format","id":"fdc0-0-1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args index 1d45a8cfbaab..8bef5a34f8d5 100644 --- a/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args @@ -28,5 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args index 1d45a8cfbaab..8bef5a34f8d5 100644 --- a/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args @@ -28,5 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args index 0b0246496355..966697d86006 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args @@ -32,5 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args index 0b0246496355..966697d86006 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args @@ -32,5 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args index a1ef95ee0350..b02460dbc6b9 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args @@ -31,5 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args index a1ef95ee0350..b02460dbc6b9 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args @@ -31,5 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args index 3659889bf31a..0c131b529d8d 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args @@ -32,5 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args index 0b0246496355..966697d86006 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args @@ -32,5 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args index b79c141b18bb..c89612d7bfff 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args @@ -29,5 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args index 0b0246496355..966697d86006 100644 --- a/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args @@ -32,5 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-manual-efi-acpi-q35.args b/tests/qemuxml2argvdata/firmware-manual-efi-acpi-q35.args index 08280c18ead6..641b7482ef91 100644 --- a/tests/qemuxml2argvdata/firmware-manual-efi-acpi-q35.args +++ b/tests/qemuxml2argvdata/firmware-manual-efi-acpi-q35.args @@ -29,4 +29,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-manual-efi-secure.args b/tests/qemuxml2argvdata/firmware-manual-efi-secure.args index 996acbb24453..7a879c3822f3 100644 --- a/tests/qemuxml2argvdata/firmware-manual-efi-secure.args +++ b/tests/qemuxml2argvdata/firmware-manual-efi-secure.args @@ -30,4 +30,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-test-bios/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-manual-noefi-acpi-q35.args b/tests/qemuxml2argvdata/firmware-manual-noefi-acpi-q35.args index b1c54a66e38d..814396d3fc10 100644 --- a/tests/qemuxml2argvdata/firmware-manual-noefi-acpi-q35.args +++ b/tests/qemuxml2argvdata/firmware-manual-noefi-acpi-q35.args @@ -25,4 +25,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/firmware-manual-noefi-noacpi-q35.args b/tests/qemuxml2argvdata/firmware-manual-noefi-noacpi-q35.args index d0c35d1ef7ac..4eff029173a3 100644 --- a/tests/qemuxml2argvdata/firmware-manual-noefi-noacpi-q35.args +++ b/tests/qemuxml2argvdata/firmware-manual-noefi-noacpi-q35.args @@ -26,4 +26,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args index 992d8ec90547..2e4d6fb88918 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args @@ -29,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \ -device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.1,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args index 98b5e9b0ad5f..6e7f4d093d6b 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args @@ -30,6 +30,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \ -device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"vhost-scsi-pci","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","bus":"pci.1","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args b/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args index 8272c0792b35..06fbcbb15b40 100644 --- a/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args +++ b/tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args @@ -42,6 +42,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-test/.config \ -chardev socket,id=charchannel0,fd=1729,server=on,wait=off \ -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.5,addr=0x0 \ diff --git a/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args index 417b5fb9dc5c..bb946e93ebac 100644 --- a/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args @@ -29,5 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","aw-bits":48}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml b/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml index b4eb81ff5dec..f5b111f6fe99 100644 --- a/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml +++ b/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='intel'> <driver intremap='on' aw_bits='48'/> diff --git a/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args index bfcfc35e2856..5c093808757e 100644 --- a/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args @@ -29,5 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","caching-mode":true}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml b/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml index 4aa4bacf5b85..4c1112a19c10 100644 --- a/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml +++ b/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='intel'> <driver intremap='on' caching_mode='on'/> diff --git a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args index 95cd9d26ef5b..d32eca924768 100644 --- a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args @@ -29,5 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","device-iotlb":true}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml index e106737e6ad7..f646c70f0af1 100644 --- a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml +++ b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='intel'> <driver intremap='on' iotlb='on'/> diff --git a/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args index 12113a280013..a8a65fecf765 100644 --- a/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args @@ -29,5 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","eim":"on"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/intel-iommu-eim.xml b/tests/qemuxml2argvdata/intel-iommu-eim.xml index c4942e4c79b0..1caa0ceb60d9 100644 --- a/tests/qemuxml2argvdata/intel-iommu-eim.xml +++ b/tests/qemuxml2argvdata/intel-iommu-eim.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='intel'> <driver intremap='on' eim='on'/> diff --git a/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args index c99efd229ba4..9ab96cd437c5 100644 --- a/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args @@ -29,5 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"intel-iommu","id":"iommu0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/intel-iommu.xml b/tests/qemuxml2argvdata/intel-iommu.xml index 8badf6c9709a..04c8685bbfa7 100644 --- a/tests/qemuxml2argvdata/intel-iommu.xml +++ b/tests/qemuxml2argvdata/intel-iommu.xml @@ -25,6 +25,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='intel'/> </devices> diff --git a/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.args b/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.args index 12747b51f0f4..5429dedb4bc3 100644 --- a/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.args +++ b/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.args @@ -41,5 +41,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.2","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.xml b/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.xml index 4cebdfada918..284cded0b6d1 100644 --- a/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.xml +++ b/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.xml @@ -57,6 +57,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args b/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args index 46f6a4a70c81..92df830698c8 100644 --- a/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args +++ b/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args @@ -28,5 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args b/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args index 6fde3755231a..e8f956c0d153 100644 --- a/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args +++ b/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args @@ -28,5 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-expander-bus.args b/tests/qemuxml2argvdata/pcie-expander-bus.args index 7db64d7969f0..d12d1d67b40b 100644 --- a/tests/qemuxml2argvdata/pcie-expander-bus.args +++ b/tests/qemuxml2argvdata/pcie-expander-bus.args @@ -130,4 +130,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-pcie-expander-bus-te/.config \ -netdev user,id=hostnet31 \ -device e1000,netdev=hostnet31,id=net31,mac=52:54:00:7e:6d:c9,bus=pci.35,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-root-port-model-generic.args b/tests/qemuxml2argvdata/pcie-root-port-model-generic.args index 62c0bf982e34..9dc7e5720854 100644 --- a/tests/qemuxml2argvdata/pcie-root-port-model-generic.args +++ b/tests/qemuxml2argvdata/pcie-root-port-model-generic.args @@ -29,4 +29,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ -device ioh3420,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args b/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args index 0247c87166bd..a0c5269eee03 100644 --- a/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args +++ b/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args @@ -28,4 +28,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -device ioh3420,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \ -device ioh3420,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args b/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args index 1e0a42a8ed7b..a82996da7d73 100644 --- a/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args +++ b/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args @@ -37,5 +37,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -device '{"driver":"xio3130-downstream","port":39,"chassis":30,"id":"pci.8","bus":"pci.4","addr":"0x3"}' \ -device '{"driver":"qemu-xhci","id":"usb","bus":"pci.2","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-root-port.args b/tests/qemuxml2argvdata/pcie-root-port.args index 7ae8645b17ad..c548d18c934f 100644 --- a/tests/qemuxml2argvdata/pcie-root-port.args +++ b/tests/qemuxml2argvdata/pcie-root-port.args @@ -32,4 +32,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-root.args b/tests/qemuxml2argvdata/pcie-root.args index 06a31506f839..3d75adce4e22 100644 --- a/tests/qemuxml2argvdata/pcie-root.args +++ b/tests/qemuxml2argvdata/pcie-root.args @@ -26,4 +26,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-switch-downstream-port.args b/tests/qemuxml2argvdata/pcie-switch-downstream-port.args index 63769ed0cff6..3668cd98403b 100644 --- a/tests/qemuxml2argvdata/pcie-switch-downstream-port.args +++ b/tests/qemuxml2argvdata/pcie-switch-downstream-port.args @@ -40,4 +40,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcie-switch-upstream-port.args b/tests/qemuxml2argvdata/pcie-switch-upstream-port.args index a260479b4442..a77ad08769c2 100644 --- a/tests/qemuxml2argvdata/pcie-switch-upstream-port.args +++ b/tests/qemuxml2argvdata/pcie-switch-upstream-port.args @@ -34,4 +34,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pcihole64-q35.args b/tests/qemuxml2argvdata/pcihole64-q35.args index e5114936ea83..a62345895d9b 100644 --- a/tests/qemuxml2argvdata/pcihole64-q35.args +++ b/tests/qemuxml2argvdata/pcihole64-q35.args @@ -31,4 +31,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args index a4de318a050d..ed8d4c431a3a 100644 --- a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args @@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args index ce5b2a216e68..f6c06805ff6a 100644 --- a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args +++ b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args @@ -32,6 +32,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \ -device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-multifunction.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-multifunction.x86_64-4.2.0.args index 287268d1c8e7..6f8ae929e1d5 100644 --- a/tests/qemuxml2argvdata/q35-multifunction.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/q35-multifunction.x86_64-4.2.0.args @@ -46,6 +46,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device pcie-root-port,port=21,chassis=18,id=pci.18,bus=pcie.0,addr=0x2.0x5 \ -device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-multifunction.x86_64-latest.args b/tests/qemuxml2argvdata/q35-multifunction.x86_64-latest.args index 298f7ed13d14..f2c549cbb4a3 100644 --- a/tests/qemuxml2argvdata/q35-multifunction.x86_64-latest.args +++ b/tests/qemuxml2argvdata/q35-multifunction.x86_64-latest.args @@ -47,6 +47,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device '{"driver":"pcie-root-port","port":21,"chassis":18,"id":"pci.18","bus":"pcie.0","addr":"0x2.0x5"}' \ -device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-pci-force-address.args b/tests/qemuxml2argvdata/q35-pci-force-address.args index 7f2b2ef0686d..7867e7798d7f 100644 --- a/tests/qemuxml2argvdata/q35-pci-force-address.args +++ b/tests/qemuxml2argvdata/q35-pci-force-address.args @@ -33,4 +33,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -audiodev '{"id":"audio1","driver":"none"}' \ -device intel-hda,id=sound0,bus=pci.3,addr=0x0 \ -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0,audiodev=audio1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args index 787cbfa51106..f093ec4330b1 100644 --- a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args @@ -58,6 +58,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device virtio-tablet-pci,id=input3,bus=pci.13,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device virtio-vga,id=video0,max_outputs=1,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.8,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=123,period=1234,bus=pci.9,addr=0x0 \ diff --git a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args index fcb9e9e43f07..79fd054654e4 100644 --- a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args +++ b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args @@ -59,6 +59,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device '{"driver":"virtio-tablet-pci","id":"input3","bus":"pci.13","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -device '{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pcie.0","addr":"0x1"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.8","addr":"0x0"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \ -device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","max-bytes":123,"period":1234,"bus":"pci.9","addr":"0x0"}' \ diff --git a/tests/qemuxml2argvdata/q35-pcie.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-pcie.x86_64-4.2.0.args index 15daab14b782..52e6e766f522 100644 --- a/tests/qemuxml2argvdata/q35-pcie.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/q35-pcie.x86_64-4.2.0.args @@ -59,6 +59,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device virtio-tablet-pci,id=input3,bus=pci.15,addr=0x0 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device virtio-vga,id=video0,max_outputs=1,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.10,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=123,period=1234,bus=pci.11,addr=0x0 \ diff --git a/tests/qemuxml2argvdata/q35-pcie.x86_64-latest.args b/tests/qemuxml2argvdata/q35-pcie.x86_64-latest.args index 08afee14a406..69b37feb20d0 100644 --- a/tests/qemuxml2argvdata/q35-pcie.x86_64-latest.args +++ b/tests/qemuxml2argvdata/q35-pcie.x86_64-latest.args @@ -60,6 +60,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device '{"driver":"virtio-tablet-pci","id":"input3","bus":"pci.15","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -device '{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pcie.0","addr":"0x1"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.10","addr":"0x0"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \ -device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","max-bytes":123,"period":1234,"bus":"pci.11","addr":"0x0"}' \ diff --git a/tests/qemuxml2argvdata/q35-pm-disable-fallback.args b/tests/qemuxml2argvdata/q35-pm-disable-fallback.args index 50eb2fa109a2..f43ace5db098 100644 --- a/tests/qemuxml2argvdata/q35-pm-disable-fallback.args +++ b/tests/qemuxml2argvdata/q35-pm-disable-fallback.args @@ -31,5 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35/.config \ -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ -device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-pm-disable.args b/tests/qemuxml2argvdata/q35-pm-disable.args index 3a6437cf313c..de65dd67f0f1 100644 --- a/tests/qemuxml2argvdata/q35-pm-disable.args +++ b/tests/qemuxml2argvdata/q35-pm-disable.args @@ -31,5 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35/.config \ -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ -device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-usb2-multi.args b/tests/qemuxml2argvdata/q35-usb2-multi.args index e2a2cbdd190a..95e7ad293857 100644 --- a/tests/qemuxml2argvdata/q35-usb2-multi.args +++ b/tests/qemuxml2argvdata/q35-usb2-multi.args @@ -44,4 +44,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-usb2-reorder.args b/tests/qemuxml2argvdata/q35-usb2-reorder.args index 3c7f1e61992c..67b4da11eed3 100644 --- a/tests/qemuxml2argvdata/q35-usb2-reorder.args +++ b/tests/qemuxml2argvdata/q35-usb2-reorder.args @@ -44,4 +44,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-usb2.args b/tests/qemuxml2argvdata/q35-usb2.args index 325bbd31c771..3ec2363f4d75 100644 --- a/tests/qemuxml2argvdata/q35-usb2.args +++ b/tests/qemuxml2argvdata/q35-usb2.args @@ -36,4 +36,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args index 14093a3f80b4..042f965183a5 100644 --- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args @@ -53,6 +53,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,bus=pcie.0,addr=0x1 \ -device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b \ -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0,audiodev=audio1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -chardev spicevmc,id=charredir0,name=usbredir \ -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \ -chardev spicevmc,id=charredir1,name=usbredir \ diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args index 8446abdb6e67..de4443c4abd5 100644 --- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args +++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args @@ -53,6 +53,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \ -device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pcie.0","addr":"0x1"}' \ -device '{"driver":"ich9-intel-hda","id":"sound0","bus":"pcie.0","addr":"0x1b"}' \ -device '{"driver":"hda-duplex","id":"sound0-codec0","bus":"sound0.0","cad":0,"audiodev":"audio1"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -chardev spicevmc,id=charredir0,name=usbredir \ -device '{"driver":"usb-redir","chardev":"charredir0","id":"redir0","bus":"usb.0","port":"2"}' \ -chardev spicevmc,id=charredir1,name=usbredir \ diff --git a/tests/qemuxml2argvdata/q35.args b/tests/qemuxml2argvdata/q35.args index cd76c36cfac6..88d5455752c6 100644 --- a/tests/qemuxml2argvdata/q35.args +++ b/tests/qemuxml2argvdata/q35.args @@ -34,4 +34,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -device ide-hd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/sgx-epc.x86_64-7.0.0.args b/tests/qemuxml2argvdata/sgx-epc.x86_64-7.0.0.args index e5d29afabd9c..dc07d75bf14f 100644 --- a/tests/qemuxml2argvdata/sgx-epc.x86_64-7.0.0.args +++ b/tests/qemuxml2argvdata/sgx-epc.x86_64-7.0.0.args @@ -35,6 +35,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -object '{"qom-type":"memory-backend-epc","id":"memepc0","prealloc":true,"size":67108864,"host-nodes":[0,1],"policy":"bind"}' \ -object '{"qom-type":"memory-backend-epc","id":"memepc1","prealloc":true,"size":16777216,"host-nodes":[0,1],"policy":"bind"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.1","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/sgx-epc.xml b/tests/qemuxml2argvdata/sgx-epc.xml index f6cbc67a5102..ba4cc560fd14 100644 --- a/tests/qemuxml2argvdata/sgx-epc.xml +++ b/tests/qemuxml2argvdata/sgx-epc.xml @@ -40,6 +40,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args index 3371199be521..df40b2d28346 100644 --- a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args +++ b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args @@ -33,6 +33,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \ -device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/usb-controller-default-q35.args b/tests/qemuxml2argvdata/usb-controller-default-q35.args index f891a3dc776e..a3819c7cf8ea 100644 --- a/tests/qemuxml2argvdata/usb-controller-default-q35.args +++ b/tests/qemuxml2argvdata/usb-controller-default-q35.args @@ -27,4 +27,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -boot strict=on \ -device piix3-usb-uhci,id=usb,bus=pcie.0,addr=0x1 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/usb-controller-explicit-q35.args b/tests/qemuxml2argvdata/usb-controller-explicit-q35.args index 5fb4553776bd..08c2939ce81b 100644 --- a/tests/qemuxml2argvdata/usb-controller-explicit-q35.args +++ b/tests/qemuxml2argvdata/usb-controller-explicit-q35.args @@ -27,4 +27,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \ -boot strict=on \ -device nec-usb-xhci,id=usb,bus=pcie.0,addr=0x1 \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args b/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args index 7f34c7a96526..db55573402e1 100644 --- a/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args +++ b/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args @@ -35,5 +35,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ -device '{"driver":"floppy","unit":0,"drive":"libvirt-1-format","id":"fdc0-0-0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/vcpu-placement-static.args b/tests/qemuxml2argvdata/vcpu-placement-static.args index f5b24e1875bb..3502b92d5d56 100644 --- a/tests/qemuxml2argvdata/vcpu-placement-static.args +++ b/tests/qemuxml2argvdata/vcpu-placement-static.args @@ -28,4 +28,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-dummy2/.config \ -no-acpi \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/vcpu-placement-static.xml b/tests/qemuxml2argvdata/vcpu-placement-static.xml index 47b70335e51d..3fd604d496d8 100644 --- a/tests/qemuxml2argvdata/vcpu-placement-static.xml +++ b/tests/qemuxml2argvdata/vcpu-placement-static.xml @@ -29,6 +29,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args index 6ce2aa0b221b..1e65656f581f 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args @@ -37,5 +37,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -chardev socket,id=chr-vu-fs0,path=/tmp/lib/domain--1-guest/fs0-fs.sock \ -device '{"driver":"vhost-user-fs-pci","id":"fs0","chardev":"chr-vu-fs0","tag":"mount_tag","bootindex":2,"bus":"pci.1","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml index 018611996d46..d319f2926e7a 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml +++ b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml @@ -72,6 +72,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args index 744367c6c099..3a115c87cdbe 100644 --- a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args @@ -28,5 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"virtio-iommu","id":"iommu0","bus":"pcie.0","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args index 2eafeca9f3a1..b7ffbd164c03 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args @@ -47,6 +47,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -netdev '{"type":"user","id":"hostnet0"}' \ -device '{"driver":"virtio-net-pci-non-transitional","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.2","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"vhost-scsi-pci-non-transitional","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","bus":"pci.6","addr":"0x0"}' \ -device '{"driver":"virtio-balloon-pci-non-transitional","id":"balloon0","bus":"pci.7","addr":"0x0"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \ diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args index 3cf395952806..ef81180c4815 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args @@ -40,6 +40,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -netdev '{"type":"user","id":"hostnet0"}' \ -device '{"driver":"virtio-net-pci-transitional","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.2","addr":"0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"vhost-scsi-pci-transitional","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","bus":"pci.2","addr":"0x6"}' \ -device '{"driver":"virtio-balloon-pci-transitional","id":"balloon0","bus":"pci.2","addr":"0x7"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \ diff --git a/tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args b/tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args index eccf5a2e119f..d85471cc7408 100644 --- a/tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args +++ b/tests/qemuxml2argvdata/watchdog-q35-multiple.x86_64-latest.args @@ -34,6 +34,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -audiodev '{"id":"audio1","driver":"none"}' \ -device '{"driver":"ib700","id":"watchdog0"}' \ -device '{"driver":"i6300esb","id":"watchdog1","bus":"pci.2","addr":"0x2"}' \ +-global ICH9-LPC.noreboot=off \ -watchdog-action poweroff \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args index 0368ecc699e3..fa836c862748 100644 --- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args @@ -35,6 +35,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.2","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.3","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.x86_64-latest.args index c9c71cf4e6b7..303931af2d98 100644 --- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.x86_64-latest.args @@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \ -device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.xml b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.xml index 808e31752c79..d2364a7f4eea 100644 --- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.xml +++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.xml @@ -49,6 +49,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args index c2eb8066df3e..53588ddb84ba 100644 --- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args @@ -35,6 +35,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.2","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.3","addr":"0x0"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args index db56a837632a..f4e2c4480227 100644 --- a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args @@ -50,6 +50,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -audiodev '{"id":"audio1","driver":"none"}' \ -vnc 127.0.0.1:0,audiodev=audio1 \ -device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pcie.0","addr":"0x1"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \ -device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \ diff --git a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args index dde31179d364..f2ad2d210e95 100644 --- a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args @@ -48,6 +48,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -chardev socket,id=charchannel0,fd=1729,server=on,wait=off \ -device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \ -device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \ diff --git a/tests/qemuxml2xmloutdata/autoindex.xml b/tests/qemuxml2xmloutdata/autoindex.xml index 8f622d56b219..54ad60e804c5 100644 --- a/tests/qemuxml2xmloutdata/autoindex.xml +++ b/tests/qemuxml2xmloutdata/autoindex.xml @@ -150,6 +150,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml index f1b5516ce487..7609ded09af9 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml @@ -29,6 +29,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml index 722294089ea3..3c48ff19c69a 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml index 8dcc741c1e1f..e411c0e614d3 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml @@ -32,6 +32,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml index 26e30d7f6428..3ba6ec2b862b 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml @@ -29,6 +29,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml index e5d307e0b236..58745a4b1a21 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml @@ -31,6 +31,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml index 1528ebcfe092..7625ef219aed 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml @@ -31,6 +31,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml index abd6ec079de8..f6243bc43a28 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml @@ -29,6 +29,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml index ef24e04b615f..1c66ca23a147 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml @@ -31,6 +31,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml index 7e2e40036ea0..b9b119fd2148 100644 --- a/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml index 032b4ce03046..5634afddd5b0 100644 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml @@ -39,6 +39,7 @@ <source protocol='vhost' wwpn='naa.5123456789abcde0'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </hostdev> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml b/tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml index fd2b376b9be5..d8b8422eaf12 100644 --- a/tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml +++ b/tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml @@ -86,6 +86,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml b/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml index 77b0b39750e4..29f295372490 100644 --- a/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml b/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml index 7c7df9e06d42..7a6948aa4642 100644 --- a/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml index b2eb8516b80c..c3dca579a659 100644 --- a/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml @@ -59,6 +59,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-expander-bus.xml b/tests/qemuxml2xmloutdata/pcie-expander-bus.xml index 45b03a1fb890..bb614096c4f9 100644 --- a/tests/qemuxml2xmloutdata/pcie-expander-bus.xml +++ b/tests/qemuxml2xmloutdata/pcie-expander-bus.xml @@ -370,6 +370,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-root-port-model-generic.xml b/tests/qemuxml2xmloutdata/pcie-root-port-model-generic.xml index 1e787378d1c9..1d287541cc13 100644 --- a/tests/qemuxml2xmloutdata/pcie-root-port-model-generic.xml +++ b/tests/qemuxml2xmloutdata/pcie-root-port-model-generic.xml @@ -36,6 +36,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-root-port-model-ioh3420.xml b/tests/qemuxml2xmloutdata/pcie-root-port-model-ioh3420.xml index 9382155e7183..efa33990defe 100644 --- a/tests/qemuxml2xmloutdata/pcie-root-port-model-ioh3420.xml +++ b/tests/qemuxml2xmloutdata/pcie-root-port-model-ioh3420.xml @@ -31,6 +31,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-root-port-nohotplug.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pcie-root-port-nohotplug.x86_64-latest.xml index 83ae6c91ae93..202003c59a99 100644 --- a/tests/qemuxml2xmloutdata/pcie-root-port-nohotplug.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/pcie-root-port-nohotplug.x86_64-latest.xml @@ -66,6 +66,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-root-port.xml b/tests/qemuxml2xmloutdata/pcie-root-port.xml index 45ab6c308012..cb435930320c 100644 --- a/tests/qemuxml2xmloutdata/pcie-root-port.xml +++ b/tests/qemuxml2xmloutdata/pcie-root-port.xml @@ -41,6 +41,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-root.xml b/tests/qemuxml2xmloutdata/pcie-root.xml index a17790294701..b0140244fd44 100644 --- a/tests/qemuxml2xmloutdata/pcie-root.xml +++ b/tests/qemuxml2xmloutdata/pcie-root.xml @@ -21,6 +21,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-switch-downstream-port.xml b/tests/qemuxml2xmloutdata/pcie-switch-downstream-port.xml index ba63acfe16e8..7902511ef359 100644 --- a/tests/qemuxml2xmloutdata/pcie-switch-downstream-port.xml +++ b/tests/qemuxml2xmloutdata/pcie-switch-downstream-port.xml @@ -79,6 +79,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcie-switch-upstream-port.xml b/tests/qemuxml2xmloutdata/pcie-switch-upstream-port.xml index 298db1df5ecc..d0d9d2a5749b 100644 --- a/tests/qemuxml2xmloutdata/pcie-switch-upstream-port.xml +++ b/tests/qemuxml2xmloutdata/pcie-switch-upstream-port.xml @@ -49,6 +49,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/pcihole64-q35.xml b/tests/qemuxml2xmloutdata/pcihole64-q35.xml index 5c3947f7f818..b47c5243a27d 100644 --- a/tests/qemuxml2xmloutdata/pcihole64-q35.xml +++ b/tests/qemuxml2xmloutdata/pcihole64-q35.xml @@ -33,6 +33,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml index 5540ad11475c..8cb03dcc050e 100644 --- a/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml @@ -42,6 +42,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/q35-multifunction.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-multifunction.x86_64-latest.xml index e8ea62321a19..10d839dfc9e3 100644 --- a/tests/qemuxml2xmloutdata/q35-multifunction.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/q35-multifunction.x86_64-latest.xml @@ -117,6 +117,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/q35-pci-force-address.xml b/tests/qemuxml2xmloutdata/q35-pci-force-address.xml index 45df55365e0f..7490e7095a12 100644 --- a/tests/qemuxml2xmloutdata/q35-pci-force-address.xml +++ b/tests/qemuxml2xmloutdata/q35-pci-force-address.xml @@ -44,6 +44,7 @@ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </sound> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml index 30379023543c..c92408d95c4e 100644 --- a/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml @@ -141,6 +141,7 @@ <model type='virtio' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/q35-pcie.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-pcie.x86_64-latest.xml index 72535446f617..0a36e78e02ce 100644 --- a/tests/qemuxml2xmloutdata/q35-pcie.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/q35-pcie.x86_64-latest.xml @@ -145,6 +145,7 @@ <model type='virtio' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/q35-usb2-multi.xml b/tests/qemuxml2xmloutdata/q35-usb2-multi.xml index aadba4102384..019a4d2765e9 100644 --- a/tests/qemuxml2xmloutdata/q35-usb2-multi.xml +++ b/tests/qemuxml2xmloutdata/q35-usb2-multi.xml @@ -85,6 +85,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/q35-usb2-reorder.xml b/tests/qemuxml2xmloutdata/q35-usb2-reorder.xml index 92f07cade50c..2a9342c4d66f 100644 --- a/tests/qemuxml2xmloutdata/q35-usb2-reorder.xml +++ b/tests/qemuxml2xmloutdata/q35-usb2-reorder.xml @@ -85,6 +85,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/q35-usb2.xml b/tests/qemuxml2xmloutdata/q35-usb2.xml index f5e6442008ee..9e0c3da06344 100644 --- a/tests/qemuxml2xmloutdata/q35-usb2.xml +++ b/tests/qemuxml2xmloutdata/q35-usb2.xml @@ -55,6 +55,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml index 62289d48009d..5bb00ceb3823 100644 --- a/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml @@ -120,6 +120,7 @@ <redirdev bus='usb' type='spicevmc'> <address type='usb' bus='0' port='3'/> </redirdev> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/q35.xml b/tests/qemuxml2xmloutdata/q35.xml index 3a37173da2e3..c7f0e19deb20 100644 --- a/tests/qemuxml2xmloutdata/q35.xml +++ b/tests/qemuxml2xmloutdata/q35.xml @@ -46,6 +46,7 @@ <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml index 78ffe820cfa1..d0bb47cda8f4 100644 --- a/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml @@ -47,6 +47,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/usb-controller-default-q35.xml b/tests/qemuxml2xmloutdata/usb-controller-default-q35.xml index 2122d7ecd9ae..4b307f3b7b34 100644 --- a/tests/qemuxml2xmloutdata/usb-controller-default-q35.xml +++ b/tests/qemuxml2xmloutdata/usb-controller-default-q35.xml @@ -24,6 +24,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/usb-controller-explicit-q35.xml b/tests/qemuxml2xmloutdata/usb-controller-explicit-q35.xml index 328bcaee9c6e..a64ff769df70 100644 --- a/tests/qemuxml2xmloutdata/usb-controller-explicit-q35.xml +++ b/tests/qemuxml2xmloutdata/usb-controller-explicit-q35.xml @@ -24,6 +24,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml index ad3a702b0ba5..f458f9a706d4 100644 --- a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml @@ -28,6 +28,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml index 26f6c6d34e63..1045fe8fc0a1 100644 --- a/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml @@ -101,6 +101,7 @@ <source protocol='vhost' wwpn='naa.5123456789abcde0'/> <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </hostdev> + <watchdog model='itco' action='reset'/> <memballoon model='virtio-non-transitional'> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml index 8e9ecd8cf34e..0b32684ba8c7 100644 --- a/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml @@ -65,6 +65,7 @@ <source protocol='vhost' wwpn='naa.5123456789abcde0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/> </hostdev> + <watchdog model='itco' action='reset'/> <memballoon model='virtio-transitional'> <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml b/tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml index e507576085f7..7e60c6e6517d 100644 --- a/tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/watchdog-q35-multiple.x86_64-latest.xml @@ -45,6 +45,7 @@ <watchdog model='i6300esb' action='poweroff'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </watchdog> + <watchdog model='itco' action='poweroff'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml index 61b9077597da..bf9010ec5770 100644 --- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml @@ -57,6 +57,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml index 04335f6244e3..a0c1563fbdb1 100644 --- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml @@ -57,6 +57,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml index 02485adb9868..4273cd4b6cfc 100644 --- a/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml @@ -113,6 +113,7 @@ <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml index 0eedb748dd13..b3976a85fdf4 100644 --- a/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml @@ -105,6 +105,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> </memballoon> -- 2.39.1

With the reasoning behind it. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- docs/formatdomain.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f76c7c3d81f5..90a039f7bdfd 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -7544,8 +7544,8 @@ defaults to 'WAV' with QEMU. :since:`Since 7.2.0, qemu` -Watchdog device -~~~~~~~~~~~~~~~ +Watchdog devices +~~~~~~~~~~~~~~~~ A virtual hardware watchdog device can be added to the guest via the ``watchdog`` element. :since:`Since 0.7.3, QEMU and KVM only` @@ -7557,6 +7557,11 @@ anything useful on its own. Currently libvirt does not support notification when the watchdog fires. This feature is planned for a future version of libvirt. +Having multiple watchdogs is usually not something very common, but be aware +that this might happen, for example, when an implicit watchdog device is added +as part of another device. For example whe iTCO watchdog being part of the ich9 +southbridge, which is used with the q35 machine type. :since:`Since 9.1.0` + :: ... @@ -7579,6 +7584,7 @@ feature is planned for a future version of libvirt. QEMU and KVM support: + - 'itco' - included by default with q35 machine type :since:`Since 9.1.0` - 'i6300esb' - the recommended device, emulating a PCI Intel 6300ESB - 'ib700' - emulating an ISA iBase IB700 - 'diag288' - emulating an S390 DIAG288 device :since:`Since 1.2.17` -- 2.39.1

Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2756b2561164..b4e9ef608d68 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -25,6 +25,12 @@ v9.1.0 (unreleased) allowing installation of a modular daemon configuration without the traditional monolithic libvirtd. + * QEMU: iTCO watchdog made operational + + The watchdog was always included when q35 machine type was used, but needed + an extra bit of configuration in order to be operational. This is now done + by default when running a QEMU domain with q35 machine type. + * **Bug fixes** -- 2.39.1

Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- How about this for the release notes, if it is not explicit enough, then let me know, suggestions are welcome. NEWS.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index a0fe0d18a0ca..3d3d40d97e9e 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -38,6 +38,15 @@ v9.1.0 (unreleased) * **Bug fixes** + * QEMU: iTCO watchdog made operational + + The watchdog was always included when q35 machine type was used, but needed + an extra bit of configuration in order to be operational. This is now done + by default when running a QEMU domain with q35 machine type. This is not a + change in the guest ABI, but it is a guest visible behavior change since the + watchdog that did not fire before will now fire once used. To switch to the + previous behavior the watchdog action must be set to ``none``. + v9.0.0 (2023-01-16) =================== -- 2.39.1

On 1/24/23 17:35, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- How about this for the release notes, if it is not explicit enough, then let me know, suggestions are welcome.
NEWS.rst | 9 +++++++++ 1 file changed, 9 insertions(+)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal

On 1/23/23 15:57, Martin Kletzander wrote:
More info in commit messages (duh).
Martin Kletzander (7): Avoid unnecessary nesting Support multiple watchdog devices Add iTCO watchdog support qemu: Enable iTCO watchdog by disabling its noreboot pin strap qemu: Add implicit watchdog for q35 machine types Document change to multiple watchdogs news: Add information about iTCO watchdog changes
153 files changed, 601 insertions(+), 97 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (3)
-
Daniel P. Berrangé
-
Martin Kletzander
-
Michal Prívozník