diff --git a/libvirt-Add-load-average-information-type-into-virDomainGetGuestInfo.patch b/libvirt-Add-load-average-information-type-into-virDomainGetGuestInfo.patch deleted file mode 100644 index 224dd74..0000000 --- a/libvirt-Add-load-average-information-type-into-virDomainGetGuestInfo.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 9874072fc9396d609f1a0213bb06fa7e9a2fa019 Mon Sep 17 00:00:00 2001 -Message-ID: <9874072fc9396d609f1a0213bb06fa7e9a2fa019.1747908717.git.jdenemar@redhat.com> -From: Martin Kletzander -Date: Tue, 25 Feb 2025 15:36:03 +0100 -Subject: [PATCH] Add load average information type into virDomainGetGuestInfo - -The public API part. - -Signed-off-by: Martin Kletzander -Reviewed-by: Peter Krempa -(cherry picked from commit c52c449fd40c7263896d5f17129207b815c3a09c) - -https://issues.redhat.com/browse/RHEL-88447 - -Signed-off-by: Martin Kletzander ---- - include/libvirt/libvirt-domain.h | 1 + - src/libvirt-domain.c | 8 ++++++++ - 2 files changed, 9 insertions(+) - -diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h -index f026ce197c..c04b696f03 100644 ---- a/include/libvirt/libvirt-domain.h -+++ b/include/libvirt/libvirt-domain.h -@@ -6425,6 +6425,7 @@ typedef enum { - VIR_DOMAIN_GUEST_INFO_FILESYSTEM = (1 << 4), /* return filesystem information (Since: 5.7.0) */ - 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) */ - } virDomainGuestInfoTypes; - - int virDomainGetGuestInfo(virDomainPtr domain, -diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c -index 7c6b93963c..24752a9888 100644 ---- a/src/libvirt-domain.c -+++ b/src/libvirt-domain.c -@@ -13292,6 +13292,14 @@ virDomainSetVcpu(virDomainPtr domain, - * "if..addr..addr" - the IP address of addr - * "if..addr..prefix" - the prefix of IP address of addr - * -+ * VIR_DOMAIN_GUEST_INFO_LOAD: -+ * Returns load (the number of processes in the runqueue or waiting for disk -+ * I/O) as double values: -+ * -+ * "load.1m" - load averaged over 1 minute -+ * "load.5m" - load averaged over 5 minutes -+ * "load.15m" - load averaged over 15 minutes -+ * - * Using 0 for @types returns all information groups supported by the given - * hypervisor. - * --- -2.49.0 diff --git a/libvirt-build-Bump-minimum-glib2-version-to-2.66.0.patch b/libvirt-build-Bump-minimum-glib2-version-to-2.66.0.patch deleted file mode 100644 index d1f76c1..0000000 --- a/libvirt-build-Bump-minimum-glib2-version-to-2.66.0.patch +++ /dev/null @@ -1,286 +0,0 @@ -From 5e88ca84d3988e7943cace7b53cd1a249c55a99b Mon Sep 17 00:00:00 2001 -Message-ID: <5e88ca84d3988e7943cace7b53cd1a249c55a99b.1738940190.git.jdenemar@redhat.com> -From: Peter Krempa -Date: Mon, 27 Jan 2025 17:42:34 +0100 -Subject: [PATCH] build: Bump minimum glib2 version to 2.66.0 - -Per our supported platforms the minimum available versions are: - - CentOS Stream 9: 2.68.4 - Debian 11: 2.66.8 - Fedora 39: 2.78.6 - openSUSE Leap 15.6: 2.78.6 - Ubuntu 22.04: 2.72.4 - FreeBSD ports: 2.80.5 - macOS homebrew: 2.82.4 - macOS macports: 2.78.4 - -Bump to 2.66 which is limited by Debian 11. While ideally we'd bump to -2.68 which would give us 'g_strv_builder' and friends 2.66 is enough for -g_ptr_array_steal() which can be used to emulate the former with almost -no extra code. - -Signed-off-by: Peter Krempa -Reviewed-by: Pavel Hrdina -(cherry picked from commit 420c39d6bd66ccf4841878882f5a3e9e47103ebb) - -https://issues.redhat.com/browse/RHEL-77884 ---- - libvirt.spec.in | 2 +- - meson.build | 2 +- - src/libvirt_private.syms | 4 -- - src/qemu/qemu_agent.c | 2 +- - src/qemu/qemu_monitor.c | 2 +- - src/util/glibcompat.c | 94 ---------------------------------------- - src/util/glibcompat.h | 18 -------- - src/util/vireventglib.c | 12 ++--- - 8 files changed, 10 insertions(+), 126 deletions(-) - -diff --git a/meson.build b/meson.build -index 89ac1594cb..d3e2c939ea 100644 ---- a/meson.build -+++ b/meson.build -@@ -998,7 +998,7 @@ else - endif - endif - --glib_version = '2.58.0' -+glib_version = '2.66.0' - glib_dep = dependency('glib-2.0', version: '>=' + glib_version) - gobject_dep = dependency('gobject-2.0', version: '>=' + glib_version) - if host_machine.system() == 'windows' -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index c931003fad..43e2dfb9cd 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -1871,10 +1871,6 @@ virStorageSourceUpdatePhysicalSize; - - - # util/glibcompat.h --vir_g_fsync; --vir_g_source_unref; --vir_g_strdup_printf; --vir_g_strdup_vprintf; - vir_g_string_replace; - - -diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c -index 22359f8518..43fca86f10 100644 ---- a/src/qemu/qemu_agent.c -+++ b/src/qemu/qemu_agent.c -@@ -448,7 +448,7 @@ qemuAgentUnregister(qemuAgent *agent) - { - if (agent->watch) { - g_source_destroy(agent->watch); -- vir_g_source_unref(agent->watch, agent->context); -+ g_source_unref(agent->watch); - agent->watch = NULL; - } - } -diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c -index 73f37d26eb..79bd91b539 100644 ---- a/src/qemu/qemu_monitor.c -+++ b/src/qemu/qemu_monitor.c -@@ -745,7 +745,7 @@ qemuMonitorUnregister(qemuMonitor *mon) - { - if (mon->watch) { - g_source_destroy(mon->watch); -- vir_g_source_unref(mon->watch, mon->context); -+ g_source_unref(mon->watch); - mon->watch = NULL; - } - } -diff --git a/src/util/glibcompat.c b/src/util/glibcompat.c -index 98dcfab389..bcb666992a 100644 ---- a/src/util/glibcompat.c -+++ b/src/util/glibcompat.c -@@ -63,100 +63,6 @@ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" - --#undef g_fsync --#undef g_strdup_printf --#undef g_strdup_vprintf -- -- --/* Drop when min glib >= 2.63.0 */ --gint --vir_g_fsync(gint fd) --{ --#ifdef G_OS_WIN32 -- return _commit(fd); --#else -- return fsync(fd); --#endif --} -- -- --/* Due to a bug in glib, g_strdup_printf() nor g_strdup_vprintf() -- * abort on OOM. It's fixed in glib's upstream. Provide our own -- * implementation until the fix gets distributed. */ --char * --vir_g_strdup_printf(const char *msg, ...) --{ -- va_list args; -- char *ret; -- va_start(args, msg); -- ret = g_strdup_vprintf(msg, args); -- if (!ret) -- abort(); -- va_end(args); -- return ret; --} -- -- --char * --vir_g_strdup_vprintf(const char *msg, va_list args) --{ -- char *ret; -- ret = g_strdup_vprintf(msg, args); -- if (!ret) -- abort(); -- return ret; --} -- -- --/* -- * If the last reference to a GSource is released in a non-main -- * thread we're exposed to a race condition that causes a -- * crash: -- * -- * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1358 -- * -- * Thus we're using an idle func to release our ref... -- * -- * ...but this imposes a significant performance penalty on -- * I/O intensive workloads which are sensitive to the iterations -- * of the event loop, so avoid the workaround if we know we have -- * new enough glib. -- * -- * The function below is used from a header file definition. -- * -- * Drop when min glib >= 2.64.0 -- */ --#if GLIB_CHECK_VERSION(2, 64, 0) --void vir_g_source_unref(GSource *src, GMainContext *ctx G_GNUC_UNUSED) --{ -- g_source_unref(src); --} --#else -- --static gboolean --virEventGLibSourceUnrefIdle(gpointer data) --{ -- GSource *src = data; -- -- g_source_unref(src); -- -- return FALSE; --} -- --void vir_g_source_unref(GSource *src, GMainContext *ctx) --{ -- GSource *idle = g_idle_source_new(); -- -- g_source_set_callback(idle, virEventGLibSourceUnrefIdle, src, NULL); -- -- g_source_attach(idle, ctx); -- -- g_source_unref(idle); --} -- --#endif -- -- - /** - * Adapted (to pass syntax check) from 'g_string_replace' from - * glib-2.81.1. Drop once minimum glib is bumped to 2.68. -diff --git a/src/util/glibcompat.h b/src/util/glibcompat.h -index 474ff95bc5..a3d01089e6 100644 ---- a/src/util/glibcompat.h -+++ b/src/util/glibcompat.h -@@ -42,24 +42,6 @@ - - #endif /* GLib < 2.67.0 */ - -- --gint vir_g_fsync(gint fd); --char *vir_g_strdup_printf(const char *msg, ...) -- G_GNUC_PRINTF(1, 2); --char *vir_g_strdup_vprintf(const char *msg, va_list args) -- G_GNUC_PRINTF(1, 0); -- --#if !GLIB_CHECK_VERSION(2, 64, 0) --# define g_strdup_printf vir_g_strdup_printf --# define g_strdup_vprintf vir_g_strdup_vprintf --#endif -- --#undef g_fsync --#define g_fsync vir_g_fsync -- --void vir_g_source_unref(GSource *src, GMainContext *ctx); -- -- - /* Drop once we require glib-2.68 at minimum */ - guint - vir_g_string_replace(GString *string, -diff --git a/src/util/vireventglib.c b/src/util/vireventglib.c -index 023dc37445..6c54f62123 100644 ---- a/src/util/vireventglib.c -+++ b/src/util/vireventglib.c -@@ -213,7 +213,7 @@ virEventGLibHandleUpdate(int watch, - if (data->source != NULL) { - VIR_DEBUG("Removed old handle source=%p", data->source); - g_source_destroy(data->source); -- vir_g_source_unref(data->source, NULL); -+ g_source_unref(data->source); - } - - data->source = virEventGLibAddSocketWatch( -@@ -227,7 +227,7 @@ virEventGLibHandleUpdate(int watch, - - VIR_DEBUG("Removed old handle source=%p", data->source); - g_source_destroy(data->source); -- vir_g_source_unref(data->source, NULL); -+ g_source_unref(data->source); - data->source = NULL; - data->events = 0; - } -@@ -276,7 +276,7 @@ virEventGLibHandleRemove(int watch) - - if (data->source != NULL) { - g_source_destroy(data->source); -- vir_g_source_unref(data->source, NULL); -+ g_source_unref(data->source); - data->source = NULL; - data->events = 0; - } -@@ -409,7 +409,7 @@ virEventGLibTimeoutUpdate(int timer, - if (interval >= 0) { - if (data->source != NULL) { - g_source_destroy(data->source); -- vir_g_source_unref(data->source, NULL); -+ g_source_unref(data->source); - } - - data->interval = interval; -@@ -419,7 +419,7 @@ virEventGLibTimeoutUpdate(int timer, - goto cleanup; - - g_source_destroy(data->source); -- vir_g_source_unref(data->source, NULL); -+ g_source_unref(data->source); - data->source = NULL; - } - -@@ -468,7 +468,7 @@ virEventGLibTimeoutRemove(int timer) - - if (data->source != NULL) { - g_source_destroy(data->source); -- vir_g_source_unref(data->source, NULL); -+ g_source_unref(data->source); - data->source = NULL; - } - --- -2.48.1 diff --git a/libvirt-conf-Adjust-hyperv-tlbflush-formatting.patch b/libvirt-conf-Adjust-hyperv-tlbflush-formatting.patch deleted file mode 100644 index e2fc32d..0000000 --- a/libvirt-conf-Adjust-hyperv-tlbflush-formatting.patch +++ /dev/null @@ -1,72 +0,0 @@ -From e34ac564b018b166a7d6f955f2abe80a9e62f07e Mon Sep 17 00:00:00 2001 -Message-ID: -From: Martin Kletzander -Date: Mon, 6 Jan 2025 16:11:01 +0100 -Subject: [PATCH] conf: Adjust hyperv tlbflush formatting -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit 247357cc292a added support for direct and extended modes for -tlbflush, but forgot to do the formatting as well. - -Signed-off-by: Martin Kletzander -Signed-off-by: Ján Tomko -Reviewed-by: Martin Kletzander -(cherry picked from commit 9df14f51735eeb4221a25ccd408a2dccf0a35b59) - -https://issues.redhat.com/browse/RHEL-7122 - -Signed-off-by: Martin Kletzander ---- - src/conf/domain_conf.c | 11 ++++++++++- - tests/qemuxmlconfdata/hyperv.x86_64-latest.xml | 5 ++++- - 2 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index c8254d2146..1f0b67ca28 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -27974,7 +27974,6 @@ virDomainDefFormatFeatures(virBuffer *buf, - case VIR_DOMAIN_HYPERV_RESET: - case VIR_DOMAIN_HYPERV_FREQUENCIES: - case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: -- case VIR_DOMAIN_HYPERV_TLBFLUSH: - case VIR_DOMAIN_HYPERV_IPI: - case VIR_DOMAIN_HYPERV_EVMCS: - case VIR_DOMAIN_HYPERV_AVIC: -@@ -28004,6 +28003,16 @@ virDomainDefFormatFeatures(virBuffer *buf, - } - break; - -+ case VIR_DOMAIN_HYPERV_TLBFLUSH: -+ if (def->hyperv_features[j] != VIR_TRISTATE_SWITCH_ON) -+ break; -+ -+ if (def->hyperv_tlbflush_direct == VIR_TRISTATE_SWITCH_ON) -+ virBufferAddLit(&hypervChildBuf, "\n"); -+ if (def->hyperv_tlbflush_extended == VIR_TRISTATE_SWITCH_ON) -+ virBufferAddLit(&hypervChildBuf, "\n"); -+ break; -+ - case VIR_DOMAIN_HYPERV_LAST: - break; - } -diff --git a/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml b/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml -index 36d9161fa8..49537188af 100644 ---- a/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml -+++ b/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml -@@ -22,7 +22,10 @@ - - - -- -+ -+ -+ -+ - - - --- -2.47.1 diff --git a/libvirt-conf-add-deprecated_features-attribute.patch b/libvirt-conf-add-deprecated_features-attribute.patch deleted file mode 100644 index 11fdd08..0000000 --- a/libvirt-conf-add-deprecated_features-attribute.patch +++ /dev/null @@ -1,280 +0,0 @@ -From 4c66a653f02c8259fdcf72fdcd801b594f73183e Mon Sep 17 00:00:00 2001 -Message-ID: <4c66a653f02c8259fdcf72fdcd801b594f73183e.1749039441.git.jdenemar@redhat.com> -From: Collin Walling -Date: Mon, 16 Dec 2024 18:03:58 -0500 -Subject: [PATCH] conf: add deprecated_features attribute - -Add a new a attribute, deprecated_features='on|off' to the -element. This is used to toggle features flagged as deprecated on the -CPU model on or off. When this attribute is paired with 'on', -deprecated features will not be filtered. When paired with 'off', any -CPU features that are flagged as deprecated will be listed under the -CPU model with the 'disable' policy. - -Example: - - - -The absence of this attribute is equivalent to the 'on' option. - -The deprecated features that will populate the domain XML are the same -features that result in the virsh domcapabilities command with the ---disable-deprecated-features argument present. - -It is recommended to define a domain XML with this attribute set to -'off' to ensure migration to machines that may outright drop these -features in the future. - -Signed-off-by: Collin Walling -Reviewed-by: Jiri Denemark -(cherry picked from commit 62658bbf060784c757f96c9de3935f27885834aa) -JIRA: https://issues.redhat.com/browse/RHEL-89415 -Signed-off-by: Thomas Huth ---- - src/conf/cpu_conf.c | 11 +++++++ - src/conf/cpu_conf.h | 1 + - src/conf/schemas/cputypes.rng | 5 +++ - src/qemu/qemu_process.c | 11 +++++++ - ...el-deprecated-features-off.s390x-8.2.0.err | 1 + - ...el-deprecated-features-off.s390x-8.2.0.xml | 25 +++++++++++++++ - ...-deprecated-features-off.s390x-latest.args | 32 +++++++++++++++++++ - ...l-deprecated-features-off.s390x-latest.xml | 25 +++++++++++++++ - .../cpu-model-deprecated-features-off.xml | 15 +++++++++ - tests/qemuxmlconftest.c | 3 ++ - 10 files changed, 129 insertions(+) - create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err - create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml - create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-latest.args - create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-latest.xml - create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.xml - -diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c -index dcc164d165..31425783ba 100644 ---- a/src/conf/cpu_conf.c -+++ b/src/conf/cpu_conf.c -@@ -238,6 +238,7 @@ virCPUDefCopyWithoutModel(const virCPUDef *cpu) - copy->mode = cpu->mode; - copy->match = cpu->match; - copy->check = cpu->check; -+ copy->deprecated_feats = cpu->deprecated_feats; - copy->fallback = cpu->fallback; - copy->sockets = cpu->sockets; - copy->dies = cpu->dies; -@@ -450,6 +451,11 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, - if (virXMLPropEnum(ctxt->node, "check", virCPUCheckTypeFromString, - VIR_XML_PROP_NONE, &def->check) < 0) - return -1; -+ -+ if (virXMLPropTristateSwitch(ctxt->node, "deprecated_features", -+ VIR_XML_PROP_NONE, -+ &def->deprecated_feats) < 0) -+ return -1; - } - - if (def->type == VIR_CPU_TYPE_HOST) { -@@ -748,6 +754,11 @@ virCPUDefFormatBufFull(virBuffer *buf, - virBufferAsprintf(&attributeBuf, " migratable='%s'", - virTristateSwitchTypeToString(def->migratable)); - } -+ -+ if (def->deprecated_feats) { -+ virBufferAsprintf(&attributeBuf, " deprecated_features='%s'", -+ virTristateSwitchTypeToString(def->deprecated_feats)); -+ } - } - - /* Format children */ -diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h -index f71d942ce6..28e26303ef 100644 ---- a/src/conf/cpu_conf.h -+++ b/src/conf/cpu_conf.h -@@ -161,6 +161,7 @@ struct _virCPUDef { - virCPUMaxPhysAddrDef *addr; - virHostCPUTscInfo *tsc; - virTristateSwitch migratable; /* for host-passthrough mode */ -+ virTristateSwitch deprecated_feats; - }; - - virCPUDef *virCPUDefNew(void); -diff --git a/src/conf/schemas/cputypes.rng b/src/conf/schemas/cputypes.rng -index 3a8910e09f..8edf1d14e3 100644 ---- a/src/conf/schemas/cputypes.rng -+++ b/src/conf/schemas/cputypes.rng -@@ -439,6 +439,11 @@ - - - -+ -+ -+ -+ -+ - - - -diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c -index c1ae324ad4..64683ecfe0 100644 ---- a/src/qemu/qemu_process.c -+++ b/src/qemu/qemu_process.c -@@ -6429,6 +6429,17 @@ qemuProcessUpdateGuestCPU(virDomainDef *def, - &def->os.arch) < 0) - return -1; - -+ if (def->cpu->deprecated_feats && -+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_DEPRECATED_PROPS)) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", -+ _("toggling deprecated features for CPU model is unsupported")); -+ return -1; -+ } -+ -+ if (def->cpu->deprecated_feats == VIR_TRISTATE_SWITCH_OFF) { -+ virQEMUCapsUpdateCPUDeprecatedFeatures(qemuCaps, def->virtType, def->cpu); -+ } -+ - return 0; - } - -diff --git a/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err -new file mode 100644 -index 0000000000..936d1d5a46 ---- /dev/null -+++ b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err -@@ -0,0 +1 @@ -+unsupported configuration: toggling deprecated features for CPU model is unsupported -diff --git a/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml -new file mode 100644 -index 0000000000..e1f7ba3857 ---- /dev/null -+++ b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml -@@ -0,0 +1,25 @@ -+ -+ guest -+ 22782664-6b93-46bf-9595-317220dd2d1c -+ 219100 -+ 219100 -+ 1 -+ -+ hvm -+ -+ -+ -+ -+ destroy -+ restart -+ destroy -+ -+ /usr/bin/qemu-system-s390x -+ -+