From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784734931; cv=none; d=zohomail.com; s=zohoarc; b=D05IIpHHYYoqFF7d34Pn6lUV5q8rXN2USbB3TzM6Reis6Hh2Iaq2ajAZqWrkPRsMJl8c50TpvwTwc44uQADPnpO6VTr2DcI2gKNiPyeZq887do4PY8uFc17weYV3BJNwku57CWr2DZsLJBB3KL8ScAXEdJURno7FShrlhXWPYlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784734931; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=KPLIGNK7fx7vGETp2ld0fZBWcMLN8ZScPHusaR+8OFo=; b=QBmmRPfzA9vSONsD5O4L9MhvIQbcq0kAkSBHWN+BXZctIoQ+iml8wRBPQjggGbIsk5Q/eAoajELO1pFHeWvrJdZyrs4geW0R+88s2dpln0Lnzx6YOCjakRGLI6HTJC9GKb7a6O30L4aiS9Dda5p6R7ZXVFiL2PX274M6PRv7jN8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784734931533362.10112886586126; Wed, 22 Jul 2026 08:42:11 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 425F241B41; Wed, 22 Jul 2026 11:42:10 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id C4F1241BB3; Wed, 22 Jul 2026 11:38:41 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id F0DC841949; Wed, 22 Jul 2026 11:38:26 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 87D6E41920 for ; Wed, 22 Jul 2026 11:38:25 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-347-QVw7hJe0P7ymUzS4hA6jLg-1; Wed, 22 Jul 2026 11:38:23 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6A2911805F0B for ; Wed, 22 Jul 2026 15:38:22 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BB70A42F for ; Wed, 22 Jul 2026 15:38:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KPLIGNK7fx7vGETp2ld0fZBWcMLN8ZScPHusaR+8OFo=; b=PKoaRA9XhwryJxckmP2byODzb9hRnG/3Qcy4vRsG5IbGCZI296LlFnbzSm3j/lviagP7H/ 2iGb78k1Dwsjzkx9oE4Pss8YLYZ2k2bW9TZVCOC7i94CleUZ9qOb8+CTtRyfoGGsVFZA1J mNzQ58U1P+0VffE0hHeJuL4zaItQ6eU= X-MC-Unique: QVw7hJe0P7ymUzS4hA6jLg-1 X-Mimecast-MFC-AGG-ID: QVw7hJe0P7ymUzS4hA6jLg_1784734702 To: devel@lists.libvirt.org Subject: [PATCH 01/13] qemu: Always assume support for 'QEMU_CAPS_SET_ACTION' Date: Wed, 22 Jul 2026 17:38:06 +0200 Message-ID: <36289d970fa4af8fac7bffc99cd6a4ff170cea44.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 2HtTlkMiYNbR7ixBNxk3FyFcoDlD_CFZm38nXEdGS6c_1784734702 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: R7VBWQULH2KYMZDUBMJXSA544GHL4T4B X-Message-ID-Hash: R7VBWQULH2KYMZDUBMJXSA544GHL4T4B X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784734931877158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The 'set-action' QMP command was introduced in qemu-6.0 and can't be disabled in any way. Oldest qemu we support is qemu-7.2 so all versions now have it. Remove all conditional code which depends on the 'set-action' command. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 13 +++---------- src/qemu/qemu_driver.c | 16 ---------------- src/qemu/qemu_hotplug.c | 10 +--------- src/qemu/qemu_process.c | 31 +------------------------------ src/qemu/qemu_validate.c | 14 ++------------ 5 files changed, 7 insertions(+), 77 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 95e2ea9a6b..a76a034158 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6184,16 +6184,9 @@ qemuBuildPMCommandLine(virCommand *cmd, { virQEMUCaps *qemuCaps =3D priv->qemuCaps; - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { - /* with new qemu we always want '-no-shutdown' on startup and we s= et - * all the other behaviour later during startup */ - virCommandAddArg(cmd, "-no-shutdown"); - } else { - if (priv->allowReboot =3D=3D VIR_TRISTATE_BOOL_NO) - virCommandAddArg(cmd, "-no-reboot"); - else - virCommandAddArg(cmd, "-no-shutdown"); - } + /* with new qemu we always want '-no-shutdown' on startup and we set + * all the other behaviour later during startup */ + virCommandAddArg(cmd, "-no-shutdown"); /* Use old syntax of -no-acpi only if qemu didn't report that it suppo= rts the * new syntax */ diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bdc0cff66a..71308770f6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19548,9 +19548,6 @@ qemuDomainModifyLifecycleActionLive(virDomainObj *v= m, qemuDomainObjPrivate *priv =3D vm->privateData; int rc; - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) - return 0; - /* For now we only update 'reboot' action here as we want to keep the * shutdown action as is (we're emulating the outcome anyways)) */ if (type !=3D VIR_DOMAIN_LIFECYCLE_REBOOT || @@ -19600,7 +19597,6 @@ qemuDomainSetLifecycleAction(virDomainPtr dom, { virQEMUDriver *driver =3D dom->conn->privateData; g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); - qemuDomainObjPrivate *priv; virDomainObj *vm =3D NULL; virDomainDef *def =3D NULL; virDomainDef *persistentDef =3D NULL; @@ -19617,8 +19613,6 @@ qemuDomainSetLifecycleAction(virDomainPtr dom, if (!(vm =3D qemuDomainObjFromDomain(dom))) goto cleanup; - priv =3D vm->privateData; - if (virDomainSetLifecycleActionEnsureACL(dom->conn, vm->def) < 0) goto cleanup; @@ -19633,16 +19627,6 @@ qemuDomainSetLifecycleAction(virDomainPtr dom, goto endjob; if (def) { - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { - if (priv->allowReboot =3D=3D VIR_TRISTATE_BOOL_NO || - (type =3D=3D VIR_DOMAIN_LIFECYCLE_REBOOT && - def->onReboot !=3D action)) { - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("cannot update lifecycle action because Q= EMU was started with incompatible -no-reboot setting")); - goto endjob; - } - } - if (qemuDomainModifyLifecycleActionLive(vm, type, action) < 0) goto endjob; diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 5be567b510..8990a716fa 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -3061,7 +3061,7 @@ qemuDomainAttachWatchdog(virDomainObj *vm, if (vm->def->nwatchdogs) { /* Domain already has a watchdog and all must have the same action= . */ rv =3D 0; - } else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { + } else { /* 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 */ @@ -3103,14 +3103,6 @@ qemuDomainAttachWatchdog(virDomainObj *vm, QEMU_MONITOR_ACTION_REBOOT_KEEP, watchdogaction, QEMU_MONITOR_ACTION_PANIC_KEEP); - } else { - virDomainWatchdogAction actualAction =3D watchdog->action; - - if (actualAction =3D=3D VIR_DOMAIN_WATCHDOG_ACTION_DUMP) - actualAction =3D VIR_DOMAIN_WATCHDOG_ACTION_PAUSE; - - rv =3D qemuMonitorSetWatchdogAction(priv->mon, - virDomainWatchdogActionTypeToStr= ing(actualAction)); } if (rv >=3D 0) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 4c94ff3c91..646ddda7e9 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6898,24 +6898,6 @@ qemuProcessRebootAllowed(const virDomainDef *def) } -static void -qemuProcessPrepareAllowReboot(virDomainObj *vm) -{ - virDomainDef *def =3D vm->def; - qemuDomainObjPrivate *priv =3D vm->privateData; - - /* with 'set-action' QMP command we don't need to keep this around as - * we always update qemu with the proper state */ - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) - return; - - if (priv->allowReboot !=3D VIR_TRISTATE_BOOL_ABSENT) - return; - - priv->allowReboot =3D virTristateBoolFromBool(qemuProcessRebootAllowed= (def)); -} - - static int qemuProcessUpdateSEVInfo(virDomainObj *vm) { @@ -7087,8 +7069,6 @@ qemuProcessPrepareDomain(virQEMUDriver *driver, /* Track if this domain remembers original owner */ priv->rememberOwner =3D cfg->rememberOwner; - qemuProcessPrepareAllowReboot(vm); - /* * Normally PCI addresses are assigned in the virDomainCreate * or virDomainDefine methods. We might still need to assign @@ -8216,9 +8196,6 @@ qemuProcessSetupLifecycleActions(virDomainObj *vm, qemuDomainObjPrivate *priv =3D vm->privateData; int rc; - if (!(virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION))) - return 0; - /* for now we handle only onReboot->destroy here as an alternative to * '-no-reboot' on the commandline */ if (vm->def->onReboot !=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY) @@ -9909,10 +9886,6 @@ qemuProcessReconnect(void *opaque) if (qemuExtDevicesInitPaths(cfg, obj->def) < 0) goto error; - /* If we are connecting to a guest started by old libvirt there is no - * allowReboot in status XML and we need to initialize it. */ - qemuProcessPrepareAllowReboot(obj); - if (qemuHostdevUpdateActiveDomainDevices(driver, obj->def) < 0) goto error; @@ -10147,9 +10120,7 @@ qemuProcessReconnect(void *opaque) * domain crashed; otherwise, if the monitor was started, * then we can blame ourselves, else we failed before the * monitor started so we don't really know. */ - if (!priv->mon && tryMonReconn && - (priv->allowReboot =3D=3D VIR_TRISTATE_BOOL_YES || - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION))) + if (!priv->mon && tryMonReconn) state =3D VIR_DOMAIN_SHUTOFF_CRASHED; else if (priv->mon) state =3D VIR_DOMAIN_SHUTOFF_DAEMON; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 439d4b1916..ae1edf435a 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3658,10 +3658,7 @@ qemuValidateDomainDeviceDefDiskBlkdeviotune(const vi= rDomainDiskDef *disk, static int -qemuValidateDomainDeviceDefDiskTransient(const virDomainDiskDef *disk, - const virDomainDef *def, - virQEMUCaps *qemuCaps) - +qemuValidateDomainDeviceDefDiskTransient(const virDomainDiskDef *disk) { virStorageType actualType =3D virStorageSourceGetActualType(disk->src); @@ -3695,13 +3692,6 @@ qemuValidateDomainDeviceDefDiskTransient(const virDo= mainDiskDef *disk, } if (disk->transientShareBacking =3D=3D VIR_TRISTATE_BOOL_YES) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SET_ACTION) && - !qemuProcessRebootAllowed(def)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("transient disk backing image sharing with de= stroy action of lifecycle isn't supported by this QEMU binary")); - return -1; - } - /* sharing the backing file requires hotplug of the disk in the qe= mu driver */ switch (disk->bus) { case VIR_DOMAIN_DISK_BUS_USB: @@ -3747,7 +3737,7 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDe= f *disk, if (qemuValidateDomainDeviceDefDiskBlkdeviotune(disk, def) < 0) return -1; - if (qemuValidateDomainDeviceDefDiskTransient(disk, def, qemuCaps) < 0) + if (qemuValidateDomainDeviceDefDiskTransient(disk) < 0) return -1; if (disk->src->shared && !disk->src->readonly && --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735028; cv=none; d=zohomail.com; s=zohoarc; b=PRJWLuQg8M+SPX4+VGoKaSAu1hlWL+TXSSyclAk81LOFLOTOa65dq4HLOJLOiWfTABZ2i3AYSnEiCqFFkj9lGxcD0T4wUW/JIDYZJ18kddefT4KaU/mXwKLdXiTbNv36lwoV9K/Hy9DApzzK822PjtdWQ1mxV/29/wJN8mmQv4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735028; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=SlDc4mvk1KYquaHMRqjVdkSZ2ZgcRpx3IyI4maTNFSE=; b=NQSouEI98a4hHJGBNTyIkenAX0jUhKpViYik6+l7d9zmMvtX6wSQOrzH7213z1bZvtyHUpNyXl61eBZ5aXwCSkf1oKDolkqaJbw+rVd4Lt8c11ZmwEpVfjypBWtwR7T4oB4kpB+tUC/MgBEBtx7QPBgeJADEhbwufVNE8IIZ3uI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735028313295.83897059559763; Wed, 22 Jul 2026 08:43:48 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 19ADF41B69; Wed, 22 Jul 2026 11:43:47 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id CCAE241E77; Wed, 22 Jul 2026 11:38:46 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 37A3D41920; Wed, 22 Jul 2026 11:38:27 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6B6DE4190D for ; Wed, 22 Jul 2026 11:38:26 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-cxZRsOEoNxq0sb1LVd8zpg-1; Wed, 22 Jul 2026 11:38:24 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 858E51800772 for ; Wed, 22 Jul 2026 15:38:23 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D0AD5D70 for ; Wed, 22 Jul 2026 15:38:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlDc4mvk1KYquaHMRqjVdkSZ2ZgcRpx3IyI4maTNFSE=; b=AMV7pzWfx5XQeo9poTplzkI27aOhX6se5DjN+R2co3Eqc1eC/YUOVCDk6Yqhs4kFolvwpi PVk17B7WBCvCLTzkznzeUPrQCLjhu62RmeQEIhCmtqpH3CDJMFh+197yGhBg2/Ad9UdLqe 1VVo4qbWNxrnPxMvtMjoofsG5YzSfoc= X-MC-Unique: cxZRsOEoNxq0sb1LVd8zpg-1 X-Mimecast-MFC-AGG-ID: cxZRsOEoNxq0sb1LVd8zpg_1784734703 To: devel@lists.libvirt.org Subject: [PATCH 02/13] qemu: Remove unused 'qemuProcessRebootAllowed' Date: Wed, 22 Jul 2026 17:38:07 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: mPKdDo1yr65yIVuF_D9kNthdbGfuhDIDPH8ovqrnLXA_1784734703 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ORHOCXUCXEX4ISXDUZ66CR7TAUUXLQII X-Message-ID-Hash: ORHOCXUCXEX4ISXDUZ66CR7TAUUXLQII X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735030483158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_process.c | 18 ------------------ src/qemu/qemu_process.h | 2 -- 2 files changed, 20 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 646ddda7e9..a1cdce6d17 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6880,24 +6880,6 @@ qemuProcessPrepareDomainHostdevs(virDomainObj *vm, } -/** - * qemuProcessRebootAllowed: - * @def: domain definition - * - * This function encapsulates the logic which dictated whether '-no-reboot= ' was - * used instead of '-no-shutdown' which is used QEMU versions which don't - * support the 'set-action' QMP command. - */ -bool -qemuProcessRebootAllowed(const virDomainDef *def) -{ - return def->onReboot !=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY || - def->onPoweroff !=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY || - (def->onCrash !=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY && - def->onCrash !=3D VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY= ); -} - - static int qemuProcessUpdateSEVInfo(virDomainObj *vm) { diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 5874214596..2db5186e08 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -258,8 +258,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuProcessQMP, qemuProce= ssQMPFree); int qemuProcessQMPStart(qemuProcessQMP *proc); -bool qemuProcessRebootAllowed(const virDomainDef *def); - void qemuProcessCleanupMigrationJob(virQEMUDriver *driver, virDomainObj *vm); --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735104; cv=none; d=zohomail.com; s=zohoarc; b=E3JYIwIKGWjetwpwfasKwY9RO6bmcW5qaFnXRJAH2WMm6eSaYY55Opd6+DjCSrH+L5YBDdP4T5b+m6IL4iJFrTXlhatLFbgew4lLhc+LzwYICWK6qjaO2YTzvi8u/ZATJQKsv6cQCo6pnLk79hsTxXtO/zVu/kHc2cbrj0T9z10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735104; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=SN4N4jWixqyitJRr5XYa5NN61gOJmZX3UlE+SF4y8P4=; b=QlOD5LqJQCe8tCRadgu3bx4r+VsnzCK65OPkgJjzdf4cyf+1JzgrIa2T/oHUuaqgoN+Zd/yXo1+Hbzlm4jQlpTjeJnTSRZSqxYFe/3Yp+EB06TAR7VFXzWlRSrCElIFwLy2alm6wLYMWqyVqAbYsrIw+gDLIJyXIBydRdpeqXto= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735104031116.42148517899761; Wed, 22 Jul 2026 08:45:04 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id CE01641BC2; Wed, 22 Jul 2026 11:45:02 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 9E49E41C49; Wed, 22 Jul 2026 11:38:51 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 5B24E4190F; Wed, 22 Jul 2026 11:38:29 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 72DB541908 for ; Wed, 22 Jul 2026 11:38:28 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-2-t4MLtX4IMteBfxc1j0icXQ-1; Wed, 22 Jul 2026 11:38:25 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C43F0182E6A5 for ; Wed, 22 Jul 2026 15:38:24 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1368242F for ; Wed, 22 Jul 2026 15:38:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SN4N4jWixqyitJRr5XYa5NN61gOJmZX3UlE+SF4y8P4=; b=LB3t8IOgkyG93KmBdRTw7HW/Ai55rFjwO0RDzjiycuZZqLT6wUWkkejhT+OUplfAIpcj2i LHGaXqtX3kCg7Ffga7iuxJfazTuhj37pr6lfatq7V49N3xvfNJN3XYXoTCEEgVvVsedk7k koBaRSx0C2bQZ85mGmeliUp3PBxxn2E= X-MC-Unique: t4MLtX4IMteBfxc1j0icXQ-1 X-Mimecast-MFC-AGG-ID: t4MLtX4IMteBfxc1j0icXQ_1784734704 To: devel@lists.libvirt.org Subject: [PATCH 03/13] qemu: monitor: Remove support for 'watchdog-set-action' Date: Wed, 22 Jul 2026 17:38:08 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: CwyeyCscIdrjjOTsssTUm2h9gA7ymm_fwXuAs_PmMZs_1784734704 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: F4KIIV3R6KLI7ES7G3KCBN6UA5UOCUQJ X-Message-ID-Hash: F4KIIV3R6KLI7ES7G3KCBN6UA5UOCUQJ X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735104842158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa We now use 'set-action' instead. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor.c | 12 ------------ src/qemu/qemu_monitor.h | 4 ---- src/qemu/qemu_monitor_json.c | 22 ---------------------- src/qemu/qemu_monitor_json.h | 5 ----- 4 files changed, 43 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index d0acd31c05..59b3671de9 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3965,18 +3965,6 @@ qemuMonitorMemoryDeviceSizeChangeFree(qemuMonitorMem= oryDeviceSizeChangePtr info) } -int -qemuMonitorSetWatchdogAction(qemuMonitor *mon, - const char *action) -{ - VIR_DEBUG("watchdogAction=3D%s", action); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONSetWatchdogAction(mon, action); -} - - /** * qemuMonitorBlockdevCreate: * @mon: monitor object diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index c2afb580e4..3298095e9c 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1640,10 +1640,6 @@ qemuMonitorSetBlockThreshold(qemuMonitor *mon, const char *nodename, unsigned long long threshold); -int -qemuMonitorSetWatchdogAction(qemuMonitor *mon, - const char *action); - int qemuMonitorBlockdevCreate(qemuMonitor *mon, const char *jobname, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 21f4d613b7..af9a77ed3b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -7873,28 +7873,6 @@ qemuMonitorJSONSetBlockThreshold(qemuMonitor *mon, } -int -qemuMonitorJSONSetWatchdogAction(qemuMonitor *mon, - const char *action) -{ - g_autoptr(virJSONValue) cmd =3D NULL; - g_autoptr(virJSONValue) reply =3D NULL; - - if (!(cmd =3D qemuMonitorJSONMakeCommand("watchdog-set-action", - "s:action", action, - NULL))) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - if (qemuMonitorJSONCheckError(cmd, reply) < 0) - return -1; - - return 0; -} - - int qemuMonitorJSONBlockdevCreate(qemuMonitor *mon, const char *jobname, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index f4c093d717..3b7b04a11d 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -633,11 +633,6 @@ qemuMonitorJSONSetBlockThreshold(qemuMonitor *mon, unsigned long long threshold) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int -qemuMonitorJSONSetWatchdogAction(qemuMonitor *mon, - const char *action) - ATTRIBUTE_NONNULL(1); - int qemuMonitorJSONBlockdevCreate(qemuMonitor *mon, const char *jobname, --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735246; cv=none; d=zohomail.com; s=zohoarc; b=kddVF4zzjDe8o3XTqPjoCeHAtYo/PmBj0to2JvraTEHzEAm34SENA+SLcuLVOT8lwiDwtwm0qqCKLl2MHPqwkKcNANnt3V4/r7cOQxC+NdFkl/nfEdi+jBU/RpMkzRYjS/IK659R3gjhsX6TzgbCPm2XZamMfxpgXI0Mha06LdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735246; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=5HBntN2etP/qt0Xg9nM+MKOl8Lpuk1WtTq5u791fSj8=; b=ilA5H+yWU6rWhzj1EaKvxjjT7OFQsCZKRr9niSh37gSuxbiwlRGA2EY1ohnu0XzuMgOaoQ34CfMjGbvDryuKjBmwXBN4gi5wTL3zwE7gvi35k6AOaf/yEKalGGcRT2lALS2yMft/nR6hbQgoGoCXT1z5JygmdKYicVPmE26pIoM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735246978870.3594279681024; Wed, 22 Jul 2026 08:47:26 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C1C1D41C14; Wed, 22 Jul 2026 11:47:25 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id E933043DE0; Wed, 22 Jul 2026 11:38:56 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2020841920; Wed, 22 Jul 2026 11:38:30 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CCC9F41920 for ; Wed, 22 Jul 2026 11:38:28 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-241-wBoHdymEMJqYVXw2f9OCvQ-1; Wed, 22 Jul 2026 11:38:26 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DC84C1955DD5 for ; Wed, 22 Jul 2026 15:38:25 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 390E3D71 for ; Wed, 22 Jul 2026 15:38:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5HBntN2etP/qt0Xg9nM+MKOl8Lpuk1WtTq5u791fSj8=; b=FBksyM1eSuiw1VPfwPFe8CLHm/DA7Mpxodtip/dVefFazlWR0QWN9ByylIY1PWe1Qtz006 KHKmaMg/xXM9t0MlvwrhxnLqLKN35ZRviOoBafT5S60XJcaLZFm/XWTxbKQPR6SlsbjAyU Jc+i5hjs+r3pg1kH0yKLPIsQI8jVNng= X-MC-Unique: wBoHdymEMJqYVXw2f9OCvQ-1 X-Mimecast-MFC-AGG-ID: wBoHdymEMJqYVXw2f9OCvQ_1784734706 To: devel@lists.libvirt.org Subject: [PATCH 04/13] qemu: Remove 'allowReboot' field Date: Wed, 22 Jul 2026 17:38:09 +0200 Message-ID: <245ddece52123ba38b246d79c694caab0004ad4a.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: mrd3a7ErUSfQ_6n76RjJwpy_X_7BYwfGZikozHwfSo4_1784734706 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CDFTSR27VM57KBEMFHCAULYAB5YQJTWL X-Message-ID-Hash: CDFTSR27VM57KBEMFHCAULYAB5YQJTWL X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735248140158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The value is no longer used. Remove it including the status XML handling. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain.c | 33 ------------------- src/qemu/qemu_domain.h | 17 ---------- .../qemustatusxml2xmldata/backup-pull-in.xml | 1 - .../blockjob-blockdev-in.xml | 1 - .../blockjob-mirror-in.xml | 1 - .../memory-backing-dir-in.xml | 1 - .../migration-in-params-in.xml | 1 - .../migration-out-nbd-bitmaps-in.xml | 1 - .../migration-out-nbd-out.xml | 1 - .../migration-out-nbd-tls-out.xml | 1 - .../migration-out-params-in.xml | 1 - tests/qemustatusxml2xmldata/modern-in.xml | 1 - .../qcow2-data-file-in.xml | 1 - .../throttlefilter-out.xml | 1 - tests/qemustatusxml2xmldata/upgrade-out.xml | 1 - .../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 - 16 files changed, 64 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e1b805d906..a4e5f92840 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1946,8 +1946,6 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *p= riv) priv->rememberOwner =3D false; - priv->allowReboot =3D VIR_TRISTATE_BOOL_ABSENT; - g_clear_pointer(&priv->migrationCaps, virBitmapFree); virHashRemoveAll(priv->blockjobs); @@ -2621,17 +2619,6 @@ qemuDomainObjPrivateXMLFormatBackups(virBuffer *buf, } -void -qemuDomainObjPrivateXMLFormatAllowReboot(virBuffer *buf, - virTristateBool allowReboot) -{ - if (allowReboot) { - virBufferAsprintf(buf, "\n", - virTristateBoolTypeToString(allowReboot)); - } -} - - static void qemuDomainObjPrivateXMLFormatPR(virBuffer *buf, qemuDomainObjPrivate *priv) @@ -2812,8 +2799,6 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf, if (priv->rememberOwner) virBufferAddLit(buf, "\n"); - qemuDomainObjPrivateXMLFormatAllowReboot(buf, priv->allowReboot); - qemuDomainObjPrivateXMLFormatPR(buf, priv); virBufferAsprintf(buf, "\n", priv->nodenamei= ndex); @@ -3302,21 +3287,6 @@ qemuDomainObjPrivateXMLParseBackups(qemuDomainObjPri= vate *priv, } -int -qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt, - virTristateBool *allowReboot) -{ - xmlNodePtr node =3D virXPathNode("./allowReboot", ctxt); - - /* Allow value=3D'default' as the input here, because old versions - * of libvirt produced that output and we need to be able to read - * it back to correctly handle running guests on daemon upgrade */ - return virXMLPropTristateBoolAllowDefault(node, "value", - VIR_XML_PROP_NONE, - allowReboot); -} - - static void qemuDomainObjPrivateXMLParsePR(xmlXPathContextPtr ctxt, bool *prDaemonRunning) @@ -3548,9 +3518,6 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, priv->chardevStdioLogd =3D virXPathBoolean("boolean(./chardevStdioLogd= )", ctxt) =3D=3D 1; - if (qemuDomainObjPrivateXMLParseAllowReboot(ctxt, &priv->allowReboot) = < 0) - return -1; - qemuDomainObjPrivateXMLParsePR(ctxt, &priv->prDaemonRunning); if (qemuDomainObjPrivateXMLParseBlockjobs(vm, priv, ctxt) < 0) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 50ab492023..23e99dc68c 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -134,15 +134,6 @@ struct _qemuDomainObjPrivate { bool fakeReboot; bool fakeReset; bool pausedShutdown; - /* allowReboot: - * - * Unused with new QEMU versions which have QEMU_CAPS_SET_ACTION. - * - * Otherwise if it's set to VIR_TRISTATE_BOOL_YES, QEMU was started wi= th - * -no-shutdown, and if set to VIR_TRISTATE_BOOL_NO qemu was started w= ith - * -no-reboot instead. - */ - virTristateBool allowReboot; unsigned long migMaxBandwidth; char *origname; @@ -1010,14 +1001,6 @@ qemuDomainFixupCPUs(virDomainObj *vm, char * qemuDomainGetMachineName(virDomainObj *vm); -void -qemuDomainObjPrivateXMLFormatAllowReboot(virBuffer *buf, - virTristateBool allowReboot); - -int -qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt, - virTristateBool *allowReboot); - void qemuDomainPrepareDiskSourceData(virDomainDiskDef *disk, virStorageSource *src); diff --git a/tests/qemustatusxml2xmldata/backup-pull-in.xml b/tests/qemusta= tusxml2xmldata/backup-pull-in.xml index 2cedcc3cf2..fcaff2e38a 100644 --- a/tests/qemustatusxml2xmldata/backup-pull-in.xml +++ b/tests/qemustatusxml2xmldata/backup-pull-in.xml @@ -233,7 +233,6 @@ - diff --git a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml b/tests/q= emustatusxml2xmldata/blockjob-blockdev-in.xml index 1c45fad370..58afae4168 100644 --- a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml +++ b/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml @@ -232,7 +232,6 @@ - diff --git a/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml b/tests/qem= ustatusxml2xmldata/blockjob-mirror-in.xml index df11e83ced..be85202c02 100644 --- a/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml +++ b/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemustatusxml2xmldata/memory-backing-dir-in.xml b/tests/= qemustatusxml2xmldata/memory-backing-dir-in.xml index eea671a41c..a1a1845495 100644 --- a/tests/qemustatusxml2xmldata/memory-backing-dir-in.xml +++ b/tests/qemustatusxml2xmldata/memory-backing-dir-in.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemustatusxml2xmldata/migration-in-params-in.xml b/tests= /qemustatusxml2xmldata/migration-in-params-in.xml index 861d8eeadb..986e5455aa 100644 --- a/tests/qemustatusxml2xmldata/migration-in-params-in.xml +++ b/tests/qemustatusxml2xmldata/migration-in-params-in.xml @@ -256,7 +256,6 @@ - diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml b= /tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml index 5d76545513..4f1fb07c1b 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml @@ -342,7 +342,6 @@ - diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml b/tests/= qemustatusxml2xmldata/migration-out-nbd-out.xml index 581cf28286..a69d1c4590 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml @@ -259,7 +259,6 @@ - diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml b/te= sts/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml index dacaa3e42f..86a7fbc187 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml @@ -288,7 +288,6 @@ - diff --git a/tests/qemustatusxml2xmldata/migration-out-params-in.xml b/test= s/qemustatusxml2xmldata/migration-out-params-in.xml index b914236b62..f4e921ab38 100644 --- a/tests/qemustatusxml2xmldata/migration-out-params-in.xml +++ b/tests/qemustatusxml2xmldata/migration-out-params-in.xml @@ -270,7 +270,6 @@ - diff --git a/tests/qemustatusxml2xmldata/modern-in.xml b/tests/qemustatusxm= l2xmldata/modern-in.xml index 050669f554..422a04f3ca 100644 --- a/tests/qemustatusxml2xmldata/modern-in.xml +++ b/tests/qemustatusxml2xmldata/modern-in.xml @@ -260,7 +260,6 @@ - diff --git a/tests/qemustatusxml2xmldata/qcow2-data-file-in.xml b/tests/qem= ustatusxml2xmldata/qcow2-data-file-in.xml index 2675214417..951b4abfbe 100644 --- a/tests/qemustatusxml2xmldata/qcow2-data-file-in.xml +++ b/tests/qemustatusxml2xmldata/qcow2-data-file-in.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemustatusxml2xmldata/throttlefilter-out.xml b/tests/qem= ustatusxml2xmldata/throttlefilter-out.xml index 8751a42cce..eee01c79b1 100644 --- a/tests/qemustatusxml2xmldata/throttlefilter-out.xml +++ b/tests/qemustatusxml2xmldata/throttlefilter-out.xml @@ -233,7 +233,6 @@ - diff --git a/tests/qemustatusxml2xmldata/upgrade-out.xml b/tests/qemustatus= xml2xmldata/upgrade-out.xml index c7bc7128df..fd1c174200 100644 --- a/tests/qemustatusxml2xmldata/upgrade-out.xml +++ b/tests/qemustatusxml2xmldata/upgrade-out.xml @@ -258,7 +258,6 @@ - diff --git a/tests/qemustatusxml2xmldata/vcpus-multi-in.xml b/tests/qemusta= tusxml2xmldata/vcpus-multi-in.xml index 6ee688ce03..1d5b34c2b6 100644 --- a/tests/qemustatusxml2xmldata/vcpus-multi-in.xml +++ b/tests/qemustatusxml2xmldata/vcpus-multi-in.xml @@ -308,7 +308,6 @@ - --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735578; cv=none; d=zohomail.com; s=zohoarc; b=FCMgqTaNYTSySZOGo4VpeQHeA++74vHfbZD1gIbdpq0td+VF+lCA45tJYpb2kbwC8OAMyY+R/Ayatqon1pnQBjoMg3ZKP/d1Rg8bEpD5cTiuKZzZCIPcScZDeZEDNQka3TBzcu/dKf6zP0gFTy8jzNMnqkuTTnl3qRkWI4FRB6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735578; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=1OGK8+vMyMlFOVBkkEZ6vCsZdH1OPGBXB1u7wf4LfCg=; b=NkocY2vZ3Zg/py8pMm9X2tXg7hcACyFfdL9uNriCOuhOkeSXw+f6x6ctM2trcCcBQ4QlLwXRBiIuF4vRymfYmG5aZyxFXczvCpis6jDoMqqUKn82YH/4be8LB9tGwajEW3zc7yTiOTjEUJ/YO/DGfJ12xY3g4RyQBsU268wsRjo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 17847355781731.0295137754956158; Wed, 22 Jul 2026 08:52:58 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 069D441BB9; Wed, 22 Jul 2026 11:52:56 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id BE29943EC6; Wed, 22 Jul 2026 11:39:20 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id B7FE241CAA; Wed, 22 Jul 2026 11:38:55 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B630F41B75 for ; Wed, 22 Jul 2026 11:38:30 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-657-oVE98vYIPDGbw1htUoKJ-g-1; Wed, 22 Jul 2026 11:38:28 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 320661945CAD for ; Wed, 22 Jul 2026 15:38:27 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4DC00D71 for ; Wed, 22 Jul 2026 15:38:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1OGK8+vMyMlFOVBkkEZ6vCsZdH1OPGBXB1u7wf4LfCg=; b=d72JGP5cFq/LQJ7Ewac1BMMWSUjaHfm6cZve0h7+mBbfZhDvEMeW8G8PAF311brk2ciJFE r4PntdDnVJBjs1GJwSZX7IYiAhAU3Eu2qeGJ5Zh6tZ2FGG9Bk3fpMQw/g75Utq5dla9w+r 7Dm3wvpDq2BtnN7olYtN8somtjedu6w= X-MC-Unique: oVE98vYIPDGbw1htUoKJ-g-1 X-Mimecast-MFC-AGG-ID: oVE98vYIPDGbw1htUoKJ-g_1784734707 To: devel@lists.libvirt.org Subject: [PATCH 05/13] qemu: capabilities: Retire QEMU_CAPS_SET_ACTION Date: Wed, 22 Jul 2026 17:38:10 +0200 Message-ID: <4638f22c4a5d39d0730daf714ef73a26bca5cc49.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fBKbTea9NXuSDZ-F-OhwgBTcoBJX_vd8O0kgd_Rm7wc_1784734707 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2Z346CJKCSBHTTABSFSS5R2DG3MWMH3F X-Message-ID-Hash: 2Z346CJKCSBHTTABSFSS5R2DG3MWMH3F X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735579011158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The capability is no longer used because all qemu versions we support do have the 'set-action' command. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml | 1 - tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml | 1 - tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_10.1.0_s390x.xml | 1 - tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml | 1 - tests/qemucapabilitiesdata/caps_10.1.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_10.2.0_x86_64+mshv.xml | 1 - tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_11.0.0_s390x.xml | 1 - tests/qemucapabilitiesdata/caps_11.0.0_x86_64+sgx.xml | 1 - tests/qemucapabilitiesdata/caps_11.0.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_11.1.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml | 1 - tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml | 1 - tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml | 1 - tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml | 1 - tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_9.0.0_sparc.xml | 1 - tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml | 1 - tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml | 1 - tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml | 1 - tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml | 1 - tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml | 1 - 39 files changed, 2 insertions(+), 40 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index ebea050453..61e44b398a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -643,7 +643,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "confidential-guest-support", /* QEMU_CAPS_MACHINE_CONFIDENT= AL_GUEST_SUPPORT */ "query-display-options", /* X_QEMU_CAPS_QUERY_DISPLAY_OPTION= S */ "s390-pv-guest", /* QEMU_CAPS_S390_PV_GUEST */ - "set-action", /* QEMU_CAPS_SET_ACTION */ + "set-action", /* X_QEMU_CAPS_SET_ACTION */ "virtio-blk.queue-size", /* QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE = */ /* 410 */ @@ -1289,7 +1289,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = =3D { { "query-cpu-definitions", QEMU_CAPS_QUERY_CPU_DEFINITIONS }, { "query-cpu-model-baseline", QEMU_CAPS_QUERY_CPU_MODEL_BASELINE }, { "query-cpu-model-comparison", QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON }, - { "set-action", QEMU_CAPS_SET_ACTION }, { "query-dirty-rate", QEMU_CAPS_QUERY_DIRTY_RATE }, { "sev-inject-launch-secret", QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET }, { "calc-dirty-rate", QEMU_CAPS_CALC_DIRTY_RATE }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index daec874a59..c846771d50 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -617,7 +617,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT, /* -machine confidential-= guest-support */ X_QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp comm= and present */ QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */ - QEMU_CAPS_SET_ACTION, /* 'set-action' QMP command */ + X_QEMU_CAPS_SET_ACTION, /* 'set-action' QMP command */ QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, /* virtio-blk-*.queue-size */ /* 410 */ diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml b/tests/qem= ucapabilitiesdata/caps_10.0.0_aarch64.xml index b6434e6019..119a3e171f 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml @@ -109,7 +109,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml b/tests/qemuc= apabilitiesdata/caps_10.0.0_ppc64.xml index 0b9613b921..70bf98c404 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml @@ -117,7 +117,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml b/tests/qemuc= apabilitiesdata/caps_10.0.0_s390x.xml index 96eadffcec..25d73b6e1d 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml @@ -81,7 +81,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml b/tes= ts/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml index 945f7364db..53fd51122c 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml @@ -145,7 +145,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_10.0.0_x86_64.xml index 5cd3828f52..ad3fe67638 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml @@ -145,7 +145,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.1.0_s390x.xml b/tests/qemuc= apabilitiesdata/caps_10.1.0_s390x.xml index 584a1b304c..0d46b3b20e 100644 --- a/tests/qemucapabilitiesdata/caps_10.1.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_10.1.0_s390x.xml @@ -82,7 +82,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml b/t= ests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml index 6dd00c360f..242215f7a8 100644 --- a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml +++ b/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml @@ -128,7 +128,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_10.1.0_x86_64.xml index e7a0818697..a2faddcced 100644 --- a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.1.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml b/tests/qem= ucapabilitiesdata/caps_10.2.0_aarch64.xml index df3e2a8275..00c0b8c86f 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml @@ -122,7 +122,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64+mshv.xml b/tests= /qemucapabilitiesdata/caps_10.2.0_x86_64+mshv.xml index 54018639ad..530c0366ea 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64+mshv.xml +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64+mshv.xml @@ -135,7 +135,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_10.2.0_x86_64.xml index d5cc279e13..b2cd261b99 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml b/tests/qem= ucapabilitiesdata/caps_11.0.0_aarch64.xml index 3fdc0d6621..c987072f6b 100644 --- a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml @@ -122,7 +122,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_s390x.xml b/tests/qemuc= apabilitiesdata/caps_11.0.0_s390x.xml index 99fccc9739..07ee859318 100644 --- a/tests/qemucapabilitiesdata/caps_11.0.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_11.0.0_s390x.xml @@ -82,7 +82,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_x86_64+sgx.xml b/tests/= qemucapabilitiesdata/caps_11.0.0_x86_64+sgx.xml index bac7951f73..108f4b0b86 100644 --- a/tests/qemucapabilitiesdata/caps_11.0.0_x86_64+sgx.xml +++ b/tests/qemucapabilitiesdata/caps_11.0.0_x86_64+sgx.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_11.0.0_x86_64.xml index 8724ce5b56..29fdaf20d8 100644 --- a/tests/qemucapabilitiesdata/caps_11.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_11.0.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml b/tests/qem= ucapabilitiesdata/caps_11.1.0_aarch64.xml index b45dd83889..9e14171d64 100644 --- a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml @@ -122,7 +122,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_11.1.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_11.1.0_x86_64.xml index 7a4396c82b..e32cedca2f 100644 --- a/tests/qemucapabilitiesdata/caps_11.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_11.1.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml b/tests/qemucapa= bilitiesdata/caps_7.2.0_ppc.xml index bc5953f43e..bf67b3d295 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml @@ -109,7 +109,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml b/tests/q= emucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml index 425c608863..f40d77baa5 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml @@ -146,7 +146,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.2.0_x86_64.xml index 93fe36f48c..8d44ed71e0 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.0.0_x86_64.xml index 592df7049b..fcbb68e415 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml b/tests/qemuca= pabilitiesdata/caps_8.1.0_s390x.xml index 2c540f7f30..65f73d1af8 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml @@ -77,7 +77,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.1.0_x86_64.xml index b29325a465..c730dd7174 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml b/tests/qemu= capabilitiesdata/caps_8.2.0_aarch64.xml index bb70bcaf1f..20eb5f5d50 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml @@ -115,7 +115,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml b/tests/qemuc= apabilitiesdata/caps_8.2.0_armv7l.xml index 9590bc464a..042458fba8 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml @@ -120,7 +120,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml b/tests/= qemucapabilitiesdata/caps_8.2.0_loongarch64.xml index 640438623a..95eb2dfa21 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml @@ -108,7 +108,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml b/tests/qemuca= pabilitiesdata/caps_8.2.0_s390x.xml index a254e16741..45ab66ec29 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml @@ -77,7 +77,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.2.0_x86_64.xml index 57aa43adab..b46505d24b 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_sparc.xml b/tests/qemuca= pabilitiesdata/caps_9.0.0_sparc.xml index c2710ecab1..44ddfb0f76 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_sparc.xml +++ b/tests/qemucapabilitiesdata/caps_9.0.0_sparc.xml @@ -37,7 +37,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_9.0.0_x86_64.xml index 3b4aaa202c..2f361bd1c8 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml @@ -147,7 +147,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml b/tests/qemu= capabilitiesdata/caps_9.1.0_riscv64.xml index b5ca67b445..f04b2fd302 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml @@ -113,7 +113,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml b/tests/qemuca= pabilitiesdata/caps_9.1.0_s390x.xml index 02c8e6f641..990fe255f6 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml @@ -81,7 +81,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_9.1.0_x86_64.xml index 65d279f5ea..07d7562c84 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml @@ -145,7 +145,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml b/tests/= qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml index 9c843f9e5c..166762e855 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml @@ -87,7 +87,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml b/tests/qemuca= pabilitiesdata/caps_9.2.0_s390x.xml index 135812b527..a8f830076e 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml @@ -81,7 +81,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml b/test= s/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml index af4b8bbc3e..f67222578d 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml +++ b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml @@ -146,7 +146,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_9.2.0_x86_64.xml index 933698d99f..efd3eeb9c7 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml @@ -145,7 +145,6 @@ - --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735336; cv=none; d=zohomail.com; s=zohoarc; b=DWKnbzg7bfAnVtFmlT6whkuU8aGpimn5hDPqvWZo7hl+FHqpV7fC0qhgotBIODWEh4v3vbnaAng0ZUl41dcvS55Lf7acw9kk3FiLFTEiXsD49YarELhHkAK0/ly2XMTpWvy8pO7m+3cTCRf2/EpGkJ1fbhFs690PT7qZwIpoSHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735336; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=nXqhsvgNHdp8ASsLx2ulIvOhWktGfkRTR1MEFrLm+Nc=; b=DGlGM5kZMnSr5UyA0DqAFhsIZ8OkEM+mIf49x8XbatRuHIQS84x4wHUnPFAXygytDeXRJuIN4RkJgmbAWsj64ZzCrV3dd/gMyU70kVA7qGqX2KRVVlre1COYkAUun3cSqchMHMHyDjozO/9qfQLRkmj3GiCj6N4XCG0vwbpisns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735336439539.8339275794573; Wed, 22 Jul 2026 08:48:56 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6781541BC0; Wed, 22 Jul 2026 11:48:55 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id BDC8743DF3; Wed, 22 Jul 2026 11:39:08 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 8E3DD41C0A; Wed, 22 Jul 2026 11:38:52 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 529EF41949 for ; Wed, 22 Jul 2026 11:38:31 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-471-713tHAAeMDyJ06XKsb6FDA-1; Wed, 22 Jul 2026 11:38:29 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4DF941955DC2 for ; Wed, 22 Jul 2026 15:38:28 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9A29042F for ; Wed, 22 Jul 2026 15:38:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nXqhsvgNHdp8ASsLx2ulIvOhWktGfkRTR1MEFrLm+Nc=; b=PNJnDM5ctaeTKfXI0EfhLxbYhOGemy7/cUpqS22iDrkz4klCQ4iD8CzHrRUGnXGmURXmJf Y4DlvddNs7IJxx5UZ4KUxbW4kwEglb4Q5doCP8sFQ93XDdlZQa0BSe/sAkszVefB/M/TqS 9QPgKzWqEM1/hT5Xp9f2XEmYHZxKXfs= X-MC-Unique: 713tHAAeMDyJ06XKsb6FDA-1 X-Mimecast-MFC-AGG-ID: 713tHAAeMDyJ06XKsb6FDA_1784734708 To: devel@lists.libvirt.org Subject: [PATCH 06/13] qemuProcessSetupLifecycleActions: Prepare to handle other actions Date: Wed, 22 Jul 2026 17:38:11 +0200 Message-ID: <2c3f557717f2831d08a6f1ecf84c92d9158684e3.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Iop3DtSXZlUvzaKlyhr48IVU8Bidpz-LDEqfYeGrWIE_1784734708 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VZ62437DJITQQMY3WSULMFTZ3MFO75C7 X-Message-ID-Hash: VZ62437DJITQQMY3WSULMFTZ3MFO75C7 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735338361158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Rework the code so that it'll be possible to easily extend it to set other lifecycle actions in qemu. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index a1cdce6d17..397082ef04 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8176,21 +8176,27 @@ qemuProcessSetupLifecycleActions(virDomainObj *vm, virDomainAsyncJob asyncJob) { qemuDomainObjPrivate *priv =3D vm->privateData; + qemuMonitorActionShutdown shutdown =3D QEMU_MONITOR_ACTION_SHUTDOWN_KE= EP; + qemuMonitorActionReboot reboot =3D QEMU_MONITOR_ACTION_REBOOT_KEEP; + qemuMonitorActionWatchdog watchdog =3D QEMU_MONITOR_ACTION_WATCHDOG_KE= EP; + qemuMonitorActionPanic panic =3D QEMU_MONITOR_ACTION_PANIC_KEEP; int rc; /* for now we handle only onReboot->destroy here as an alternative to * '-no-reboot' on the commandline */ - if (vm->def->onReboot !=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY) + if (vm->def->onReboot =3D=3D VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY) + reboot =3D QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN; + + if (shutdown =3D=3D QEMU_MONITOR_ACTION_SHUTDOWN_KEEP && + reboot =3D=3D QEMU_MONITOR_ACTION_REBOOT_KEEP && + watchdog =3D=3D QEMU_MONITOR_ACTION_WATCHDOG_KEEP && + panic =3D=3D QEMU_MONITOR_ACTION_PANIC_KEEP) return 0; if (qemuDomainObjEnterMonitorAsync(vm, asyncJob) < 0) return -1; - rc =3D qemuMonitorSetAction(priv->mon, - QEMU_MONITOR_ACTION_SHUTDOWN_KEEP, - QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN, - QEMU_MONITOR_ACTION_WATCHDOG_KEEP, - QEMU_MONITOR_ACTION_PANIC_KEEP); + rc =3D qemuMonitorSetAction(priv->mon, shutdown, reboot, watchdog, pan= ic); qemuDomainObjExitMonitor(vm); if (rc < 0) --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735393; cv=none; d=zohomail.com; s=zohoarc; b=dWac4LgIYQL5RVz5VqTo/L4YTQGOY6MPQ4/bQigiz1Aj5Z0G3+KZgib/7n4f1XLDWV4SeD/9VrxuNVMaykeK7NiBONBYvb+87T5UmR/lLqlqfZ9O3iOlrBF4o8VK5vRqR6rDx+owpZBna14aDsYA6BvmBdAP2rOEGEUuva0z8xg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735393; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=sZhF+n28ALgfLRKHOQijyZtzsxV55i8QYkUGTrva2TY=; b=CLkGkywp6AgVrQoyiqeQ2DEQMAueqP8vwQ9UyKG0r8WxMtFe0n5CPGtSy0kokfy6MUIER7/xt3LbFEphBGvOoqg1q4CIEHymXSkvrCgf5Sw6+8LJBQex4UJkj8Ya8TobAOduDttD2zZBwh4a6knigUTMwK7SwqzyVlk4SuDP9rU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735393721258.8936630393922; Wed, 22 Jul 2026 08:49:53 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 922DE3F976; Wed, 22 Jul 2026 11:49:52 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 5C6CA41E1E; Wed, 22 Jul 2026 11:39:14 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C4AF441C5C; Wed, 22 Jul 2026 11:38:54 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4813741C30 for ; Wed, 22 Jul 2026 11:38:32 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-478-vUD484_UMcOW1Z0LdfK6Wg-1; Wed, 22 Jul 2026 11:38:30 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9D155195FDF3 for ; Wed, 22 Jul 2026 15:38:29 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DEA1C1586 for ; Wed, 22 Jul 2026 15:38:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sZhF+n28ALgfLRKHOQijyZtzsxV55i8QYkUGTrva2TY=; b=hZpf4ygvvC6XZbZKAXiB1Y5014FbxQIhyPw0BNl8Ya1b2v2qbVriPQmxqqsrA5D5bhHaKc vA2tijc+eVf3W10kgwcUfNiydzvAgfE3NlpaiB2oAo2axfst/bt0BxDWZovnf3fYb9cXGE DQTdIYQm6imxR+Nfnf2+8Oa/zfW7iL0= X-MC-Unique: vUD484_UMcOW1Z0LdfK6Wg-1 X-Mimecast-MFC-AGG-ID: vUD484_UMcOW1Z0LdfK6Wg_1784734709 To: devel@lists.libvirt.org Subject: [PATCH 07/13] qemuDomainModifyLifecycleActionLive: Prepare to handle other actions Date: Wed, 22 Jul 2026 17:38:12 +0200 Message-ID: <8d848d44eccd03de456d80c0ba1758735e4e2bbf.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: raXMw875xM8SGtlmQTpDd_hg9AxCCgfZpLTX-aHd_Wg_1784734709 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ECBBXMQU6MTC6Q72SQEQYISCU5KIIKS2 X-Message-ID-Hash: ECBBXMQU6MTC6Q72SQEQYISCU5KIIKS2 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735394746158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Rework the code so that it'll be possible to easily extend it to set other lifecycle actions in qemu. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 55 ++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 71308770f6..c64e5bb4f5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19544,42 +19544,51 @@ qemuDomainModifyLifecycleActionLive(virDomainObj = *vm, virDomainLifecycle type, virDomainLifecycleAction action) { - qemuMonitorActionReboot monReboot =3D QEMU_MONITOR_ACTION_REBOOT_KEEP; + qemuMonitorActionShutdown shutdown =3D QEMU_MONITOR_ACTION_SHUTDOWN_KE= EP; + qemuMonitorActionReboot reboot =3D QEMU_MONITOR_ACTION_REBOOT_KEEP; + qemuMonitorActionWatchdog watchdog =3D QEMU_MONITOR_ACTION_WATCHDOG_KE= EP; + qemuMonitorActionPanic panic =3D QEMU_MONITOR_ACTION_PANIC_KEEP; qemuDomainObjPrivate *priv =3D vm->privateData; int rc; - /* For now we only update 'reboot' action here as we want to keep the - * shutdown action as is (we're emulating the outcome anyways)) */ - if (type !=3D VIR_DOMAIN_LIFECYCLE_REBOOT || - vm->def->onReboot =3D=3D action) - return 0; + switch (type) { + case VIR_DOMAIN_LIFECYCLE_REBOOT: + if (vm->def->onReboot =3D=3D action) + break; + switch (action) { + case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: + reboot =3D QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN; + break; - switch (action) { - case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: - monReboot =3D QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN; - break; + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: + reboot =3D QEMU_MONITOR_ACTION_REBOOT_RESET; + break; - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: - monReboot =3D QEMU_MONITOR_ACTION_REBOOT_RESET; + case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: + case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: + break; + } break; - case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: - case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: - return 0; + case VIR_DOMAIN_LIFECYCLE_POWEROFF: + case VIR_DOMAIN_LIFECYCLE_CRASH: + case VIR_DOMAIN_LIFECYCLE_LAST: + break; } + if (shutdown =3D=3D QEMU_MONITOR_ACTION_SHUTDOWN_KEEP && + reboot =3D=3D QEMU_MONITOR_ACTION_REBOOT_KEEP && + watchdog =3D=3D QEMU_MONITOR_ACTION_WATCHDOG_KEEP && + panic =3D=3D QEMU_MONITOR_ACTION_PANIC_KEEP) + return 0; qemuDomainObjEnterMonitor(vm); - rc =3D qemuMonitorSetAction(priv->mon, - QEMU_MONITOR_ACTION_SHUTDOWN_KEEP, - monReboot, - QEMU_MONITOR_ACTION_WATCHDOG_KEEP, - QEMU_MONITOR_ACTION_PANIC_KEEP); + rc =3D qemuMonitorSetAction(priv->mon, shutdown, reboot, watchdog, pan= ic); qemuDomainObjExitMonitor(vm); if (rc < 0) --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735649; cv=none; d=zohomail.com; s=zohoarc; b=MGVosyhOq7vzKLePZkl1SnhYirWzNYMG2UhaZxO8F+YnrmPC5hyDR6gPP2ui5rkoq/BD8pxMBafm25y4TXw2ZKQQd2mqN0NPeAA6yaq33EvFZ6Sm2pa1hniCUoa+bPZYKBsNq5F+mo158B5WBzdc4/rmhvkadZFTBC3jQnRdv6U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735649; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=bR5XbTkv0lNkDalhzO5XqKiLKR5ugWIteeBE2qssids=; b=mrFgeMbuOcRyZ++ftApNUGImpy6o8j3cSn9hN0eSgehSEjENIlkqst+VQa5u+wXuurMcR9/eOvzJXAyQcikS2Unv1sb9QZxXg9AkVlkXHRg2Ds80Nq13+y8qISAIGeLMlGMe7GM6fuawLp/vinyP4bHX3svg3gEWukxg0AWDROc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735649289210.97078661057435; Wed, 22 Jul 2026 08:54:09 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2E9B641BAA; Wed, 22 Jul 2026 11:54:08 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id A4E0543F12; Wed, 22 Jul 2026 11:39:25 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id AD6C643DEA; Wed, 22 Jul 2026 11:38:58 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 23A9441BEF for ; Wed, 22 Jul 2026 11:38:33 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-436-6o1MuMasPEm3ZFD3bFeKIQ-1; Wed, 22 Jul 2026 11:38:31 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B8A5818E6A44 for ; Wed, 22 Jul 2026 15:38:30 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 10F5242F for ; Wed, 22 Jul 2026 15:38:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bR5XbTkv0lNkDalhzO5XqKiLKR5ugWIteeBE2qssids=; b=YZrrTtJv7/ZXKhr10cy7PUfEnZoXku2k6/ZboianmK7lnXp0sE+hkEyOIZGq+weFNYfARu xrI7tiTtwHd+ePqrmWuffkSj6YQFVWowGe3FAc18ZubMUlyQUMMGwUqnuS1hNXbvr9CZ3S wlUKz4Ss1TMlnXoCT+eYI9tYZ2RKyxc= X-MC-Unique: 6o1MuMasPEm3ZFD3bFeKIQ-1 X-Mimecast-MFC-AGG-ID: 6o1MuMasPEm3ZFD3bFeKIQ_1784734710 To: devel@lists.libvirt.org Subject: [PATCH 08/13] processGuestPanicEvent: Don't pass panic action via parameter Date: Wed, 22 Jul 2026 17:38:13 +0200 Message-ID: <473230cfb12898b00ba2ff9120e40ec0ef2e6691.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7gUm06hDP100g7edzvkLkeCstSMfM7G6KGpUnKgD1EA_1784734710 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: R26CI2OBF2NVMYWE7DB2Y4IUGTJWEPEQ X-Message-ID-Hash: R26CI2OBF2NVMYWE7DB2Y4IUGTJWEPEQ X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735651318158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa 'processGuestPanicEvent' gets the full domain object; there's no point passing it via 'struct qemuProcessEvent'. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 6 ++---- src/qemu/qemu_process.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c64e5bb4f5..663e6c33cf 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3615,7 +3615,6 @@ qemuProcessGuestPanicEventInfo(virQEMUDriver *driver, static void processGuestPanicEvent(virQEMUDriver *driver, virDomainObj *vm, - int action, qemuMonitorEventPanicInfo *info) { qemuDomainObjPrivate *priv =3D vm->privateData; @@ -3650,7 +3649,7 @@ processGuestPanicEvent(virQEMUDriver *driver, VIR_WARN("Unable to release lease on %s", vm->def->name); VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState)); - switch (action) { + switch (vm->def->onCrash) { case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: if (doCoreDumpToAutoDumpPath(driver, vm, flags) < 0) goto endjob; @@ -4208,8 +4207,7 @@ qemuProcessEventHandler(void *data, processWatchdogEvent(driver, vm, processEvent->action); break; case QEMU_PROCESS_EVENT_GUESTPANIC: - processGuestPanicEvent(driver, vm, processEvent->action, - processEvent->data); + processGuestPanicEvent(driver, vm, processEvent->data); break; case QEMU_PROCESS_EVENT_DEVICE_DELETED: processDeviceDeletedEvent(driver, vm, processEvent->data); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 397082ef04..8389819ee4 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1359,8 +1359,7 @@ qemuProcessHandleGuestPanic(qemuMonitor *mon G_GNUC_U= NUSED, { virObjectLock(vm); - qemuProcessEventSubmit(vm, QEMU_PROCESS_EVENT_GUESTPANIC, - vm->def->onCrash, 0, info); + qemuProcessEventSubmit(vm, QEMU_PROCESS_EVENT_GUESTPANIC, 0, 0, info); virObjectUnlock(vm); } --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735745; cv=none; d=zohomail.com; s=zohoarc; b=gCHWUz6UkUMQQHczUYhrPN8syCdjLT5OSgXSP3le3a7n9s+cqP21zR3zBv7HMSZVCG9epfmgwMnL3xA451jkL+KGJkpYR+m8MpLBNUO6RmfQLRll9wflwVSlY40r84QVzbEbOVLnBmIJV+FIKHnymfkMp+EsyLj+NexW0s64X9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735745; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=thPJZ1TT7GNiggVHU2UDJ0/YBj/s0lbJj1FsZXvNgjc=; b=JmoutCH34JTMWJGgwJfqhQAofMCSvronvWAHElkS7FXFd+QJff7O7CyH1dnNOTW7tC4IW/vKTUeimN12hdGJpm/gn8pFb4uBl21vgifBLnDprzEK9L29Z3LEjjQx3jkc1Ae6Hcj4yekPHrd2q+U9TOHBD0ra7tX24NE43NtWsMM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735745677361.08140814550745; Wed, 22 Jul 2026 08:55:45 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 735ED3F979; Wed, 22 Jul 2026 11:55:44 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 5AA6E43F6A; Wed, 22 Jul 2026 11:39:31 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A52DB43EB2; Wed, 22 Jul 2026 11:39:18 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 0F7E541D53 for ; Wed, 22 Jul 2026 11:38:34 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-H_XVcqZyOl22W7qarJzWjQ-1; Wed, 22 Jul 2026 11:38:32 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CDACC182A108 for ; Wed, 22 Jul 2026 15:38:31 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2998942F for ; Wed, 22 Jul 2026 15:38:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=thPJZ1TT7GNiggVHU2UDJ0/YBj/s0lbJj1FsZXvNgjc=; b=RItJc9rQPR/jc150zIpCOPEI9X0GvUp49PC4/pW0H/bOayxUzE59REzc6cSm9iq6sf1x3c OnD5tiPYpCLu8iOEG8JgY154guj3jwNMOvRshYVFi+uez4kV+Vp0hyv6DEXXC2VW0USy0F uaj9AkrJ4mp9sYkgcqgHo8JDjRm0Mdw= X-MC-Unique: H_XVcqZyOl22W7qarJzWjQ-1 X-Mimecast-MFC-AGG-ID: H_XVcqZyOl22W7qarJzWjQ_1784734711 To: devel@lists.libvirt.org Subject: [PATCH 09/13] conf: Use proper enum types for 'onReboot', 'onPoweroff', 'onCrash', and 'onLockFailure' Date: Wed, 22 Jul 2026 17:38:14 +0200 Message-ID: <9492b8b67fe4ce3b2eaee79a4022c5c7060115aa.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: gxqqdaX6M5rJST10cIHbejwPNeT6oHg14Oei9Pjqtzc_1784734711 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: UPWQ26GZNZEDQ6IR3GKVL6GVSLHTTCCF X-Message-ID-Hash: UPWQ26GZNZEDQ6IR3GKVL6GVSLHTTCCF X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735748019158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa This ensures that 'switch' statements work correctly. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 10 ++++++---- src/conf/domain_conf.h | 9 ++++----- src/libxl/xen_common.c | 10 +++++++--- src/qemu/qemu_driver.c | 2 ++ 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 17c4a57cd8..ab5138acbc 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14168,21 +14168,23 @@ static int virDomainEventActionParseXML(xmlXPathContextPtr ctxt, const char *name, const char *xpath, - int *val, - int defaultVal, + unsigned int *val, + unsigned int defaultVal, virEventActionFromStringFunc convFunc) { g_autofree char *tmp =3D virXPathString(xpath, ctxt); + int tmpval; if (tmp =3D=3D NULL) { *val =3D defaultVal; } else { - *val =3D convFunc(tmp); - if (*val < 0) { + tmpval =3D convFunc(tmp); + if (tmpval < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown %1$s action: %2$s"), name, tmp); return -1; } + *val =3D tmpval; } return 0; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 0c6c79c413..91f57de0f1 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3250,12 +3250,11 @@ struct _virDomainDef { virDomainResourceDef *resource; virDomainIdMapDef idmap; - /* These 3 are based on virDomainLifecycleAction enum flags */ - int onReboot; - int onPoweroff; - int onCrash; + virDomainLifecycleAction onReboot; + virDomainLifecycleAction onPoweroff; + virDomainLifecycleAction onCrash; - int onLockFailure; /* enum virDomainLockFailureAction */ + virDomainLockFailureAction onLockFailure; virDomainPowerManagement pm; diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index e6a372e078..4b2e47006a 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -336,33 +336,37 @@ xenParseEventsActions(virConf *conf, virDomainDef *de= f) g_autofree char *on_poweroff =3D NULL; g_autofree char *on_reboot =3D NULL; g_autofree char *on_crash =3D NULL; + int tmp; if (xenConfigGetString(conf, "on_poweroff", &on_poweroff, "destroy") <= 0) return -1; - if ((def->onPoweroff =3D virDomainLifecycleActionTypeFromString(on_pow= eroff)) < 0) { + if ((tmp =3D virDomainLifecycleActionTypeFromString(on_poweroff)) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, _("unexpected value %1$s for on_poweroff"), on_powe= roff); return -1; } + def->onPoweroff =3D tmp; if (xenConfigGetString(conf, "on_reboot", &on_reboot, "restart") < 0) return -1; - if ((def->onReboot =3D virDomainLifecycleActionTypeFromString(on_reboo= t)) < 0) { + if ((tmp =3D virDomainLifecycleActionTypeFromString(on_reboot)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("unexpected value %1$s for on_reboot"), on_reboot= ); return -1; } + def->onReboot =3D tmp; if (xenConfigGetString(conf, "on_crash", &on_crash, "restart") < 0) return -1; - if ((def->onCrash =3D virDomainLifecycleActionTypeFromString(on_crash)= ) < 0) { + if ((tmp =3D virDomainLifecycleActionTypeFromString(on_crash)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("unexpected value %1$s for on_crash"), on_crash); return -1; } + def->onCrash =3D tmp; return 0; } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 663e6c33cf..2fbd7bc3ee 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3680,6 +3680,8 @@ processGuestPanicEvent(virQEMUDriver *driver, /* the VM is kept around for debugging */ break; + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: + case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: default: break; } --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735805; cv=none; d=zohomail.com; s=zohoarc; b=TAye1DP4nWGvLvIKj9HiPZhTwotucdlLm66TTtRu6n99Rr3Sliit4RaM+/0D9WIh8wwR1wIDKlwk6DyzS5aWuWEOphsaPRuwhA+bWv4n04Razj2xosafixrkiC2rTB4xPkNn3pzDO0BYu6lW1FKcNk+WieJBhj85Od/InE7tMsc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735805; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=W0SHyG5Brgqk/qFzEZtEpH7mMt3qZtOEtsp7myB1x6U=; b=l/AUTgykklODqyU93IlvqLLvsJ4MJmuhA5X9U6Chi+SDo4dDfTfh+OT3KkVisKTaLz+OrYVuBMze7/Q7R8PvOX82ShMcmAPzdc604VTFdjaFIoQSxk3stAz47pZZCQnI/wnBLytkLHX0rArFEiIfc6yjqNKYJ35qgG5vyeswSYk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735805759441.0483452435885; Wed, 22 Jul 2026 08:56:45 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A972541BB8; Wed, 22 Jul 2026 11:56:44 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id F2F7443FB1; Wed, 22 Jul 2026 11:39:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 914A043F04; Wed, 22 Jul 2026 11:39:24 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B7D4E41D84 for ; Wed, 22 Jul 2026 11:38:35 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-39-YT2Y5EJ9NXSxnff6YYggTg-1; Wed, 22 Jul 2026 11:38:33 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E26BE195604B for ; Wed, 22 Jul 2026 15:38:32 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3E9E142F for ; Wed, 22 Jul 2026 15:38:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W0SHyG5Brgqk/qFzEZtEpH7mMt3qZtOEtsp7myB1x6U=; b=PTKV6bBM/NKceOARKWSQL3xALDWo9Os8f8MQDPWJ++hagKc6jknpejo9wg6ZzQpmQST5Oy X2twmcXT+8VogryAbdyRzp1r7X4XQzXCbaR+28/mvZNK9ESDdQp9YO/JI+GSmnFWBnfSv/ glPm/eQx0O9cNKAi+q7AR5YDHlw4jyI= X-MC-Unique: YT2Y5EJ9NXSxnff6YYggTg-1 X-Mimecast-MFC-AGG-ID: YT2Y5EJ9NXSxnff6YYggTg_1784734713 To: devel@lists.libvirt.org Subject: [PATCH 10/13] qemuMonitorGuestPanicEventInfoFormatMsg: Directly return message Date: Wed, 22 Jul 2026 17:38:15 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 6Q2_tZm9SKChZaU6dSB8BoAy6-TWP8KZmH0Atn1kN24_1784734713 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WSHMYSFUQ3GOYHUZ4MVCA2VEDTYDOQT7 X-Message-ID-Hash: WSHMYSFUQ3GOYHUZ4MVCA2VEDTYDOQT7 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735806279158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Remove the 'ret' variable and format the panic string on a single line. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 59b3671de9..21df06ebd8 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3881,43 +3881,37 @@ qemuMonitorSetBlockThreshold(qemuMonitor *mon, char * qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfo *info) { - char *ret =3D NULL; - switch (info->type) { case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_HYPERV: - ret =3D g_strdup_printf("hyper-v: arg1=3D'0x%llx', arg2=3D'0x%llx'= , " - "arg3=3D'0x%llx', arg4=3D'0x%llx', arg5=3D'0= x%llx'", - info->data.hyperv.arg1, info->data.hyperv.ar= g2, - info->data.hyperv.arg3, info->data.hyperv.ar= g4, - info->data.hyperv.arg5); + return g_strdup_printf("hyper-v: arg1=3D'0x%llx', arg2=3D'0x%llx',= arg3=3D'0x%llx', arg4=3D'0x%llx', arg5=3D'0x%llx'", + info->data.hyperv.arg1, info->data.hyperv.a= rg2, + info->data.hyperv.arg3, info->data.hyperv.a= rg4, + info->data.hyperv.arg5); break; case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_S390: - ret =3D g_strdup_printf("s390: core=3D'%d' psw-mask=3D'0x%016llx' " - "psw-addr=3D'0x%016llx' reason=3D'%s'", - info->data.s390.core, - info->data.s390.psw_mask, - info->data.s390.psw_addr, - info->data.s390.reason); + return g_strdup_printf("s390: core=3D'%d' psw-mask=3D'0x%016llx' p= sw-addr=3D'0x%016llx' reason=3D'%s'", + info->data.s390.core, + info->data.s390.psw_mask, + info->data.s390.psw_addr, + info->data.s390.reason); break; case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_TDX: if (info->data.tdx.has_gpa) - ret =3D g_strdup_printf("tdx: error_code=3D'0x%x' message=3D'%= s' " - "additional error information can be fou= nd " - "at gpa page: '0x%016llx'", - info->data.tdx.error_code, - info->data.tdx.message, - info->data.tdx.gpa); + return g_strdup_printf("tdx: error_code=3D'0x%x' message=3D'%s= ' additional error information can be found at gpa page: '0x%016llx'", + info->data.tdx.error_code, + info->data.tdx.message, + info->data.tdx.gpa); else - ret =3D g_strdup_printf("tdx: error_code=3D'0x%x' message=3D'%= s'", - info->data.tdx.error_code, - info->data.tdx.message); + return g_strdup_printf("tdx: error_code=3D'0x%x' message=3D'%s= '", + info->data.tdx.error_code, + info->data.tdx.message); break; case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_NONE: case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_LAST: break; } - return ret; + return NULL; } --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735947; cv=none; d=zohomail.com; s=zohoarc; b=AYTWNv8/0KPfGobZuD3Qtx5wYipOtmRU0E4r+ghpK4MlKgjqC7F9T1lpHLatVLyTqxPCCKNCyQC66t4ss8Ac7CioNeIAqcXJvZ//HZoNzjoWEIPJEM4jh8MvBXmadeTyHQ4JaO6VUvZ0XOKUfWUuET1oLJiSroU9cCWsnOoYsW8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735947; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=lrO9Nv2TscQB7vPYyrUFRXyEixubVxnki4HFkExwl0I=; b=elI2xiB6mUvB31Pu8/XMyHPfQDQZfFyJgEXl7xm3GeieZyulgUfoq2bub68fsUFTkjde24sZujt695pdAbtFtIfvRANINMGqPeV/G8lZ3n35bP1vySXqHWece6Wy7l7k4gfrCGQ1yg9b+IGJfn8dToZ2STzaxV5p8Zhtmfse+4Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735947056200.41458942765087; Wed, 22 Jul 2026 08:59:07 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C25AC418E7; Wed, 22 Jul 2026 11:59:05 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 1878D4400F; Wed, 22 Jul 2026 11:40:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C9A2941B0B; Wed, 22 Jul 2026 11:40:20 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C3A7641B0B for ; Wed, 22 Jul 2026 11:38:37 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-520-NQms1cyEOFaQnU1Z2orrIA-1; Wed, 22 Jul 2026 11:38:34 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0AE581805F04 for ; Wed, 22 Jul 2026 15:38:34 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 56D27D70 for ; Wed, 22 Jul 2026 15:38:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lrO9Nv2TscQB7vPYyrUFRXyEixubVxnki4HFkExwl0I=; b=NeWnaCYHxDuVsDnX0JuFwQ1XXufltybCRAh/WeZ3YmvrIoL+OC1JVBrDJf2GHS4GzoCafy qvsE9cxLc1U+LNEWYyj36EhAYgrRUqtXMuya5HThrAaHucBmZh7YQuXauX9g/bykuWpApk jswM/H2F0naY7DLJq/3HG9Qda0q6dIo= X-MC-Unique: NQms1cyEOFaQnU1Z2orrIA-1 X-Mimecast-MFC-AGG-ID: NQms1cyEOFaQnU1Z2orrIA_1784734714 To: devel@lists.libvirt.org Subject: [PATCH 11/13] qemuProcessGuestPanicEventInfo: Fold into only caller Date: Wed, 22 Jul 2026 17:38:16 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: sANaIUVtlLAW9W8gzOS5zTpz4NRCQZWZEjrgsXFSsS4_1784734714 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6AZTJESZQLC35CKBEKX3IVC4Z3IF63EF X-Message-ID-Hash: 6AZTJESZQLC35CKBEKX3IVC4Z3IF63EF X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735949135158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Move the code directly to the only place that calls this function. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2fbd7bc3ee..909d51c8cb 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3599,19 +3599,6 @@ doCoreDumpToAutoDumpPath(virQEMUDriver *driver, } -static void -qemuProcessGuestPanicEventInfo(virQEMUDriver *driver, - virDomainObj *vm, - qemuMonitorEventPanicInfo *info) -{ - g_autofree char *msg =3D qemuMonitorGuestPanicEventInfoFormatMsg(info); - g_autofree char *timestamp =3D virTimeStringNow(); - - if (msg && timestamp) - qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", timestamp= , msg); -} - - static void processGuestPanicEvent(virQEMUDriver *driver, virDomainObj *vm, @@ -3632,8 +3619,13 @@ processGuestPanicEvent(virQEMUDriver *driver, goto endjob; } - if (info) - qemuProcessGuestPanicEventInfo(driver, vm, info); + if (info) { + g_autofree char *msg =3D qemuMonitorGuestPanicEventInfoFormatMsg(i= nfo); + g_autofree char *timestamp =3D virTimeStringNow(); + + if (msg && timestamp) + qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", times= tamp, msg); + } virDomainObjSetState(vm, VIR_DOMAIN_CRASHED, VIR_DOMAIN_CRASHED_PANICK= ED); --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784735870; cv=none; d=zohomail.com; s=zohoarc; b=kfq/bZJ7X4u2PCfr6exraEwSoOWWCTMHkC6g3cP8uamo24qN9sWBUUizxlu2VUbovFJxenlVvHkdyQKXxsnrcCkJgmX50mKz19mgacyrLuorXrTrodXik8dBPBjjIlWN5dzlf477qInZL2ymuWGT1sP6bNr37mJFz7ApA2PuUlk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784735870; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=sWs61hISavozhRr9JbpW2eB6K/Iy2C/o+tcb3XJBFwQ=; b=ZQ9fIUyWnmXwOI5kD9ewdjp0J28qSOV1O17A36iAFGfzSjAdgqGa9QphS/IF2hySetKFaiOy8CurTNdIm6wzVtCanOIKU8ypZvWHJR6yYCeihx9nmWTc6+wF4QXupNO6CTvgeXfICgoAWEcnr9GL78BIpebsVtu96/7U+YQKzQQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784735870104734.9408709510022; Wed, 22 Jul 2026 08:57:50 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DEDED41BD8; Wed, 22 Jul 2026 11:57:48 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 25A8C43EB8; Wed, 22 Jul 2026 11:40:26 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 931FC41BBE; Wed, 22 Jul 2026 11:40:16 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 7C7A841DC0 for ; Wed, 22 Jul 2026 11:38:37 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-280-eBPAfQ0FNM-oU8H2VszBrg-1; Wed, 22 Jul 2026 11:38:35 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 203581945CB7 for ; Wed, 22 Jul 2026 15:38:35 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7031FD70 for ; Wed, 22 Jul 2026 15:38:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sWs61hISavozhRr9JbpW2eB6K/Iy2C/o+tcb3XJBFwQ=; b=L8w5hcjRwpj2fq4uSGOeWQK617W/I13cG+fDc7Nd85JLC0Wl3pPEW8Dpi4C+Y2Pd4qKMqW q6ghy5wWYcYZlsLx2qfwsiZC6p69EFtS1yTxRnVClKdl8BDPVKFpak4ztb9zEDXrezggjh G5n89tfabM68MximW4OZE57ROdNqcxE= X-MC-Unique: eBPAfQ0FNM-oU8H2VszBrg-1 X-Mimecast-MFC-AGG-ID: eBPAfQ0FNM-oU8H2VszBrg_1784734715 To: devel@lists.libvirt.org Subject: [PATCH 12/13] qemu: processGuestPanicEvent: Split individual steps under separate conditions Date: Wed, 22 Jul 2026 17:38:17 +0200 Message-ID: <9c2cb0f81dc2f5e71eaa2151e2771003de40912a.1784734635.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: d-kt_F7b2cD5R11vMbqQ2r1KoVmQp68TvgQiBiW2aDE_1784734715 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MUYN6FGFWVAK4TBFUFSRIUHJLXJT6HUN X-Message-ID-Hash: MUYN6FGFWVAK4TBFUFSRIUHJLXJT6HUN X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784735870612158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Separate the individual steps (setting of VM state, dumping, unlocking, final state transition) under individual switch statements for future extension. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 62 +++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 909d51c8cb..b83225cf38 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3627,26 +3627,64 @@ processGuestPanicEvent(virQEMUDriver *driver, qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", times= tamp, msg); } - virDomainObjSetState(vm, VIR_DOMAIN_CRASHED, VIR_DOMAIN_CRASHED_PANICK= ED); - event =3D virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_CRASHED, VIR_DOMAIN_EVENT_CRASHED_PAN= ICKED); - virObjectEventStateQueue(driver->domainEventState, event); - qemuDomainSaveStatus(vm); + /* Update VM state */ + switch (vm->def->onCrash) { + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: + case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: + case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: + virDomainObjSetState(vm, VIR_DOMAIN_CRASHED, VIR_DOMAIN_CRASHED_PA= NICKED); + qemuDomainSaveStatus(vm); + break; - if (virDomainLockProcessPause(driver->lockManager, vm, &priv->lockStat= e) < 0) - VIR_WARN("Unable to release lease on %s", vm->def->name); - VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState)); + case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: + break; + } + /* Handle state of leases/locks */ switch (vm->def->onCrash) { case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: + case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: + case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: + if (virDomainLockProcessPause(driver->lockManager, vm, &priv->lock= State) < 0) + VIR_WARN("Unable to release lease on %s", vm->def->name); + VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState)); + break; + + case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: + break; + } + + /* create core dump */ + switch (vm->def->onCrash) { + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: if (doCoreDumpToAutoDumpPath(driver, vm, flags) < 0) goto endjob; - G_GNUC_FALLTHROUGH; + + break; + case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: + case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: + case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: + case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: + break; + } + + /* final state update */ + switch (vm->def->onCrash) { + case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: qemuProcessStop(vm, VIR_DOMAIN_SHUTOFF_CRASHED, VIR_ASYNC_JOB_DUMP= , 0); event =3D virDomainEventLifecycleNewFromObj(vm, @@ -3659,22 +3697,14 @@ processGuestPanicEvent(virQEMUDriver *driver, break; case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: - if (doCoreDumpToAutoDumpPath(driver, vm, flags) < 0) - goto endjob; - G_GNUC_FALLTHROUGH; - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: qemuDomainSetFakeReboot(vm, true); ignore_value(qemuProcessShutdownOrReboot(vm)); break; case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: - /* the VM is kept around for debugging */ - break; - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: - default: break; } --=20 2.55.0 From nobody Sat Jul 25 07:59:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1784736056; cv=none; d=zohomail.com; s=zohoarc; b=H7OLabHj4TogIn6TGeqRzpz52Qy04IgC073bCwK3bjnNe5jMSQg3RB1f0DXes1f4N4i9ZWV3IkBoYDoIEc4HUlquLKTPrLjRAZlk8JQkyeH1iR6o+nS8IujdV6a4+zCggVaKw5NfZBup3MmAGL3p5UrQOFvwOrHb0PjLdfBOXrQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784736056; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=A4cQGn76JkvBWvcZmCsBukqYyTkyfyJaIAWYyQHS5UQ=; b=Ju9TsvOR1bo7GTfZXbjm0G1bQKdTD0qXGvnHECYxKFTrx/xzUygkH12QiK7XFPY4QreibaYSBH9313kP+ZnfIZRp3V209kbc+O9ckOxlC2iBFoJybzHkFozyJiwOwFeG4s1e651cOVSyL2l0YAW7s1ccP4i2hIgHNNUyqjEI/7M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 17847360567721005.6271148099727; Wed, 22 Jul 2026 09:00:56 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 83E5D41B0B; Wed, 22 Jul 2026 12:00:55 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 0F32843FBB; Wed, 22 Jul 2026 11:41:04 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6777541BCC; Wed, 22 Jul 2026 11:40:56 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CD23A41DDD for ; Wed, 22 Jul 2026 11:38:38 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-380-ug0Du7VePAO1MndBrlLrEQ-1; Wed, 22 Jul 2026 11:38:37 -0400 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 33A431800772 for ; Wed, 22 Jul 2026 15:38:36 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.24.17]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 85A3E42F for ; Wed, 22 Jul 2026 15:38:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784734718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A4cQGn76JkvBWvcZmCsBukqYyTkyfyJaIAWYyQHS5UQ=; b=BqVhJhXsy2bFY/lDUwa9Dd55xLpIU9DQYoQJLRD3jQacr0hmdV61igA1MxS21+nwKtGF5q aFMHNvrnQCTy2h8MqEKV7DC72Qd0jOBsWH+H3libcllcIwZorGh/VEFGyXO3whAN+1RCCv ZqKtnOZcZLbZ7HzSzqEFlsvMsZb0rnU= X-MC-Unique: ug0Du7VePAO1MndBrlLrEQ-1 X-Mimecast-MFC-AGG-ID: ug0Du7VePAO1MndBrlLrEQ_1784734716 To: devel@lists.libvirt.org Subject: [PATCH 13/13] Add support for keeping VM running when panic notifier is used Date: Wed, 22 Jul 2026 17:38:18 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: YOVm3JmY1-kntsw-KB3VshThRDn-WmcR-mpaxQSVfkM_1784734716 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BGFBB2I737QZYBCUPTATBR2FDCCSGT4D X-Message-ID-Hash: BGFBB2I737QZYBCUPTATBR2FDCCSGT4D X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784736058290158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Some guest OSes (e.g. windows) can do an internal crash dump and reboot after a crash. They unfortunately notify the OS before doing the crash dump though so we need a new possibility for the action to keep the VM as is. This patch introduces 'preserve-running' mode for on_crash and wires it up into the qemu driver. Signed-off-by: Peter Krempa --- docs/formatdomain.rst | 3 ++ include/libvirt/libvirt-domain.h | 1 + src/conf/domain_conf.c | 2 ++ src/conf/schemas/domaincommon.rng | 2 ++ src/libxl/libxl_conf.c | 1 + src/libxl/libxl_domain.c | 3 ++ src/qemu/qemu_driver.c | 34 ++++++++++++++++++- src/qemu/qemu_process.c | 18 ++++++++++ .../async-teardown.x86_64-latest.xml | 2 +- tests/qemuxmlconfdata/async-teardown.xml | 2 +- tests/qemuxmlconftest.c | 1 + tools/virsh-domain.c | 3 +- 12 files changed, 68 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index a861f9f177..fa5b62200b 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -2044,6 +2044,9 @@ The ``on_crash`` event supports these additional acti= ons :since:`since 0.8.4`. ``coredump-restart`` The crashed domain's core will be dumped, and then the domain will be restarted with the same configuration +``preserve-running`` + The crashed domain will continue to run. This is useful if the guest OS= can + do an internal crash dump and reboot itself. :since:`Since 12.6.0` :since:`Since 3.9.0`, the lifecycle events can be configured via the `virDomainSetLifecycleAction `__ diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 5b67f8f897..f4dfe9fb1a 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -8228,6 +8228,7 @@ typedef enum { VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE =3D 3, /* (Since: 3.9.0) */ VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY =3D 4, /* (Since: 3.9.0) = */ VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART =3D 5, /* (Since: 3.9.0) = */ + VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING =3D 6, /* (Since: 12.6.0)= */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_LIFECYCLE_ACTION_LAST /* (Since: 3.9.0) */ diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ab5138acbc..45235d74bc 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -303,6 +303,7 @@ VIR_ENUM_IMPL(virDomainLifecycleAction, "preserve", "coredump-destroy", "coredump-restart", + "preserve-running", ); VIR_ENUM_IMPL(virDomainLockFailure, @@ -5534,6 +5535,7 @@ virDomainDefLifecycleActionAllowed(virDomainLifecycle= type, return true; case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: + case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING: break; } break; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 121e4e06a6..81ffbfc2fa 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -5035,6 +5035,7 @@ destroy: The domain is cleaned up restart: A new domain is started in place of the old one preserve: The domain will remain in memory until it is destroyed man= ually + preserve-running: Keep the domain as is, let the guest handle the cr= ash. rename-restart: a variant of the previous one but where the old doma= in is renamed before being saved to allow a restart coredump-destroy: The crashed domain's core will be dumped, and then= the @@ -5051,6 +5052,7 @@ rename-restart coredump-destroy coredump-restart + preserve-running