libvirt-11.10.0-18.el9
- qemu: Always assume support for 'QEMU_CAPS_SET_ACTION' (RHEL-242546) - qemu: Remove unused 'qemuProcessRebootAllowed' (RHEL-242546) - qemu: monitor: Remove support for 'watchdog-set-action' (RHEL-242546) - qemu: Remove 'allowReboot' field (RHEL-242546) - qemu: capabilities: Retire QEMU_CAPS_SET_ACTION (RHEL-242546) - qemuProcessSetupLifecycleActions: Prepare to handle other actions (RHEL-242546) - qemuDomainModifyLifecycleActionLive: Prepare to handle other actions (RHEL-242546) - processGuestPanicEvent: Don't pass panic action via parameter (RHEL-242546) - conf: Use proper enum types for 'onReboot', 'onPoweroff', 'onCrash', and 'onLockFailure' (RHEL-242546) - qemuMonitorGuestPanicEventInfoFormatMsg: Directly return message (RHEL-242546) - qemuProcessGuestPanicEventInfo: Fold into only caller (RHEL-242546) - qemu: processGuestPanicEvent: Split individual steps under separate conditions (RHEL-242546) - Add support for keeping VM running when panic notifier is used (RHEL-242546) - qemu: Fix proper ordering of 'virtlockd' shutdown (RHEL-180876) - Add guest device info to virDomainGetGuestInfo (RHEL-243300) - qemu_agent: Introduce guest-get-devices (RHEL-243300) - qemuagenttest: Introduce GetGuestDeviceInfo test case (RHEL-243300) - qemu: Implement device info for virDomainGetGuestInfo() API (RHEL-243300) - virsh: Add support for VIR_DOMAIN_GUEST_INFO_DEVICES (RHEL-243300) Resolves: RHEL-180876, RHEL-242546, RHEL-243300
This commit is contained in:
parent
f5c1075352
commit
0f2ee777b8
134
libvirt-Add-guest-device-info-to-virDomainGetGuestInfo.patch
Normal file
134
libvirt-Add-guest-device-info-to-virDomainGetGuestInfo.patch
Normal file
@ -0,0 +1,134 @@
|
||||
From df1527ef32effff10b7901be3542811ed13498a7 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <df1527ef32effff10b7901be3542811ed13498a7.1787144643.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 12 Aug 2026 15:11:12 +0200
|
||||
Subject: [PATCH] Add guest device info to virDomainGetGuestInfo
|
||||
|
||||
QEMU guest agent has 'guest-get-devices` command, which returns
|
||||
information on guest devices (driver name, version, release date,
|
||||
and so on). In this commit the public API part is introduced.
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 3033dae6989083fde1d06427ee2840242cfd8dca)
|
||||
Resolves: https://redhat.atlassian.net/browse/RHEL-243300
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
include/libvirt/libvirt-domain.h | 78 ++++++++++++++++++++++++++++++++
|
||||
src/libvirt-domain.c | 5 ++
|
||||
2 files changed, 83 insertions(+)
|
||||
|
||||
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
|
||||
index f469ed428d..b1c4b10f97 100644
|
||||
--- a/include/libvirt/libvirt-domain.h
|
||||
+++ b/include/libvirt/libvirt-domain.h
|
||||
@@ -8594,6 +8594,83 @@ int virDomainSetLaunchSecurityState(virDomainPtr domain,
|
||||
*/
|
||||
# define VIR_DOMAIN_GUEST_INFO_LOAD_15M "load.15m"
|
||||
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_COUNT:
|
||||
+ *
|
||||
+ * The number of guest devices that detailed information is fetched for as
|
||||
+ * unsigned int.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_COUNT "device.count"
|
||||
+
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX:
|
||||
+ *
|
||||
+ * The parameter name prefix to access each device entry. Concatenate the
|
||||
+ * prefix, the entry number formatted as an unsigned integer and one of the
|
||||
+ * device suffix parameters to form a complete parameter name.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX "device."
|
||||
+
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_NAME:
|
||||
+ *
|
||||
+ * Name of the device driver (e.g. ``VirtIO Balloon Driver``) as a string.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_NAME ".driverName"
|
||||
+
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_DATE:
|
||||
+ *
|
||||
+ * Driver release date in seconds since the epoch (e.g. 1736726400) as long long.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_DATE ".driverDate"
|
||||
+
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_VERSION:
|
||||
+ *
|
||||
+ * Driver version (e.g. ``100.100.104.27100``) as a string.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_VERSION ".driverVersion"
|
||||
+
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_ID_TYPE:
|
||||
+ *
|
||||
+ * Device identification (e.g. ``pci``) as a string.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_ID_TYPE ".idType"
|
||||
+
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_PCI_VENDOR:
|
||||
+ *
|
||||
+ * PCI device (a device with VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_ID_TYPE equal
|
||||
+ * to ``pci``) vendor id (e.g. 6900) as a unsigned int.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_PCI_VENDOR ".pciVendor"
|
||||
+
|
||||
+/**
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_PCI_DEVICE:
|
||||
+ *
|
||||
+ * PCI device (a device with VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_ID_TYPE equal
|
||||
+ * to ``pci``) device id (e.g. 4165) as a unsigned int.
|
||||
+ *
|
||||
+ * Since: 12.7.0
|
||||
+ */
|
||||
+# define VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_PCI_DEVICE ".pciDevice"
|
||||
+
|
||||
/**
|
||||
* virDomainGuestInfoTypes:
|
||||
*
|
||||
@@ -8608,6 +8685,7 @@ typedef enum {
|
||||
VIR_DOMAIN_GUEST_INFO_DISKS = (1 << 5), /* return disks information (Since: 7.0.0) */
|
||||
VIR_DOMAIN_GUEST_INFO_INTERFACES = (1 << 6), /* return interfaces information (Since: 7.10.0) */
|
||||
VIR_DOMAIN_GUEST_INFO_LOAD = (1 << 7), /* return load averages (Since: 11.2.0) */
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICES = (1 << 8), /* return devices information (Since: 12.7.0) */
|
||||
} virDomainGuestInfoTypes;
|
||||
|
||||
int virDomainGetGuestInfo(virDomainPtr domain,
|
||||
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
|
||||
index 0ae48654df..1dc9468968 100644
|
||||
--- a/src/libvirt-domain.c
|
||||
+++ b/src/libvirt-domain.c
|
||||
@@ -13226,6 +13226,11 @@ virDomainSetVcpu(virDomainPtr domain,
|
||||
* The VIR_DOMAIN_GUEST_INFO_LOAD_* constants define the known typed parameter
|
||||
* keys.
|
||||
*
|
||||
+ * VIR_DOMAIN_GUEST_INFO_DEVICES:
|
||||
+ * Returns information on guest devices.
|
||||
+ * The VIR_DOMAIN_GUEST_INFO_DEVICE_* constants define the known typed
|
||||
+ * parameter keys.
|
||||
+ *
|
||||
* Using 0 for @types returns all information groups supported by the given
|
||||
* hypervisor.
|
||||
*
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,306 @@
|
||||
From 64e5603f8ea139cd8b7c61b643a0a02bba5885c3 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <64e5603f8ea139cd8b7c61b643a0a02bba5885c3.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 22 Jul 2026 17:13:15 +0200
|
||||
Subject: [PATCH] Add support for keeping VM running when panic notifier is
|
||||
used
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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 <on_crash> 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 <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit cdea89dd87a10cd94deb3b067bae483d98c558ed)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 8e7577f3b7..b48254f35b 100644
|
||||
--- a/docs/formatdomain.rst
|
||||
+++ b/docs/formatdomain.rst
|
||||
@@ -1998,6 +1998,9 @@ The ``on_crash`` event supports these additional actions :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 <html/libvirt-libvirt-domain.html#virDomainSetLifecycleAction>`__
|
||||
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
|
||||
index 4d7c0099ef..f469ed428d 100644
|
||||
--- a/include/libvirt/libvirt-domain.h
|
||||
+++ b/include/libvirt/libvirt-domain.h
|
||||
@@ -7955,6 +7955,7 @@ typedef enum {
|
||||
VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE = 3, /* (Since: 3.9.0) */
|
||||
VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY = 4, /* (Since: 3.9.0) */
|
||||
VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART = 5, /* (Since: 3.9.0) */
|
||||
+ VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING = 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 7097ff7065..048aaa10a6 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -302,6 +302,7 @@ VIR_ENUM_IMPL(virDomainLifecycleAction,
|
||||
"preserve",
|
||||
"coredump-destroy",
|
||||
"coredump-restart",
|
||||
+ "preserve-running",
|
||||
);
|
||||
|
||||
VIR_ENUM_IMPL(virDomainLockFailure,
|
||||
@@ -5483,6 +5484,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/domaincommon.rng
|
||||
index b8283f129e..f091c87702 100644
|
||||
--- a/src/conf/schemas/domaincommon.rng
|
||||
+++ b/src/conf/schemas/domaincommon.rng
|
||||
@@ -4973,6 +4973,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 manually
|
||||
+ preserve-running: Keep the domain as is, let the guest handle the crash.
|
||||
rename-restart: a variant of the previous one but where the old domain is
|
||||
renamed before being saved to allow a restart
|
||||
coredump-destroy: The crashed domain's core will be dumped, and then the
|
||||
@@ -4989,6 +4990,7 @@
|
||||
<value>rename-restart</value>
|
||||
<value>coredump-destroy</value>
|
||||
<value>coredump-restart</value>
|
||||
+ <value>preserve-running</value>
|
||||
</choice>
|
||||
</define>
|
||||
<!--
|
||||
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
|
||||
index 2b988157fa..c7ca81374b 100644
|
||||
--- a/src/libxl/libxl_conf.c
|
||||
+++ b/src/libxl/libxl_conf.c
|
||||
@@ -111,6 +111,7 @@ libxlActionFromVirLifecycle(virDomainLifecycleAction action)
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART:
|
||||
return LIBXL_ACTION_ON_SHUTDOWN_COREDUMP_RESTART;
|
||||
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
break;
|
||||
}
|
||||
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
|
||||
index 9842d6fece..f8b50e2751 100644
|
||||
--- a/src/libxl/libxl_domain.c
|
||||
+++ b/src/libxl/libxl_domain.c
|
||||
@@ -503,6 +503,7 @@ libxlDomainShutdownThread(void *opaque)
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
goto endjob;
|
||||
}
|
||||
@@ -523,6 +524,7 @@ libxlDomainShutdownThread(void *opaque)
|
||||
goto endjob;
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
goto endjob;
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY:
|
||||
libxlDomainAutoCoreDump(driver, vm);
|
||||
@@ -551,6 +553,7 @@ libxlDomainShutdownThread(void *opaque)
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
goto endjob;
|
||||
}
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index 7e5c374e4c..adc7054f5e 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -3548,6 +3548,11 @@ processGuestPanicEvent(virQEMUDriver *driver,
|
||||
qemuDomainSaveStatus(vm);
|
||||
break;
|
||||
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
+ virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_CRASHED);
|
||||
+ qemuDomainSaveStatus(vm);
|
||||
+ break;
|
||||
+
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
break;
|
||||
}
|
||||
@@ -3565,6 +3570,8 @@ processGuestPanicEvent(virQEMUDriver *driver,
|
||||
VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState));
|
||||
break;
|
||||
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
+ /* we need to keep resources locked */
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
break;
|
||||
}
|
||||
@@ -3582,6 +3589,7 @@ processGuestPanicEvent(virQEMUDriver *driver,
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
break;
|
||||
}
|
||||
@@ -3608,6 +3616,7 @@ processGuestPanicEvent(virQEMUDriver *driver,
|
||||
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
break;
|
||||
}
|
||||
@@ -19291,13 +19300,36 @@ qemuDomainModifyLifecycleActionLive(virDomainObj *vm,
|
||||
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_PRESERVE_RUNNING:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
+ break;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_DOMAIN_LIFECYCLE_CRASH:
|
||||
+ if (vm->def->onCrash == action)
|
||||
+ break;
|
||||
+
|
||||
+ switch (vm->def->onCrash) {
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
+ panic = QEMU_MONITOR_ACTION_PANIC_NONE;
|
||||
+ 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_COREDUMP_DESTROY:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART:
|
||||
+ panic = QEMU_MONITOR_ACTION_PANIC_PAUSE;
|
||||
+ break;
|
||||
+
|
||||
case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_LIFECYCLE_POWEROFF:
|
||||
- case VIR_DOMAIN_LIFECYCLE_CRASH:
|
||||
case VIR_DOMAIN_LIFECYCLE_LAST:
|
||||
break;
|
||||
}
|
||||
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||
index f14c03c458..dfd70c4c35 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -8100,6 +8100,24 @@ qemuProcessSetupLifecycleActions(virDomainObj *vm,
|
||||
if (vm->def->onReboot == VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY)
|
||||
reboot = QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN;
|
||||
|
||||
+ switch (vm->def->onCrash) {
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE_RUNNING:
|
||||
+ panic = QEMU_MONITOR_ACTION_PANIC_NONE;
|
||||
+ 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_COREDUMP_DESTROY:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART:
|
||||
+ panic = QEMU_MONITOR_ACTION_PANIC_PAUSE;
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_LAST:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
if (shutdown == QEMU_MONITOR_ACTION_SHUTDOWN_KEEP &&
|
||||
reboot == QEMU_MONITOR_ACTION_REBOOT_KEEP &&
|
||||
watchdog == QEMU_MONITOR_ACTION_WATCHDOG_KEEP &&
|
||||
diff --git a/tests/qemuxmlconfdata/async-teardown.x86_64-latest.xml b/tests/qemuxmlconfdata/async-teardown.x86_64-latest.xml
|
||||
index e98308a9b1..1c7c80ae8a 100644
|
||||
--- a/tests/qemuxmlconfdata/async-teardown.x86_64-latest.xml
|
||||
+++ b/tests/qemuxmlconfdata/async-teardown.x86_64-latest.xml
|
||||
@@ -17,7 +17,7 @@
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
- <on_crash>destroy</on_crash>
|
||||
+ <on_crash>preserve-running</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
diff --git a/tests/qemuxmlconfdata/async-teardown.xml b/tests/qemuxmlconfdata/async-teardown.xml
|
||||
index 70c1eccc55..149b9ed16d 100644
|
||||
--- a/tests/qemuxmlconfdata/async-teardown.xml
|
||||
+++ b/tests/qemuxmlconfdata/async-teardown.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
- <on_crash>destroy</on_crash>
|
||||
+ <on_crash>preserve-running</on_crash>
|
||||
<features>
|
||||
<async-teardown enabled='yes'/>
|
||||
</features>
|
||||
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
|
||||
index 45e9a37794..ffceac549c 100644
|
||||
--- a/tests/qemuxmlconftest.c
|
||||
+++ b/tests/qemuxmlconftest.c
|
||||
@@ -3318,6 +3318,7 @@ mymain(void)
|
||||
|
||||
DO_TEST_CAPS_LATEST("crypto-builtin");
|
||||
|
||||
+ /* this test case also tests 'preserve-running' onCrash action */
|
||||
DO_TEST_CAPS_LATEST("async-teardown");
|
||||
DO_TEST_CAPS_ARCH_LATEST("s390-async-teardown", "s390x");
|
||||
DO_TEST_CAPS_ARCH_LATEST("s390-async-teardown-no-attrib", "s390x");
|
||||
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
|
||||
index 6e18d195e6..536c0350c7 100644
|
||||
--- a/tools/virsh-domain.c
|
||||
+++ b/tools/virsh-domain.c
|
||||
@@ -6124,7 +6124,8 @@ VIR_ENUM_IMPL(virshDomainLifecycleAction,
|
||||
"rename-restart",
|
||||
"preserve",
|
||||
"coredump-destroy",
|
||||
- "coredump-restart");
|
||||
+ "coredump-restart",
|
||||
+ "none");
|
||||
|
||||
static bool
|
||||
cmdSetLifecycleAction(vshControl *ctl, const vshCmd *cmd)
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,137 @@
|
||||
From 1dac70d29c2782687113be80990c29389cfda28e Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <1dac70d29c2782687113be80990c29389cfda28e.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 21 Jul 2026 10:21:50 +0200
|
||||
Subject: [PATCH] conf: Use proper enum types for 'onReboot', 'onPoweroff',
|
||||
'onCrash', and 'onLockFailure'
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This ensures that 'switch' statements work correctly.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 997b9816dcaef7ed0d7fdbfe4f1b2354b1b82c58)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 47200d27c5..7097ff7065 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -14078,21 +14078,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 = virXPathString(xpath, ctxt);
|
||||
+ int tmpval;
|
||||
|
||||
if (tmp == NULL) {
|
||||
*val = defaultVal;
|
||||
} else {
|
||||
- *val = convFunc(tmp);
|
||||
- if (*val < 0) {
|
||||
+ tmpval = convFunc(tmp);
|
||||
+ if (tmpval < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown %1$s action: %2$s"), name, tmp);
|
||||
return -1;
|
||||
}
|
||||
+ *val = tmpval;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||
index 3a1a2fdce1..fc7584b6c1 100644
|
||||
--- a/src/conf/domain_conf.h
|
||||
+++ b/src/conf/domain_conf.h
|
||||
@@ -3217,12 +3217,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 f19e4f6abb..fcb0339b35 100644
|
||||
--- a/src/libxl/xen_common.c
|
||||
+++ b/src/libxl/xen_common.c
|
||||
@@ -336,33 +336,37 @@ xenParseEventsActions(virConf *conf, virDomainDef *def)
|
||||
g_autofree char *on_poweroff = NULL;
|
||||
g_autofree char *on_reboot = NULL;
|
||||
g_autofree char *on_crash = NULL;
|
||||
+ int tmp;
|
||||
|
||||
if (xenConfigGetString(conf, "on_poweroff", &on_poweroff, "destroy") < 0)
|
||||
return -1;
|
||||
|
||||
- if ((def->onPoweroff = virDomainLifecycleActionTypeFromString(on_poweroff)) < 0) {
|
||||
+ if ((tmp = virDomainLifecycleActionTypeFromString(on_poweroff)) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unexpected value %1$s for on_poweroff"), on_poweroff);
|
||||
return -1;
|
||||
}
|
||||
+ def->onPoweroff = tmp;
|
||||
|
||||
if (xenConfigGetString(conf, "on_reboot", &on_reboot, "restart") < 0)
|
||||
return -1;
|
||||
|
||||
- if ((def->onReboot = virDomainLifecycleActionTypeFromString(on_reboot)) < 0) {
|
||||
+ if ((tmp = virDomainLifecycleActionTypeFromString(on_reboot)) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unexpected value %1$s for on_reboot"), on_reboot);
|
||||
return -1;
|
||||
}
|
||||
+ def->onReboot = tmp;
|
||||
|
||||
if (xenConfigGetString(conf, "on_crash", &on_crash, "restart") < 0)
|
||||
return -1;
|
||||
|
||||
- if ((def->onCrash = virDomainLifecycleActionTypeFromString(on_crash)) < 0) {
|
||||
+ if ((tmp = virDomainLifecycleActionTypeFromString(on_crash)) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unexpected value %1$s for on_crash"), on_crash);
|
||||
return -1;
|
||||
}
|
||||
+ def->onCrash = tmp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index cae7072831..ddd6e8f7ac 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -3584,6 +3584,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;
|
||||
}
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,69 @@
|
||||
From 5a76fe7b353b85b60ac913860a508989757def1f Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <5a76fe7b353b85b60ac913860a508989757def1f.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 20 Jul 2026 13:58:55 +0200
|
||||
Subject: [PATCH] processGuestPanicEvent: Don't pass panic action via parameter
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
'processGuestPanicEvent' gets the full domain object; there's no point
|
||||
passing it via 'struct qemuProcessEvent'.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 0f18f6813cbd53cab8ccdb00fab098b66b90c0fb)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 410cfad066..cae7072831 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -3519,7 +3519,6 @@ qemuProcessGuestPanicEventInfo(virQEMUDriver *driver,
|
||||
static void
|
||||
processGuestPanicEvent(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
- int action,
|
||||
qemuMonitorEventPanicInfo *info)
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
@@ -3554,7 +3553,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;
|
||||
@@ -4103,8 +4102,7 @@ static void qemuProcessEventHandler(void *data, void *opaque)
|
||||
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 6955e8152c..f14c03c458 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -1358,8 +1358,7 @@ qemuProcessHandleGuestPanic(qemuMonitor *mon G_GNUC_UNUSED,
|
||||
{
|
||||
virObjectLock(vm);
|
||||
|
||||
- qemuProcessEventSubmit(vm, QEMU_PROCESS_EVENT_GUESTPANIC,
|
||||
- vm->def->onCrash, 0, info);
|
||||
+ qemuProcessEventSubmit(vm, QEMU_PROCESS_EVENT_GUESTPANIC, 0, 0, info);
|
||||
|
||||
virObjectUnlock(vm);
|
||||
}
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,239 @@
|
||||
From 000b2e9a69d6b361eb6b435cdfafdf8267c1f925 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <000b2e9a69d6b361eb6b435cdfafdf8267c1f925.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 20 Jul 2026 13:27:20 +0200
|
||||
Subject: [PATCH] qemu: Always assume support for 'QEMU_CAPS_SET_ACTION'
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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 <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 771f17c9072c6aacc7bc10e01afc14421512c913)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 963dc2afa3..6bec3ad316 100644
|
||||
--- a/src/qemu/qemu_command.c
|
||||
+++ b/src/qemu/qemu_command.c
|
||||
@@ -6167,16 +6167,9 @@ qemuBuildPMCommandLine(virCommand *cmd,
|
||||
{
|
||||
virQEMUCaps *qemuCaps = priv->qemuCaps;
|
||||
|
||||
- if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) {
|
||||
- /* with new qemu we always want '-no-shutdown' on startup and we set
|
||||
- * all the other behaviour later during startup */
|
||||
- virCommandAddArg(cmd, "-no-shutdown");
|
||||
- } else {
|
||||
- if (priv->allowReboot == 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 supports the
|
||||
* new syntax */
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index 3c7de45301..e24ac26f59 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -19248,9 +19248,6 @@ qemuDomainModifyLifecycleActionLive(virDomainObj *vm,
|
||||
qemuDomainObjPrivate *priv = 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 != VIR_DOMAIN_LIFECYCLE_REBOOT ||
|
||||
@@ -19300,7 +19297,6 @@ qemuDomainSetLifecycleAction(virDomainPtr dom,
|
||||
{
|
||||
virQEMUDriver *driver = dom->conn->privateData;
|
||||
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||
- qemuDomainObjPrivate *priv;
|
||||
virDomainObj *vm = NULL;
|
||||
virDomainDef *def = NULL;
|
||||
virDomainDef *persistentDef = NULL;
|
||||
@@ -19317,8 +19313,6 @@ qemuDomainSetLifecycleAction(virDomainPtr dom,
|
||||
if (!(vm = qemuDomainObjFromDomain(dom)))
|
||||
goto cleanup;
|
||||
|
||||
- priv = vm->privateData;
|
||||
-
|
||||
if (virDomainSetLifecycleActionEnsureACL(dom->conn, vm->def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -19333,16 +19327,6 @@ qemuDomainSetLifecycleAction(virDomainPtr dom,
|
||||
goto endjob;
|
||||
|
||||
if (def) {
|
||||
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) {
|
||||
- if (priv->allowReboot == VIR_TRISTATE_BOOL_NO ||
|
||||
- (type == VIR_DOMAIN_LIFECYCLE_REBOOT &&
|
||||
- def->onReboot != action)) {
|
||||
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
- _("cannot update lifecycle action because QEMU 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 8944062aa4..86cbe438a3 100644
|
||||
--- a/src/qemu/qemu_hotplug.c
|
||||
+++ b/src/qemu/qemu_hotplug.c
|
||||
@@ -3069,7 +3069,7 @@ qemuDomainAttachWatchdog(virDomainObj *vm,
|
||||
if (vm->def->nwatchdogs) {
|
||||
/* Domain already has a watchdog and all must have the same action. */
|
||||
rv = 0;
|
||||
- } else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) {
|
||||
+ } 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 */
|
||||
@@ -3111,14 +3111,6 @@ qemuDomainAttachWatchdog(virDomainObj *vm,
|
||||
QEMU_MONITOR_ACTION_REBOOT_KEEP,
|
||||
watchdogaction,
|
||||
QEMU_MONITOR_ACTION_PANIC_KEEP);
|
||||
- } else {
|
||||
- virDomainWatchdogAction actualAction = watchdog->action;
|
||||
-
|
||||
- if (actualAction == VIR_DOMAIN_WATCHDOG_ACTION_DUMP)
|
||||
- actualAction = VIR_DOMAIN_WATCHDOG_ACTION_PAUSE;
|
||||
-
|
||||
- rv = qemuMonitorSetWatchdogAction(priv->mon,
|
||||
- virDomainWatchdogActionTypeToString(actualAction));
|
||||
}
|
||||
|
||||
if (rv >= 0)
|
||||
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||
index 1540c74087..5dfc9e5db3 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -6811,24 +6811,6 @@ qemuProcessRebootAllowed(const virDomainDef *def)
|
||||
}
|
||||
|
||||
|
||||
-static void
|
||||
-qemuProcessPrepareAllowReboot(virDomainObj *vm)
|
||||
-{
|
||||
- virDomainDef *def = vm->def;
|
||||
- qemuDomainObjPrivate *priv = 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 != VIR_TRISTATE_BOOL_ABSENT)
|
||||
- return;
|
||||
-
|
||||
- priv->allowReboot = virTristateBoolFromBool(qemuProcessRebootAllowed(def));
|
||||
-}
|
||||
-
|
||||
-
|
||||
static int
|
||||
qemuProcessUpdateSEVInfo(virDomainObj *vm)
|
||||
{
|
||||
@@ -7000,8 +6982,6 @@ qemuProcessPrepareDomain(virQEMUDriver *driver,
|
||||
/* Track if this domain remembers original owner */
|
||||
priv->rememberOwner = cfg->rememberOwner;
|
||||
|
||||
- qemuProcessPrepareAllowReboot(vm);
|
||||
-
|
||||
/*
|
||||
* Normally PCI addresses are assigned in the virDomainCreate
|
||||
* or virDomainDefine methods. We might still need to assign
|
||||
@@ -8130,9 +8110,6 @@ qemuProcessSetupLifecycleActions(virDomainObj *vm,
|
||||
qemuDomainObjPrivate *priv = 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 != VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY)
|
||||
@@ -9826,10 +9803,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;
|
||||
|
||||
@@ -10064,9 +10037,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 == VIR_TRISTATE_BOOL_YES ||
|
||||
- virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)))
|
||||
+ if (!priv->mon && tryMonReconn)
|
||||
state = VIR_DOMAIN_SHUTOFF_CRASHED;
|
||||
else if (priv->mon)
|
||||
state = VIR_DOMAIN_SHUTOFF_DAEMON;
|
||||
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
|
||||
index 3e84ef7139..fd22ac1375 100644
|
||||
--- a/src/qemu/qemu_validate.c
|
||||
+++ b/src/qemu/qemu_validate.c
|
||||
@@ -3589,10 +3589,7 @@ qemuValidateDomainDeviceDefDiskBlkdeviotune(const virDomainDiskDef *disk,
|
||||
|
||||
|
||||
static int
|
||||
-qemuValidateDomainDeviceDefDiskTransient(const virDomainDiskDef *disk,
|
||||
- const virDomainDef *def,
|
||||
- virQEMUCaps *qemuCaps)
|
||||
-
|
||||
+qemuValidateDomainDeviceDefDiskTransient(const virDomainDiskDef *disk)
|
||||
{
|
||||
virStorageType actualType = virStorageSourceGetActualType(disk->src);
|
||||
|
||||
@@ -3626,13 +3623,6 @@ qemuValidateDomainDeviceDefDiskTransient(const virDomainDiskDef *disk,
|
||||
}
|
||||
|
||||
if (disk->transientShareBacking == 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 destroy action of lifecycle isn't supported by this QEMU binary"));
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
/* sharing the backing file requires hotplug of the disk in the qemu driver */
|
||||
switch (disk->bus) {
|
||||
case VIR_DOMAIN_DISK_BUS_USB:
|
||||
@@ -3678,7 +3668,7 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *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 &&
|
||||
--
|
||||
2.55.0
|
||||
50
libvirt-qemu-Fix-proper-ordering-of-virtlockd-shutdown.patch
Normal file
50
libvirt-qemu-Fix-proper-ordering-of-virtlockd-shutdown.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From c2b993df4c9dfa1c8ff49db685761dd59ba72073 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <c2b993df4c9dfa1c8ff49db685761dd59ba72073.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 18 Aug 2026 10:09:06 +0200
|
||||
Subject: [PATCH] qemu: Fix proper ordering of 'virtlockd' shutdown
|
||||
|
||||
In commit aa1bf13b9caa4ef893cd4fdbaa111d5da73aa120 I attempted to fix
|
||||
the ordering of virtlockd and virtlogd during shutdown but I made a typo
|
||||
in the name of 'virtlockd.service' (missing 'd').
|
||||
|
||||
Fixes: aa1bf13b9caa4ef893cd4fdbaa111d5da73aa120
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
|
||||
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
(cherry picked from commit 82b39d0580ecb6aa4a6c88eabb85cc6d6bafd559)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-180876
|
||||
---
|
||||
src/qemu/virtqemud.service.extra.in | 2 +-
|
||||
src/remote/libvirtd.service.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/virtqemud.service.extra.in b/src/qemu/virtqemud.service.extra.in
|
||||
index 3cc2edcfd0..df36890704 100644
|
||||
--- a/src/qemu/virtqemud.service.extra.in
|
||||
+++ b/src/qemu/virtqemud.service.extra.in
|
||||
@@ -9,7 +9,7 @@ After=virtlockd.socket
|
||||
# To ensure that our helper daemons are not shut down before the main daemon
|
||||
# shuts down we need also explicit ordering with the .service unit
|
||||
After=virtlogd.service
|
||||
-After=virtlock.service
|
||||
+After=virtlockd.service
|
||||
Wants=systemd-machined.service
|
||||
After=systemd-machined.service
|
||||
After=remote-fs.target
|
||||
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
|
||||
index f26494d646..ccdb8379f3 100644
|
||||
--- a/src/remote/libvirtd.service.in
|
||||
+++ b/src/remote/libvirtd.service.in
|
||||
@@ -18,7 +18,7 @@ After=virtlockd.socket
|
||||
# To ensure that our helper daemons are not shut down before the main daemon
|
||||
# shuts down we need also explicit ordering with the .service unit
|
||||
After=virtlogd.service
|
||||
-After=virtlock.service
|
||||
+After=virtlockd.service
|
||||
Wants=systemd-machined.service
|
||||
After=network.target
|
||||
After=dbus.service
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,149 @@
|
||||
From 4d9f92a466e0d78d3c5388a03eaf56f67ac67211 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <4d9f92a466e0d78d3c5388a03eaf56f67ac67211.1787144643.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 12 Aug 2026 13:44:48 +0200
|
||||
Subject: [PATCH] qemu: Implement device info for virDomainGetGuestInfo() API
|
||||
|
||||
Use freshly introduced qemuAgentGetGuestDeviceInfo() to implement
|
||||
support of VIR_DOMAIN_GUEST_INFO_DEVICES type of
|
||||
virDomainGetGuestInfo() API in the QEMU driver.
|
||||
|
||||
Resolves: https://redhat.atlassian.net/browse/RHEL-235731
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 21a3c6f27cd60e8c00d4c0f6825f9b96e13a7a34)
|
||||
|
||||
Conflicts:
|
||||
src/libvirt_private.syms: Because v12.4.0-rc1~76 is not being backported
|
||||
(it moved parts of the agent code under
|
||||
src/hypervisor for wider use).
|
||||
|
||||
Resolves: https://redhat.atlassian.net/browse/RHEL-243300
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_agent.c | 36 ++++++++++++++++++++++++++++++++++++
|
||||
src/qemu/qemu_agent.h | 5 +++++
|
||||
src/qemu/qemu_driver.c | 23 ++++++++++++++++++++++-
|
||||
3 files changed, 63 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
|
||||
index 67faa5aa97..4add6345b6 100644
|
||||
--- a/src/qemu/qemu_agent.c
|
||||
+++ b/src/qemu/qemu_agent.c
|
||||
@@ -2718,3 +2718,39 @@ qemuAgentGetGuestDeviceInfo(qemuAgent *agent,
|
||||
g_clear_pointer(info, g_free);
|
||||
return -1;
|
||||
}
|
||||
+
|
||||
+
|
||||
+void
|
||||
+qemuAgentGuestDeviceInfoFormatParams(qemuAgentGuestDeviceInfo **devices,
|
||||
+ size_t ndevices,
|
||||
+ virTypedParamList *list)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ virTypedParamListAddUInt(list, ndevices, VIR_DOMAIN_GUEST_INFO_DEVICE_COUNT);
|
||||
+
|
||||
+ for (i = 0; i < ndevices; i++) {
|
||||
+ virTypedParamListAddString(list, devices[i]->driverName,
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_NAME, i);
|
||||
+
|
||||
+ if (devices[i]->driverDate != -1) {
|
||||
+ /* Guest agent reports this in nanoseconds, our API in seconds. */
|
||||
+ virTypedParamListAddLLong(list, devices[i]->driverDate / 1000000000,
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_DATE, i);
|
||||
+ }
|
||||
+
|
||||
+ if (devices[i]->driverVersion) {
|
||||
+ virTypedParamListAddString(list, devices[i]->driverVersion,
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_DRIVER_VERSION, i);
|
||||
+ }
|
||||
+
|
||||
+ if (devices[i]->pci) {
|
||||
+ virTypedParamListAddString(list, "pci",
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_ID_TYPE, i);
|
||||
+ virTypedParamListAddUInt(list, devices[i]->pci->vendorID,
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_PCI_VENDOR, i);
|
||||
+ virTypedParamListAddUInt(list, devices[i]->pci->deviceID,
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICE_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_DEVICE_SUFFIX_PCI_DEVICE, i);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/qemu/qemu_agent.h b/src/qemu/qemu_agent.h
|
||||
index a6be2ff387..d19b5b2134 100644
|
||||
--- a/src/qemu/qemu_agent.h
|
||||
+++ b/src/qemu/qemu_agent.h
|
||||
@@ -216,3 +216,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuAgentGuestDeviceInfo, qemuAgentGuestDeviceInfo
|
||||
int qemuAgentGetGuestDeviceInfo(qemuAgent *agent,
|
||||
qemuAgentGuestDeviceInfo ***info,
|
||||
bool report_unsupported);
|
||||
+
|
||||
+void
|
||||
+qemuAgentGuestDeviceInfoFormatParams(qemuAgentGuestDeviceInfo **devices,
|
||||
+ size_t ndevices,
|
||||
+ virTypedParamList *list);
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index adc7054f5e..30f70d2dc2 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -19688,7 +19688,8 @@ static const unsigned int qemuDomainGetGuestInfoSupportedTypes =
|
||||
VIR_DOMAIN_GUEST_INFO_FILESYSTEM |
|
||||
VIR_DOMAIN_GUEST_INFO_DISKS |
|
||||
VIR_DOMAIN_GUEST_INFO_INTERFACES |
|
||||
- VIR_DOMAIN_GUEST_INFO_LOAD;
|
||||
+ VIR_DOMAIN_GUEST_INFO_LOAD |
|
||||
+ VIR_DOMAIN_GUEST_INFO_DEVICES;
|
||||
|
||||
static int
|
||||
qemuDomainGetGuestInfoCheckSupport(unsigned int types,
|
||||
@@ -19896,6 +19897,8 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
|
||||
double load5m = 0;
|
||||
double load15m = 0;
|
||||
bool format_load = false;
|
||||
+ qemuAgentGuestDeviceInfo **devices = NULL;
|
||||
+ size_t ndevices = 0;
|
||||
size_t i;
|
||||
g_autoptr(virTypedParamList) list = virTypedParamListNew();
|
||||
|
||||
@@ -19975,6 +19978,14 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
|
||||
format_load = true;
|
||||
}
|
||||
|
||||
+ if (supportedTypes & VIR_DOMAIN_GUEST_INFO_DEVICES) {
|
||||
+ rc = qemuAgentGetGuestDeviceInfo(agent, &devices, report_unsupported);
|
||||
+ if (rc == -1)
|
||||
+ goto exitagent;
|
||||
+ if (rc >= 0)
|
||||
+ ndevices = rc;
|
||||
+ }
|
||||
+
|
||||
qemuDomainObjExitAgent(vm, agent);
|
||||
virDomainObjEndAgentJob(vm);
|
||||
|
||||
@@ -20007,6 +20018,10 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
|
||||
virTypedParamListAddDouble(list, load15m, VIR_DOMAIN_GUEST_INFO_LOAD_15M);
|
||||
}
|
||||
|
||||
+ if (ndevices > 0) {
|
||||
+ qemuAgentGuestDeviceInfoFormatParams(devices, ndevices, list);
|
||||
+ }
|
||||
+
|
||||
if (virTypedParamListSteal(list, params, nparams) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -20024,6 +20039,12 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
|
||||
virDomainInterfaceFree(ifaces[i]);
|
||||
}
|
||||
g_free(ifaces);
|
||||
+ if (devices && ndevices > 0) {
|
||||
+ for (i = 0; i < ndevices; i++) {
|
||||
+ qemuAgentGuestDeviceInfoFree(devices[i]);
|
||||
+ }
|
||||
+ g_free(devices);
|
||||
+ }
|
||||
|
||||
virDomainObjEndAPI(&vm);
|
||||
return ret;
|
||||
--
|
||||
2.55.0
|
||||
313
libvirt-qemu-Remove-allowReboot-field.patch
Normal file
313
libvirt-qemu-Remove-allowReboot-field.patch
Normal file
@ -0,0 +1,313 @@
|
||||
From 93162be780e0992d11a7cb46d42a71c23a5398bc Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <93162be780e0992d11a7cb46d42a71c23a5398bc.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 20 Jul 2026 13:35:07 +0200
|
||||
Subject: [PATCH] qemu: Remove 'allowReboot' field
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The value is no longer used. Remove it including the status XML
|
||||
handling.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 94bd5174d20fafafc2fa67fae101b78b46ec6196)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 78587e2574..703bfc5867 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -1946,8 +1946,6 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *priv)
|
||||
|
||||
priv->rememberOwner = false;
|
||||
|
||||
- priv->allowReboot = 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, "<allowReboot value='%s'/>\n",
|
||||
- virTristateBoolTypeToString(allowReboot));
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-
|
||||
static void
|
||||
qemuDomainObjPrivateXMLFormatPR(virBuffer *buf,
|
||||
qemuDomainObjPrivate *priv)
|
||||
@@ -2812,8 +2799,6 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf,
|
||||
if (priv->rememberOwner)
|
||||
virBufferAddLit(buf, "<rememberOwner/>\n");
|
||||
|
||||
- qemuDomainObjPrivateXMLFormatAllowReboot(buf, priv->allowReboot);
|
||||
-
|
||||
qemuDomainObjPrivateXMLFormatPR(buf, priv);
|
||||
|
||||
virBufferAsprintf(buf, "<nodename index='%llu'/>\n", priv->nodenameindex);
|
||||
@@ -3302,21 +3287,6 @@ qemuDomainObjPrivateXMLParseBackups(qemuDomainObjPrivate *priv,
|
||||
}
|
||||
|
||||
|
||||
-int
|
||||
-qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt,
|
||||
- virTristateBool *allowReboot)
|
||||
-{
|
||||
- xmlNodePtr node = virXPathNode("./allowReboot", ctxt);
|
||||
-
|
||||
- /* Allow value='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 = virXPathBoolean("boolean(./chardevStdioLogd)",
|
||||
ctxt) == 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 a8bf301d51..14fd1b603b 100644
|
||||
--- a/src/qemu/qemu_domain.h
|
||||
+++ b/src/qemu/qemu_domain.h
|
||||
@@ -133,15 +133,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 with
|
||||
- * -no-shutdown, and if set to VIR_TRISTATE_BOOL_NO qemu was started with
|
||||
- * -no-reboot instead.
|
||||
- */
|
||||
- virTristateBool allowReboot;
|
||||
|
||||
unsigned long migMaxBandwidth;
|
||||
char *origname;
|
||||
@@ -1015,14 +1006,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/qemustatusxml2xmldata/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 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='yes'>
|
||||
diff --git a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml b/tests/qemustatusxml2xmldata/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 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='yes'>
|
||||
diff --git a/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml b/tests/qemustatusxml2xmldata/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 @@
|
||||
<libDir path='/tmp'/>
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-QEMUGuest1'/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='yes'/>
|
||||
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 @@
|
||||
<libDir path='/tmp'/>
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
|
||||
<memoryBackingDir path='/some/random/path/1-QEMUGuest1'/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
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 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-nest'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-nest'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
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 @@
|
||||
</cpu>
|
||||
<chardevStdioLogd/>
|
||||
<rememberOwner/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='3'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='yes'>
|
||||
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 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-upstream'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-upstream'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml b/tests/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 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-3-upstream'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/3-upstream'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
diff --git a/tests/qemustatusxml2xmldata/migration-out-params-in.xml b/tests/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 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-7-nest'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/7-nest'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
diff --git a/tests/qemustatusxml2xmldata/modern-in.xml b/tests/qemustatusxml2xmldata/modern-in.xml
|
||||
index 3b3e831759..1193c1997e 100644
|
||||
--- a/tests/qemustatusxml2xmldata/modern-in.xml
|
||||
+++ b/tests/qemustatusxml2xmldata/modern-in.xml
|
||||
@@ -260,7 +260,6 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-upstream'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='123'/>
|
||||
<fdset index='321'/>
|
||||
<blockjobs active='no'/>
|
||||
diff --git a/tests/qemustatusxml2xmldata/qcow2-data-file-in.xml b/tests/qemustatusxml2xmldata/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 @@
|
||||
<libDir path='/tmp'/>
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-QEMUGuest1'/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
diff --git a/tests/qemustatusxml2xmldata/throttlefilter-out.xml b/tests/qemustatusxml2xmldata/throttlefilter-out.xml
|
||||
index 8751a42cce..eee01c79b1 100644
|
||||
--- a/tests/qemustatusxml2xmldata/throttlefilter-out.xml
|
||||
+++ b/tests/qemustatusxml2xmldata/throttlefilter-out.xml
|
||||
@@ -233,7 +233,6 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
diff --git a/tests/qemustatusxml2xmldata/upgrade-out.xml b/tests/qemustatusxml2xmldata/upgrade-out.xml
|
||||
index c7bc7128df..fd1c174200 100644
|
||||
--- a/tests/qemustatusxml2xmldata/upgrade-out.xml
|
||||
+++ b/tests/qemustatusxml2xmldata/upgrade-out.xml
|
||||
@@ -258,7 +258,6 @@
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-upstream'/>
|
||||
<chardevStdioLogd/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
diff --git a/tests/qemustatusxml2xmldata/vcpus-multi-in.xml b/tests/qemustatusxml2xmldata/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 @@
|
||||
<libDir path='/tmp'/>
|
||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
|
||||
<memoryBackingDir path='/var/lib/libvirt/qemu/ram/1729-QEMUGuest1'/>
|
||||
- <allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
--
|
||||
2.55.0
|
||||
63
libvirt-qemu-Remove-unused-qemuProcessRebootAllowed.patch
Normal file
63
libvirt-qemu-Remove-unused-qemuProcessRebootAllowed.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From efab037086cf55a718cde67573037f28dcadedf2 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <efab037086cf55a718cde67573037f28dcadedf2.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 20 Jul 2026 13:29:50 +0200
|
||||
Subject: [PATCH] qemu: Remove unused 'qemuProcessRebootAllowed'
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 8effae01b918f91933a6bd3b5721cb243c50248a)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 5dfc9e5db3..369dbab579 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -6793,24 +6793,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 != VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY ||
|
||||
- def->onPoweroff != VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY ||
|
||||
- (def->onCrash != VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY &&
|
||||
- def->onCrash != 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 dc16622ed9..75a725c4b9 100644
|
||||
--- a/src/qemu/qemu_process.h
|
||||
+++ b/src/qemu/qemu_process.h
|
||||
@@ -262,8 +262,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuProcessQMP, qemuProcessQMPFree);
|
||||
|
||||
int qemuProcessQMPStart(qemuProcessQMP *proc);
|
||||
|
||||
-bool qemuProcessRebootAllowed(const virDomainDef *def);
|
||||
-
|
||||
void qemuProcessCleanupMigrationJob(virQEMUDriver *driver,
|
||||
virDomainObj *vm);
|
||||
|
||||
--
|
||||
2.55.0
|
||||
531
libvirt-qemu-capabilities-Retire-QEMU_CAPS_SET_ACTION.patch
Normal file
531
libvirt-qemu-capabilities-Retire-QEMU_CAPS_SET_ACTION.patch
Normal file
@ -0,0 +1,531 @@
|
||||
From a0565bb198bfe6aaf7e91186cfc188e18fcf34d7 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <a0565bb198bfe6aaf7e91186cfc188e18fcf34d7.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 20 Jul 2026 13:43:26 +0200
|
||||
Subject: [PATCH] qemu: capabilities: Retire QEMU_CAPS_SET_ACTION
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The capability is no longer used because all qemu versions we support do
|
||||
have the 'set-action' command.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 01cb769a183e40a3f820ed9f949cf2d8b8cc3498)
|
||||
|
||||
Conflicts:
|
||||
tests/qemucapabilitiesdata/caps_10.1.0_s390x.xml
|
||||
tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml
|
||||
tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml
|
||||
tests/qemucapabilitiesdata/caps_11.0.0_s390x.xml
|
||||
tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml
|
||||
tests/qemucapabilitiesdata/caps_11.1.0_x86_64.xml
|
||||
|
||||
Capability dump files are not present downstream yet.
|
||||
|
||||
tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml
|
||||
tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml
|
||||
tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml
|
||||
tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml
|
||||
|
||||
These capability files weren't yet deleted upstream, so this patch
|
||||
removes the flag from there as a downstream fix.
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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_x86_64+inteltdx.xml | 1 -
|
||||
tests/qemucapabilitiesdata/caps_10.1.0_x86_64.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_6.2.0_ppc64.xml | 1 -
|
||||
tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml | 1 -
|
||||
tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml | 1 -
|
||||
tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml | 1 -
|
||||
tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml | 1 -
|
||||
tests/qemucapabilitiesdata/caps_7.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 -
|
||||
37 files changed, 2 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
||||
index fc5a428620..e344a05bb4 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_CONFIDENTAL_GUEST_SUPPORT */
|
||||
"query-display-options", /* X_QEMU_CAPS_QUERY_DISPLAY_OPTIONS */
|
||||
"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 */
|
||||
@@ -1281,7 +1281,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
|
||||
{ "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 334e98aac4..b6ccbfe65a 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 command 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/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
|
||||
index bbb8b33cde..9468462bb3 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
|
||||
@@ -109,7 +109,6 @@
|
||||
<flag name='acpi-index'/>
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml
|
||||
index 4b3cded2d1..5aee092b40 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml
|
||||
@@ -117,7 +117,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
|
||||
index cf00ac4ea0..a40b19a0a1 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
|
||||
@@ -81,7 +81,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
<flag name='s390-pv-guest'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml
|
||||
index 5acd1a33fd..8e923e7d20 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml
|
||||
index 50f58791e6..b561c22242 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml b/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml
|
||||
index e321c352a3..68a9790cf0 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 @@
|
||||
<flag name='acpi-index'/>
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.1.0_x86_64.xml
|
||||
index 2d52659520..d9223a021c 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
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 eb2ab001a6..b28ac95d60 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 @@
|
||||
<flag name='acpi-index'/>
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml
|
||||
index c4ea924c1f..ae9f4df6a5 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml
|
||||
index ff3bbe3a1f..4d235ae6d1 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml
|
||||
@@ -109,7 +109,6 @@
|
||||
<flag name='acpi-index'/>
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='piix4.acpi-root-pci-hotplug'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml
|
||||
index 108e75bee8..5adb91b8b2 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml
|
||||
@@ -147,7 +147,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml
|
||||
index 6d4b555cd6..bf04c5a991 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml
|
||||
@@ -122,7 +122,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='piix4.acpi-root-pci-hotplug'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml
|
||||
index 1723e65499..82ca53c5b2 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml
|
||||
@@ -147,7 +147,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml
|
||||
index efd3150659..9201a0a903 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml
|
||||
@@ -118,7 +118,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='piix4.acpi-root-pci-hotplug'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml
|
||||
index 4deaf4fd1c..0a39442be4 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml
|
||||
@@ -147,7 +147,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml b/tests/qemucapabilitiesdata/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 @@
|
||||
<flag name='input-linux'/>
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='piix4.acpi-root-pci-hotplug'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml
|
||||
index cbfc830f2c..0851162702 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml
|
||||
index 913f96e91a..dda51b35df 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml b/tests/qemucapabilitiesdata/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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml b/tests/qemucapabilitiesdata/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 @@
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
<flag name='s390-pv-guest'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml
|
||||
index 9141faa7b9..87b330ff32 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml b/tests/qemucapabilitiesdata/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 @@
|
||||
<flag name='acpi-index'/>
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml b/tests/qemucapabilitiesdata/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 @@
|
||||
<flag name='input-linux'/>
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
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 @@
|
||||
<flag name='acpi-index'/>
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml b/tests/qemucapabilitiesdata/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 @@
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
<flag name='s390-pv-guest'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml
|
||||
index 12aa9c23fd..4909957a9a 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_sparc.xml b/tests/qemucapabilitiesdata/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 @@
|
||||
<flag name='rotation-rate'/>
|
||||
<flag name='input-linux'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
<flag name='query-dirty-rate'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml
|
||||
index 88bd502fee..956a4c02a0 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml b/tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml
|
||||
index 85c013a724..f718abf406 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_9.1.0_riscv64.xml
|
||||
@@ -113,7 +113,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml b/tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml
|
||||
index 3d2692b02c..f54b70359e 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_9.1.0_s390x.xml
|
||||
@@ -81,7 +81,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
<flag name='s390-pv-guest'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml
|
||||
index 66578099a7..fd75acc8ad 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml b/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml
|
||||
index 79784d553f..2a66f36fd2 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 @@
|
||||
<flag name='rotation-rate'/>
|
||||
<flag name='acpi-index'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='netdev.json'/>
|
||||
<flag name='query-dirty-rate'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml b/tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml
|
||||
index 9f95ed891e..21e7f5d957 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_9.2.0_s390x.xml
|
||||
@@ -81,7 +81,6 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
<flag name='s390-pv-guest'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
<flag name='netdev.json'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml
|
||||
index 6636346bc5..b275c7f10d 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml
|
||||
index dee30415aa..dee685e9bd 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 @@
|
||||
<flag name='virtio-gpu-gl-pci'/>
|
||||
<flag name='virtio-vga-gl'/>
|
||||
<flag name='confidential-guest-support'/>
|
||||
- <flag name='set-action'/>
|
||||
<flag name='virtio-blk.queue-size'/>
|
||||
<flag name='virtio-mem-pci'/>
|
||||
<flag name='memory-backend-file.reserve'/>
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,112 @@
|
||||
From b2fd697438db60889f462a4ed11f08438380b1a6 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <b2fd697438db60889f462a4ed11f08438380b1a6.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 20 Jul 2026 13:31:39 +0200
|
||||
Subject: [PATCH] qemu: monitor: Remove support for 'watchdog-set-action'
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
We now use 'set-action' instead.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 8365c6679fa65b66b85da2773547515a40ae1a8f)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 3d7477c01c..5ecee978f9 100644
|
||||
--- a/src/qemu/qemu_monitor.c
|
||||
+++ b/src/qemu/qemu_monitor.c
|
||||
@@ -4006,18 +4006,6 @@ qemuMonitorMemoryDeviceSizeChangeFree(qemuMonitorMemoryDeviceSizeChangePtr info)
|
||||
}
|
||||
|
||||
|
||||
-int
|
||||
-qemuMonitorSetWatchdogAction(qemuMonitor *mon,
|
||||
- const char *action)
|
||||
-{
|
||||
- VIR_DEBUG("watchdogAction=%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 bbe400003a..671930fe5f 100644
|
||||
--- a/src/qemu/qemu_monitor.h
|
||||
+++ b/src/qemu/qemu_monitor.h
|
||||
@@ -1642,10 +1642,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 45f690d9e2..a98cf70a41 100644
|
||||
--- a/src/qemu/qemu_monitor_json.c
|
||||
+++ b/src/qemu/qemu_monitor_json.c
|
||||
@@ -7826,28 +7826,6 @@ qemuMonitorJSONSetBlockThreshold(qemuMonitor *mon,
|
||||
}
|
||||
|
||||
|
||||
-int
|
||||
-qemuMonitorJSONSetWatchdogAction(qemuMonitor *mon,
|
||||
- const char *action)
|
||||
-{
|
||||
- g_autoptr(virJSONValue) cmd = NULL;
|
||||
- g_autoptr(virJSONValue) reply = NULL;
|
||||
-
|
||||
- if (!(cmd = 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 b418f70048..b07e54c2c5 100644
|
||||
--- a/src/qemu/qemu_monitor_json.h
|
||||
+++ b/src/qemu/qemu_monitor_json.h
|
||||
@@ -629,11 +629,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,
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,127 @@
|
||||
From a8af95d072a9578ab0d8234f9d814f3a27a9180b Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <a8af95d072a9578ab0d8234f9d814f3a27a9180b.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 21 Jul 2026 15:08:01 +0200
|
||||
Subject: [PATCH] qemu: processGuestPanicEvent: Split individual steps under
|
||||
separate conditions
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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 <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit ce97710da27fa005841c5f38baa2edcdc82f5d30)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
src/qemu/qemu_driver.c | 66 ++++++++++++++++++++++++++++++------------
|
||||
1 file changed, 48 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index 3fd1215006..7e5c374e4c 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -3531,26 +3531,64 @@ processGuestPanicEvent(virQEMUDriver *driver,
|
||||
qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", timestamp, msg);
|
||||
}
|
||||
|
||||
- virDomainObjSetState(vm, VIR_DOMAIN_CRASHED, VIR_DOMAIN_CRASHED_PANICKED);
|
||||
-
|
||||
event = virDomainEventLifecycleNewFromObj(vm,
|
||||
VIR_DOMAIN_EVENT_CRASHED,
|
||||
VIR_DOMAIN_EVENT_CRASHED_PANICKED);
|
||||
-
|
||||
virObjectEventStateQueue(driver->domainEventState, event);
|
||||
|
||||
- qemuDomainSaveStatus(vm);
|
||||
-
|
||||
- if (virDomainLockProcessPause(driver->lockManager, vm, &priv->lockState) < 0)
|
||||
- VIR_WARN("Unable to release lease on %s", vm->def->name);
|
||||
- VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState));
|
||||
-
|
||||
+ /* 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_PANICKED);
|
||||
+ qemuDomainSaveStatus(vm);
|
||||
+ break;
|
||||
+
|
||||
+ 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->lockState) < 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 = virDomainEventLifecycleNewFromObj(vm,
|
||||
@@ -3563,22 +3601,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;
|
||||
}
|
||||
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,103 @@
|
||||
From 00e93e0ba0770169ffb3797c24ee0cc2b1199990 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <00e93e0ba0770169ffb3797c24ee0cc2b1199990.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 22 Jul 2026 17:05:00 +0200
|
||||
Subject: [PATCH] qemuDomainModifyLifecycleActionLive: Prepare to handle other
|
||||
actions
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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 <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 79b6d701c7719fbe5e5db8531ff6460edfbed171)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 e24ac26f59..410cfad066 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -19244,42 +19244,51 @@ qemuDomainModifyLifecycleActionLive(virDomainObj *vm,
|
||||
virDomainLifecycle type,
|
||||
virDomainLifecycleAction action)
|
||||
{
|
||||
- qemuMonitorActionReboot monReboot = QEMU_MONITOR_ACTION_REBOOT_KEEP;
|
||||
+ qemuMonitorActionShutdown shutdown = QEMU_MONITOR_ACTION_SHUTDOWN_KEEP;
|
||||
+ qemuMonitorActionReboot reboot = QEMU_MONITOR_ACTION_REBOOT_KEEP;
|
||||
+ qemuMonitorActionWatchdog watchdog = QEMU_MONITOR_ACTION_WATCHDOG_KEEP;
|
||||
+ qemuMonitorActionPanic panic = QEMU_MONITOR_ACTION_PANIC_KEEP;
|
||||
qemuDomainObjPrivate *priv = 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 != VIR_DOMAIN_LIFECYCLE_REBOOT ||
|
||||
- vm->def->onReboot == action)
|
||||
- return 0;
|
||||
+ switch (type) {
|
||||
+ case VIR_DOMAIN_LIFECYCLE_REBOOT:
|
||||
+ if (vm->def->onReboot == action)
|
||||
+ break;
|
||||
|
||||
+ switch (action) {
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY:
|
||||
+ reboot = QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN;
|
||||
+ break;
|
||||
|
||||
- switch (action) {
|
||||
- case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY:
|
||||
- monReboot = QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN;
|
||||
+ case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART:
|
||||
+ reboot = QEMU_MONITOR_ACTION_REBOOT_RESET;
|
||||
+ 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:
|
||||
+ break;
|
||||
+ }
|
||||
break;
|
||||
|
||||
- case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART:
|
||||
- monReboot = QEMU_MONITOR_ACTION_REBOOT_RESET;
|
||||
+ case VIR_DOMAIN_LIFECYCLE_POWEROFF:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_CRASH:
|
||||
+ case VIR_DOMAIN_LIFECYCLE_LAST:
|
||||
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;
|
||||
}
|
||||
|
||||
+ if (shutdown == QEMU_MONITOR_ACTION_SHUTDOWN_KEEP &&
|
||||
+ reboot == QEMU_MONITOR_ACTION_REBOOT_KEEP &&
|
||||
+ watchdog == QEMU_MONITOR_ACTION_WATCHDOG_KEEP &&
|
||||
+ panic == QEMU_MONITOR_ACTION_PANIC_KEEP)
|
||||
+ return 0;
|
||||
|
||||
qemuDomainObjEnterMonitor(vm);
|
||||
|
||||
- rc = qemuMonitorSetAction(priv->mon,
|
||||
- QEMU_MONITOR_ACTION_SHUTDOWN_KEEP,
|
||||
- monReboot,
|
||||
- QEMU_MONITOR_ACTION_WATCHDOG_KEEP,
|
||||
- QEMU_MONITOR_ACTION_PANIC_KEEP);
|
||||
+ rc = qemuMonitorSetAction(priv->mon, shutdown, reboot, watchdog, panic);
|
||||
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
if (rc < 0)
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,88 @@
|
||||
From fc375cfe35c829e6acbae56e9ad3d47726a78d23 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <fc375cfe35c829e6acbae56e9ad3d47726a78d23.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 21 Jul 2026 14:54:50 +0200
|
||||
Subject: [PATCH] qemuMonitorGuestPanicEventInfoFormatMsg: Directly return
|
||||
message
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Remove the 'ret' variable and format the panic string on a single line.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 3f41645e3d8bf7b589de58d2d5052123a4d6fe9c)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 5ecee978f9..86702f6599 100644
|
||||
--- a/src/qemu/qemu_monitor.c
|
||||
+++ b/src/qemu/qemu_monitor.c
|
||||
@@ -3922,43 +3922,37 @@ qemuMonitorSetBlockThreshold(qemuMonitor *mon,
|
||||
char *
|
||||
qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfo *info)
|
||||
{
|
||||
- char *ret = NULL;
|
||||
-
|
||||
switch (info->type) {
|
||||
case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_HYPERV:
|
||||
- ret = g_strdup_printf("hyper-v: arg1='0x%llx', arg2='0x%llx', "
|
||||
- "arg3='0x%llx', arg4='0x%llx', arg5='0x%llx'",
|
||||
- info->data.hyperv.arg1, info->data.hyperv.arg2,
|
||||
- info->data.hyperv.arg3, info->data.hyperv.arg4,
|
||||
- info->data.hyperv.arg5);
|
||||
+ return g_strdup_printf("hyper-v: arg1='0x%llx', arg2='0x%llx', arg3='0x%llx', arg4='0x%llx', arg5='0x%llx'",
|
||||
+ info->data.hyperv.arg1, info->data.hyperv.arg2,
|
||||
+ info->data.hyperv.arg3, info->data.hyperv.arg4,
|
||||
+ info->data.hyperv.arg5);
|
||||
break;
|
||||
case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_S390:
|
||||
- ret = g_strdup_printf("s390: core='%d' psw-mask='0x%016llx' "
|
||||
- "psw-addr='0x%016llx' reason='%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='%d' psw-mask='0x%016llx' psw-addr='0x%016llx' reason='%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 = g_strdup_printf("tdx: error_code='0x%x' message='%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);
|
||||
+ return g_strdup_printf("tdx: error_code='0x%x' message='%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 = g_strdup_printf("tdx: error_code='0x%x' message='%s'",
|
||||
- info->data.tdx.error_code,
|
||||
- info->data.tdx.message);
|
||||
+ return g_strdup_printf("tdx: error_code='0x%x' message='%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;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,62 @@
|
||||
From 94b9bec5bb85bc828e732e7c88c209b86573c4ab Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <94b9bec5bb85bc828e732e7c88c209b86573c4ab.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 21 Jul 2026 14:55:38 +0200
|
||||
Subject: [PATCH] qemuProcessGuestPanicEventInfo: Fold into only caller
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Move the code directly to the only place that calls this function.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit bf4ace1bca464fe8432c2eb08f5261d6f9bdaf29)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 ddd6e8f7ac..3fd1215006 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -3503,19 +3503,6 @@ doCoreDumpToAutoDumpPath(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
|
||||
-static void
|
||||
-qemuProcessGuestPanicEventInfo(virQEMUDriver *driver,
|
||||
- virDomainObj *vm,
|
||||
- qemuMonitorEventPanicInfo *info)
|
||||
-{
|
||||
- g_autofree char *msg = qemuMonitorGuestPanicEventInfoFormatMsg(info);
|
||||
- g_autofree char *timestamp = virTimeStringNow();
|
||||
-
|
||||
- if (msg && timestamp)
|
||||
- qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", timestamp, msg);
|
||||
-}
|
||||
-
|
||||
-
|
||||
static void
|
||||
processGuestPanicEvent(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
@@ -3536,8 +3523,13 @@ processGuestPanicEvent(virQEMUDriver *driver,
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
- if (info)
|
||||
- qemuProcessGuestPanicEventInfo(driver, vm, info);
|
||||
+ if (info) {
|
||||
+ g_autofree char *msg = qemuMonitorGuestPanicEventInfoFormatMsg(info);
|
||||
+ g_autofree char *timestamp = virTimeStringNow();
|
||||
+
|
||||
+ if (msg && timestamp)
|
||||
+ qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", timestamp, msg);
|
||||
+ }
|
||||
|
||||
virDomainObjSetState(vm, VIR_DOMAIN_CRASHED, VIR_DOMAIN_CRASHED_PANICKED);
|
||||
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,62 @@
|
||||
From 35539a28975b44f5321d204dc20e28c25fc6abae Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <35539a28975b44f5321d204dc20e28c25fc6abae.1787144643.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 20 Jul 2026 13:48:51 +0200
|
||||
Subject: [PATCH] qemuProcessSetupLifecycleActions: Prepare to handle other
|
||||
actions
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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 <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 30a548c894dc2f5787d7004d68b266caa404f6af)
|
||||
|
||||
https://redhat.atlassian.net/browse/RHEL-242546
|
||||
---
|
||||
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 369dbab579..6955e8152c 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -8090,21 +8090,27 @@ qemuProcessSetupLifecycleActions(virDomainObj *vm,
|
||||
virDomainAsyncJob asyncJob)
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
+ qemuMonitorActionShutdown shutdown = QEMU_MONITOR_ACTION_SHUTDOWN_KEEP;
|
||||
+ qemuMonitorActionReboot reboot = QEMU_MONITOR_ACTION_REBOOT_KEEP;
|
||||
+ qemuMonitorActionWatchdog watchdog = QEMU_MONITOR_ACTION_WATCHDOG_KEEP;
|
||||
+ qemuMonitorActionPanic panic = 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 != VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY)
|
||||
+ if (vm->def->onReboot == VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY)
|
||||
+ reboot = QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN;
|
||||
+
|
||||
+ if (shutdown == QEMU_MONITOR_ACTION_SHUTDOWN_KEEP &&
|
||||
+ reboot == QEMU_MONITOR_ACTION_REBOOT_KEEP &&
|
||||
+ watchdog == QEMU_MONITOR_ACTION_WATCHDOG_KEEP &&
|
||||
+ panic == QEMU_MONITOR_ACTION_PANIC_KEEP)
|
||||
return 0;
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(vm, asyncJob) < 0)
|
||||
return -1;
|
||||
|
||||
- rc = qemuMonitorSetAction(priv->mon,
|
||||
- QEMU_MONITOR_ACTION_SHUTDOWN_KEEP,
|
||||
- QEMU_MONITOR_ACTION_REBOOT_SHUTDOWN,
|
||||
- QEMU_MONITOR_ACTION_WATCHDOG_KEEP,
|
||||
- QEMU_MONITOR_ACTION_PANIC_KEEP);
|
||||
+ rc = qemuMonitorSetAction(priv->mon, shutdown, reboot, watchdog, panic);
|
||||
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
if (rc < 0)
|
||||
--
|
||||
2.55.0
|
||||
198
libvirt-qemu_agent-Introduce-guest-get-devices.patch
Normal file
198
libvirt-qemu_agent-Introduce-guest-get-devices.patch
Normal file
@ -0,0 +1,198 @@
|
||||
From 2eed5180fb11ed18a6cb35e77b7904e5af2eaacd Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <2eed5180fb11ed18a6cb35e77b7904e5af2eaacd.1787144643.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Tue, 11 Aug 2026 17:08:05 +0200
|
||||
Subject: [PATCH] qemu_agent: Introduce guest-get-devices
|
||||
|
||||
QEMU agent has 'guest-get-devices` command. Even though it's
|
||||
currently implemented only for Windows, it shows some interesting
|
||||
information from inside the guest, like device drivers, their
|
||||
versions, and so on.
|
||||
|
||||
Looking at the command definition in qga/qapi-schema.json the
|
||||
only non-optional field in returned data is 'driver-name'. The
|
||||
rest is optional. Although looking at the current implementation
|
||||
either all fields are set or device is ignored completely.
|
||||
Nevertheless, our code should follow QMP schema.
|
||||
|
||||
New qemuAgentGuestDeviceInfo structure is introduced among with
|
||||
qemuAgentGetGuestDeviceInfo() function which parses reply from
|
||||
agent and fills the structure. Optional fields are either set to
|
||||
NULL or -1, if missing.
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 7dea038439aa025d18c716e3343d3f0e9ccd672a)
|
||||
|
||||
Conflicts:
|
||||
src/libvirt_private.syms:
|
||||
src/qemu/qemu_agent.c:
|
||||
src/qemu/qemu_agent.h: All three conflicts are due to v12.4.0-rc1~76
|
||||
not being backported (it moved parts of the
|
||||
agent code under src/hypervisor for wider use).
|
||||
|
||||
Resolves: https://redhat.atlassian.net/browse/RHEL-243300
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_agent.c | 119 ++++++++++++++++++++++++++++++++++++++++++
|
||||
src/qemu/qemu_agent.h | 21 ++++++++
|
||||
2 files changed, 140 insertions(+)
|
||||
|
||||
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
|
||||
index ee0921eca6..67faa5aa97 100644
|
||||
--- a/src/qemu/qemu_agent.c
|
||||
+++ b/src/qemu/qemu_agent.c
|
||||
@@ -2599,3 +2599,122 @@ qemuAgentGetLoadAvg(qemuAgent *agent,
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+
|
||||
+void
|
||||
+qemuAgentGuestDeviceInfoFree(qemuAgentGuestDeviceInfo *info)
|
||||
+{
|
||||
+ if (!info)
|
||||
+ return;
|
||||
+
|
||||
+ g_free(info->driverName);
|
||||
+ g_free(info->driverVersion);
|
||||
+ g_free(info->pci);
|
||||
+ g_free(info);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int
|
||||
+qemuAgentGetGuestDeviceInfo(qemuAgent *agent,
|
||||
+ qemuAgentGuestDeviceInfo ***info,
|
||||
+ bool report_unsupported)
|
||||
+{
|
||||
+ g_autoptr(virJSONValue) cmd = NULL;
|
||||
+ g_autoptr(virJSONValue) reply = NULL;
|
||||
+ virJSONValue *data = NULL;
|
||||
+ size_t ndata;
|
||||
+ size_t i;
|
||||
+ int rc;
|
||||
+
|
||||
+ if (!(cmd = qemuAgentMakeCommand("guest-get-devices", NULL)))
|
||||
+ return -1;
|
||||
+
|
||||
+ if ((rc = qemuAgentCommandFull(agent, cmd, &reply, agent->timeout,
|
||||
+ report_unsupported)) < 0)
|
||||
+ return rc;
|
||||
+
|
||||
+ if (!(data = virJSONValueObjectGetArray(reply, "return"))) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("qemu agent didn't return an array of devices"));
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ ndata = virJSONValueArraySize(data);
|
||||
+
|
||||
+ *info = g_new0(qemuAgentGuestDeviceInfo *, ndata);
|
||||
+
|
||||
+ for (i = 0; i < ndata; i++) {
|
||||
+ g_autoptr(qemuAgentGuestDeviceInfo) oneInfo = NULL;
|
||||
+ virJSONValue *entry = virJSONValueArrayGet(data, i);
|
||||
+ virJSONValue *dDate = NULL;
|
||||
+ virJSONValue *idObj = NULL;
|
||||
+
|
||||
+ if (!entry) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("array element missing in guest-get-devices return value"));
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ oneInfo = g_new0(qemuAgentGuestDeviceInfo, 1);
|
||||
+
|
||||
+ oneInfo->driverName = g_strdup(virJSONValueObjectGetString(entry, "driver-name"));
|
||||
+ if (!oneInfo->driverName) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("'driver-name' missing in reply of guest-get-devices"));
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if ((dDate = virJSONValueObjectGet(entry, "driver-date"))) {
|
||||
+ if (virJSONValueGetNumberLong(dDate, &oneInfo->driverDate) < 0) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("malformed 'driver-date' in reply of guest-get-devices"));
|
||||
+ goto error;
|
||||
+ }
|
||||
+ } else {
|
||||
+ oneInfo->driverDate = -1;
|
||||
+ }
|
||||
+
|
||||
+ oneInfo->driverVersion = g_strdup(virJSONValueObjectGetString(entry, "driver-version"));
|
||||
+
|
||||
+ if ((idObj = virJSONValueObjectGet(entry, "id"))) {
|
||||
+ const char *type = NULL;
|
||||
+
|
||||
+ if (!(type = virJSONValueObjectGetString(idObj, "type"))) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("missing 'type' in reply of guest-get-devices"));
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (STREQ("pci", type)) {
|
||||
+ g_autofree qemuAgentGuestDeviceInfoPCI *pci = NULL;
|
||||
+
|
||||
+ pci = g_new0(qemuAgentGuestDeviceInfoPCI, 1);
|
||||
+
|
||||
+ if (virJSONValueObjectGetNumberUint(idObj, "vendor-id", &pci->vendorID) < 0) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("missing or malformed 'vendor-id' in reply of guest-get-devices"));
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (virJSONValueObjectGetNumberUint(idObj, "device-id", &pci->deviceID) < 0) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("missing or malformed 'device-id' in reply of guest-get-devices"));
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ oneInfo->pci = g_steal_pointer(&pci);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ (*info)[i] = g_steal_pointer(&oneInfo);
|
||||
+ }
|
||||
+
|
||||
+ return ndata;
|
||||
+
|
||||
+ error:
|
||||
+ for (i = 0; i < ndata; i++) {
|
||||
+ qemuAgentGuestDeviceInfoFree((*info)[i]);
|
||||
+ }
|
||||
+ g_clear_pointer(info, g_free);
|
||||
+ return -1;
|
||||
+}
|
||||
diff --git a/src/qemu/qemu_agent.h b/src/qemu/qemu_agent.h
|
||||
index 860f19b6bd..a6be2ff387 100644
|
||||
--- a/src/qemu/qemu_agent.h
|
||||
+++ b/src/qemu/qemu_agent.h
|
||||
@@ -195,3 +195,24 @@ int qemuAgentGetLoadAvg(qemuAgent *agent,
|
||||
double *load5m,
|
||||
double *load15m,
|
||||
bool report_unsupported);
|
||||
+
|
||||
+typedef struct _qemuAgentGuestDeviceInfoPCI qemuAgentGuestDeviceInfoPCI;
|
||||
+struct _qemuAgentGuestDeviceInfoPCI {
|
||||
+ unsigned int vendorID;
|
||||
+ unsigned int deviceID;
|
||||
+};
|
||||
+
|
||||
+typedef struct _qemuAgentGuestDeviceInfo qemuAgentGuestDeviceInfo;
|
||||
+struct _qemuAgentGuestDeviceInfo {
|
||||
+ char *driverName;
|
||||
+ long long driverDate; /* In nanoseconds since the epoch */
|
||||
+ char *driverVersion;
|
||||
+ qemuAgentGuestDeviceInfoPCI *pci;
|
||||
+};
|
||||
+
|
||||
+void qemuAgentGuestDeviceInfoFree(qemuAgentGuestDeviceInfo *info);
|
||||
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuAgentGuestDeviceInfo, qemuAgentGuestDeviceInfoFree);
|
||||
+
|
||||
+int qemuAgentGetGuestDeviceInfo(qemuAgent *agent,
|
||||
+ qemuAgentGuestDeviceInfo ***info,
|
||||
+ bool report_unsupported);
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,164 @@
|
||||
From bab073ee5a84722b4f49b5f66d5a5bef0eee4858 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <bab073ee5a84722b4f49b5f66d5a5bef0eee4858.1787144643.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 12 Aug 2026 14:08:37 +0200
|
||||
Subject: [PATCH] qemuagenttest: Introduce GetGuestDeviceInfo test case
|
||||
|
||||
Introduce a test case for newly introduced
|
||||
qemuAgentGetGuestDeviceInfo(). The expected data started as a
|
||||
genuine reply from a qemu-ga running inside a Windows VM. But
|
||||
then was modified to cover more cases (like an optional key
|
||||
missing).
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit c56a2479ab59167af6cc9094981ef6e1c0a83a01)
|
||||
Resolves: https://redhat.atlassian.net/browse/RHEL-243300
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
tests/qemuagenttest.c | 123 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 123 insertions(+)
|
||||
|
||||
diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c
|
||||
index 9c64ed3c5f..612ecb976b 100644
|
||||
--- a/tests/qemuagenttest.c
|
||||
+++ b/tests/qemuagenttest.c
|
||||
@@ -1394,6 +1394,128 @@ testQemuAgentGetLoadAvg(const void *data)
|
||||
}
|
||||
|
||||
|
||||
+static const char *testQemuAgentGetGuestDeviceInfoResponse =
|
||||
+"{"
|
||||
+" \"return\": ["
|
||||
+" {"
|
||||
+" \"driver-date\": 1736726400000000000,"
|
||||
+" \"driver-name\": \"Red Hat VirtIO Ethernet Adapter\","
|
||||
+" \"driver-version\": \"100.100.104.27100\","
|
||||
+" \"id\": {"
|
||||
+" \"device-id\": 4161,"
|
||||
+" \"vendor-id\": 6900,"
|
||||
+" \"type\": \"pci\""
|
||||
+" }"
|
||||
+" },"
|
||||
+" {"
|
||||
+" \"driver-name\": \"VirtIO Serial Driver\","
|
||||
+" \"driver-version\": \"100.100.104.27100\","
|
||||
+" \"id\": {"
|
||||
+" \"device-id\": 4163,"
|
||||
+" \"vendor-id\": 6900,"
|
||||
+" \"type\": \"pci\""
|
||||
+" }"
|
||||
+" },"
|
||||
+" {"
|
||||
+" \"driver-date\": 1736726400000000000,"
|
||||
+" \"driver-name\": \"VirtIO Balloon Driver\","
|
||||
+" \"id\": {"
|
||||
+" \"device-id\": 4165,"
|
||||
+" \"vendor-id\": 6900,"
|
||||
+" \"type\": \"pci\""
|
||||
+" }"
|
||||
+" },"
|
||||
+" {"
|
||||
+" \"driver-date\": 1736726400000000000,"
|
||||
+" \"driver-name\": \"Red Hat VirtIO GPU DOD controller\","
|
||||
+" \"driver-version\": \"100.100.104.27100\""
|
||||
+" }"
|
||||
+" ]"
|
||||
+"}";
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+testQemuAgentGetGuestDeviceInfo(const void *data)
|
||||
+{
|
||||
+ virDomainXMLOption *xmlopt = (virDomainXMLOption *)data;
|
||||
+ g_autoptr(qemuMonitorTest) test = qemuMonitorTestNewAgent(xmlopt);
|
||||
+ qemuAgentGuestDeviceInfo **devices = NULL;
|
||||
+ int ret = -1;
|
||||
+ size_t i;
|
||||
+ int ndevices;
|
||||
+
|
||||
+ if (!test)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (qemuMonitorTestAddAgentSyncResponse(test) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (qemuMonitorTestAddItem(test, "guest-get-devices",
|
||||
+ testQemuAgentGetGuestDeviceInfoResponse) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ndevices = qemuAgentGetGuestDeviceInfo(qemuMonitorTestGetAgent(test),
|
||||
+ &devices, true);
|
||||
+
|
||||
+ if (ndevices < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (ndevices != 4) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ "unexpected number of guest devices returned (%d), expected 4",
|
||||
+ ndevices);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (STRNEQ(devices[0]->driverName, "Red Hat VirtIO Ethernet Adapter") ||
|
||||
+ STRNEQ(devices[0]->driverVersion, "100.100.104.27100") ||
|
||||
+ devices[0]->driverDate != 1736726400000000000LL ||
|
||||
+ devices[0]->pci->vendorID != 6900 ||
|
||||
+ devices[0]->pci->deviceID != 4161) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ "unexpected device info returned for device #0");
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (STRNEQ(devices[1]->driverName, "VirtIO Serial Driver") ||
|
||||
+ STRNEQ(devices[1]->driverVersion, "100.100.104.27100") ||
|
||||
+ devices[1]->driverDate != -1LL ||
|
||||
+ devices[1]->pci->vendorID != 6900 ||
|
||||
+ devices[1]->pci->deviceID != 4163) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ "unexpected device info returned for device #1");
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (STRNEQ(devices[2]->driverName, "VirtIO Balloon Driver") ||
|
||||
+ devices[2]->driverVersion ||
|
||||
+ devices[2]->driverDate != 1736726400000000000LL ||
|
||||
+ devices[2]->pci->vendorID != 6900 ||
|
||||
+ devices[2]->pci->deviceID != 4165) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ "unexpected device info returned for device #2");
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (STRNEQ(devices[3]->driverName, "Red Hat VirtIO GPU DOD controller") ||
|
||||
+ STRNEQ(devices[3]->driverVersion, "100.100.104.27100") ||
|
||||
+ devices[3]->driverDate != 1736726400000000000LL ||
|
||||
+ devices[3]->pci) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ "unexpected device info returned for device #3");
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ ret = 0;
|
||||
+ cleanup:
|
||||
+ for (i = 0; i < ndevices; i++) {
|
||||
+ qemuAgentGuestDeviceInfoFree(devices[i]);
|
||||
+ }
|
||||
+ g_free(devices);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int
|
||||
mymain(void)
|
||||
{
|
||||
@@ -1431,6 +1553,7 @@ mymain(void)
|
||||
DO_TEST(SSHKeys);
|
||||
DO_TEST(GetDisks);
|
||||
DO_TEST(GetLoadAvg);
|
||||
+ DO_TEST(GetGuestDeviceInfo);
|
||||
|
||||
DO_TEST(Timeout); /* Timeout should always be called last */
|
||||
|
||||
--
|
||||
2.55.0
|
||||
@ -0,0 +1,88 @@
|
||||
From da0e42a5461bc4457f2c05eb4aeb1b40143e4288 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <da0e42a5461bc4457f2c05eb4aeb1b40143e4288.1787144643.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 12 Aug 2026 15:11:20 +0200
|
||||
Subject: [PATCH] virsh: Add support for VIR_DOMAIN_GUEST_INFO_DEVICES
|
||||
|
||||
The virDomainGetGuestInfo() API is exposed as 'guestinfo'
|
||||
command. Introduce new --devices option for it to reflect
|
||||
introduction of VIR_DOMAIN_GUEST_INFO_DEVICES type.
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit a634a99a07cf510658939164b6982297789025b8)
|
||||
Resolves: https://redhat.atlassian.net/browse/RHEL-243300
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
docs/manpages/virsh.rst | 17 +++++++++++++----
|
||||
tools/virsh-domain.c | 6 ++++++
|
||||
2 files changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
|
||||
index 2936df6a73..d8c6c716df 100644
|
||||
--- a/docs/manpages/virsh.rst
|
||||
+++ b/docs/manpages/virsh.rst
|
||||
@@ -3227,7 +3227,7 @@ guestinfo
|
||||
::
|
||||
|
||||
guestinfo domain [--user] [--os] [--timezone] [--hostname] [--filesystem]
|
||||
- [--disk] [--interface]
|
||||
+ [--disk] [--interface] [--devices]
|
||||
|
||||
Print information about the guest from the point of view of the guest agent.
|
||||
Note that this command requires a guest agent to be configured and running in
|
||||
@@ -3239,9 +3239,9 @@ Success is always reported in this case.
|
||||
|
||||
You can limit the types of information that are returned by specifying one or
|
||||
more flags. Available information types flags are *--user*, *--os*,
|
||||
-*--timezone*, *--hostname*, *--filesystem*, *--disk*, *--interface* and *--load*.
|
||||
-If an explicitly requested information type is not supported by the guest agent
|
||||
-at that point, the processes will provide an exit code of 1.
|
||||
+*--timezone*, *--hostname*, *--filesystem*, *--disk*, *--interface*, *--load*
|
||||
+and *--devices*. If an explicitly requested information type is not supported
|
||||
+by the guest agent at that point, the processes will provide an exit code of 1.
|
||||
|
||||
Note that depending on the hypervisor type and the version of the guest agent
|
||||
running within the domain, not all of the following information may be
|
||||
@@ -3324,6 +3324,15 @@ returned:
|
||||
* ``load.5m`` - average load in guest for last 5 minutes
|
||||
* ``load.15m`` - average load in guest for last 15 minutes
|
||||
|
||||
+*--devices* returns:
|
||||
+* ``device.count`` - the number of devices that info is returned for
|
||||
+* ``device.<num>.driverName`` - name of the driver associated with device
|
||||
+* ``device.<num>.driverDate`` - driver release date in seconds since the epoch
|
||||
+* ``device.<num>.driverVersion`` - version of the driver associated with the device
|
||||
+* ``device.<num>.idType`` - device identification type (e.g. pci)
|
||||
+* ``device.<num>.pciVendor`` - vendor ID for PCI device (in decimal)
|
||||
+* ``device.<num>.pciDevice`` - device ID for PCI device (in decimal)
|
||||
+
|
||||
|
||||
guestvcpus
|
||||
----------
|
||||
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
|
||||
index 536c0350c7..7b3e476beb 100644
|
||||
--- a/tools/virsh-domain.c
|
||||
+++ b/tools/virsh-domain.c
|
||||
@@ -13583,6 +13583,10 @@ static const vshCmdOptDef opts_guestinfo[] = {
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("report load averages information"),
|
||||
},
|
||||
+ {.name = "devices",
|
||||
+ .type = VSH_OT_BOOL,
|
||||
+ .help = N_("report devices information"),
|
||||
+ },
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
@@ -13612,6 +13616,8 @@ cmdGuestInfo(vshControl *ctl, const vshCmd *cmd)
|
||||
types |= VIR_DOMAIN_GUEST_INFO_INTERFACES;
|
||||
if (vshCommandOptBool(cmd, "load"))
|
||||
types |= VIR_DOMAIN_GUEST_INFO_LOAD;
|
||||
+ if (vshCommandOptBool(cmd, "devices"))
|
||||
+ types |= VIR_DOMAIN_GUEST_INFO_DEVICES;
|
||||
|
||||
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
||||
return false;
|
||||
--
|
||||
2.55.0
|
||||
42
libvirt.spec
42
libvirt.spec
@ -294,7 +294,7 @@
|
||||
Summary: Library providing a simple virtualization API
|
||||
Name: libvirt
|
||||
Version: 11.10.0
|
||||
Release: 17%{?dist}%{?extra_release}
|
||||
Release: 18%{?dist}%{?extra_release}
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
||||
URL: https://libvirt.org/
|
||||
|
||||
@ -445,6 +445,25 @@ Patch140: libvirt-qemu-Remove-qemuDomainSupportsVideoVga.patch
|
||||
Patch141: libvirt-conf-schemas-Allow-.-in-schema-for-CPU-flag-name.patch
|
||||
Patch142: libvirt-tests-capabilityschemadata-Add-a-real-test-example.patch
|
||||
Patch143: libvirt-util-virFileChownFiles-do-not-follow-symlinks.patch
|
||||
Patch144: libvirt-qemu-Always-assume-support-for-QEMU_CAPS_SET_ACTION.patch
|
||||
Patch145: libvirt-qemu-Remove-unused-qemuProcessRebootAllowed.patch
|
||||
Patch146: libvirt-qemu-monitor-Remove-support-for-watchdog-set-action.patch
|
||||
Patch147: libvirt-qemu-Remove-allowReboot-field.patch
|
||||
Patch148: libvirt-qemu-capabilities-Retire-QEMU_CAPS_SET_ACTION.patch
|
||||
Patch149: libvirt-qemuProcessSetupLifecycleActions-Prepare-to-handle-other-actions.patch
|
||||
Patch150: libvirt-qemuDomainModifyLifecycleActionLive-Prepare-to-handle-other-actions.patch
|
||||
Patch151: libvirt-processGuestPanicEvent-Don-t-pass-panic-action-via-parameter.patch
|
||||
Patch152: libvirt-conf-Use-proper-enum-types-for-onReboot-onPoweroff-onCrash-and-onLockFailure.patch
|
||||
Patch153: libvirt-qemuMonitorGuestPanicEventInfoFormatMsg-Directly-return-message.patch
|
||||
Patch154: libvirt-qemuProcessGuestPanicEventInfo-Fold-into-only-caller.patch
|
||||
Patch155: libvirt-qemu-processGuestPanicEvent-Split-individual-steps-under-separate-conditions.patch
|
||||
Patch156: libvirt-Add-support-for-keeping-VM-running-when-panic-notifier-is-used.patch
|
||||
Patch157: libvirt-qemu-Fix-proper-ordering-of-virtlockd-shutdown.patch
|
||||
Patch158: libvirt-Add-guest-device-info-to-virDomainGetGuestInfo.patch
|
||||
Patch159: libvirt-qemu_agent-Introduce-guest-get-devices.patch
|
||||
Patch160: libvirt-qemuagenttest-Introduce-GetGuestDeviceInfo-test-case.patch
|
||||
Patch161: libvirt-qemu-Implement-device-info-for-virDomainGetGuestInfo-API.patch
|
||||
Patch162: libvirt-virsh-Add-support-for-VIR_DOMAIN_GUEST_INFO_DEVICES.patch
|
||||
|
||||
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
@ -2836,6 +2855,27 @@ exit 0
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Aug 19 2026 Jiri Denemark <jdenemar@redhat.com> - 11.10.0-18
|
||||
- qemu: Always assume support for 'QEMU_CAPS_SET_ACTION' (RHEL-242546)
|
||||
- qemu: Remove unused 'qemuProcessRebootAllowed' (RHEL-242546)
|
||||
- qemu: monitor: Remove support for 'watchdog-set-action' (RHEL-242546)
|
||||
- qemu: Remove 'allowReboot' field (RHEL-242546)
|
||||
- qemu: capabilities: Retire QEMU_CAPS_SET_ACTION (RHEL-242546)
|
||||
- qemuProcessSetupLifecycleActions: Prepare to handle other actions (RHEL-242546)
|
||||
- qemuDomainModifyLifecycleActionLive: Prepare to handle other actions (RHEL-242546)
|
||||
- processGuestPanicEvent: Don't pass panic action via parameter (RHEL-242546)
|
||||
- conf: Use proper enum types for 'onReboot', 'onPoweroff', 'onCrash', and 'onLockFailure' (RHEL-242546)
|
||||
- qemuMonitorGuestPanicEventInfoFormatMsg: Directly return message (RHEL-242546)
|
||||
- qemuProcessGuestPanicEventInfo: Fold into only caller (RHEL-242546)
|
||||
- qemu: processGuestPanicEvent: Split individual steps under separate conditions (RHEL-242546)
|
||||
- Add support for keeping VM running when panic notifier is used (RHEL-242546)
|
||||
- qemu: Fix proper ordering of 'virtlockd' shutdown (RHEL-180876)
|
||||
- Add guest device info to virDomainGetGuestInfo (RHEL-243300)
|
||||
- qemu_agent: Introduce guest-get-devices (RHEL-243300)
|
||||
- qemuagenttest: Introduce GetGuestDeviceInfo test case (RHEL-243300)
|
||||
- qemu: Implement device info for virDomainGetGuestInfo() API (RHEL-243300)
|
||||
- virsh: Add support for VIR_DOMAIN_GUEST_INFO_DEVICES (RHEL-243300)
|
||||
|
||||
* Fri Aug 14 2026 Jiri Denemark <jdenemar@redhat.com> - 11.10.0-17
|
||||
- conf: schemas: Allow '.' in schema for CPU flag name (RHEL-222551)
|
||||
- tests: capabilityschemadata: Add a real test example (RHEL-222551)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user