libvirt-8.5.0-1.el9

- Rebased to libvirt-8.5.0 (rhbz#2060313)
- The rebase also fixes the following bugs:
    rhbz#1475431, rhbz#2026765, rhbz#2059511, rhbz#2089431, rhbz#2102009

Resolves: rhbz#1475431, rhbz#2026765, rhbz#2059511, rhbz#2060313, rhbz#2089431
Resolves: rhbz#2102009
This commit is contained in:
Jiri Denemark 2022-07-01 12:48:50 +02:00
parent 07034509ca
commit 7086ad20a0
6 changed files with 14 additions and 176 deletions

View File

@ -1,46 +0,0 @@
From fcec98bb80633bec6f4bc3de0ab75627c874d315 Mon Sep 17 00:00:00 2001
Message-Id: <fcec98bb80633bec6f4bc3de0ab75627c874d315@dist-git>
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Mon, 27 Aug 2018 13:09:38 +0200
Subject: [PATCH] RHEL: Fix virConnectGetMaxVcpus output
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://bugzilla.redhat.com/show_bug.cgi?id=1092363
RHEL-only.
Ignore the maximum vcpu limit (KVM_CAP_MAX_VCPUS) on RHEL,
since RHEL QEMU treats the recommended limit (KVM_CAP_NR_VCPUS)
as the maximum, see:
https://bugzilla.redhat.com/show_bug.cgi?id=998708
(cherry picked from commit 7dff909fa34bdd93ad200dbffe70c0c1ee931925)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
https: //bugzilla.redhat.com/show_bug.cgi?id=1582222
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
---
src/util/virhostcpu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index e3f2d6d4b7..d3f0fbb31c 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -1172,6 +1172,11 @@ virHostCPUGetKVMMaxVCPUs(void)
return -1;
}
+/* Ignore KVM_CAP_MAX_VCPUS on RHEL - the recommended maximum
+ * is treated as a hard limit.
+ */
+# undef KVM_CAP_MAX_VCPUS
+
# ifdef KVM_CAP_MAX_VCPUS
/* at first try KVM_CAP_MAX_VCPUS to determine the maximum count */
if ((ret = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_MAX_VCPUS)) > 0)
--
2.35.1

View File

@ -1,40 +0,0 @@
From 8b90cda4a70e0cde0f386b41fddb59b6407a355b Mon Sep 17 00:00:00 2001
Message-Id: <8b90cda4a70e0cde0f386b41fddb59b6407a355b@dist-git>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Thu, 9 Jun 2022 13:11:02 +0200
Subject: [PATCH] Revert "RHEL: Fix virConnectGetMaxVcpus output"
This reverts commit fcec98bb80633bec6f4bc3de0ab75627c874d315.
Upstream KVM changed its soft limit for number of vCPUs to match the
number of physical CPUs on the host. This will make it into the kernel
in 9.1.0 and thus downstream qemu-kvm dropped their RHEL-only patch to
consider KVM soft limit as hard (otherwise no CPU overcommitment would
be possible). We need to do the same to avoid reporting wrong numbers.
https://bugzilla.redhat.com/show_bug.cgi?id=2095260
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/util/virhostcpu.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index d3f0fbb31c..e3f2d6d4b7 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -1172,11 +1172,6 @@ virHostCPUGetKVMMaxVCPUs(void)
return -1;
}
-/* Ignore KVM_CAP_MAX_VCPUS on RHEL - the recommended maximum
- * is treated as a hard limit.
- */
-# undef KVM_CAP_MAX_VCPUS
-
# ifdef KVM_CAP_MAX_VCPUS
/* at first try KVM_CAP_MAX_VCPUS to determine the maximum count */
if ((ret = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_MAX_VCPUS)) > 0)
--
2.35.1

View File

@ -1,83 +0,0 @@
From c52ee15b701c207d205b296e535202272ad6a525 Mon Sep 17 00:00:00 2001
Message-Id: <c52ee15b701c207d205b296e535202272ad6a525@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Fri, 3 Jun 2022 15:49:01 +0200
Subject: [PATCH] qemu: fd: Fix monitor usage of qemuFDPassDirectGetPath
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We need to use the 'name' variable and just overwrite it with the FD
number when FDs are passed on the monitor. Otherwise we will read NULL
path if the FD is accessed before being passed on the monitor. The idea
of this helper is to simplify the monitor code so it would be
counterproductive to have other behaviour.
Fixes the following symptom:
$ virsh attach-interface cd network default --model virtio
error: Failed to attach interface
error: internal error: unable to execute QEMU command 'netdev_add': File descriptor named '(null)' has not been found
Fixes: bca9047906fd73fd30f275dd45b64998fbbcf6de
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/318
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2092856
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 8d3a807a4acce72a9bce50dd6496c7e320cace39)
https://bugzilla.redhat.com/show_bug.cgi?id=2092856
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/qemu/qemu_fd.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_fd.c b/src/qemu/qemu_fd.c
index bc6a37663c..40c8234320 100644
--- a/src/qemu/qemu_fd.c
+++ b/src/qemu/qemu_fd.c
@@ -235,7 +235,6 @@ qemuFDPassGetPath(qemuFDPass *fdpass)
struct _qemuFDPassDirect {
int fd;
- char *path;
char *name;
bool passed; /* passed to qemu via monitor */
@@ -251,7 +250,6 @@ qemuFDPassDirectFree(qemuFDPassDirect *fdpass)
VIR_FORCE_CLOSE(fdpass->fd);
g_free(fdpass->name);
- g_free(fdpass->path);
g_free(fdpass);
}
@@ -295,7 +293,8 @@ qemuFDPassDirectTransferCommand(qemuFDPassDirect *fdpass,
return;
virCommandPassFD(cmd, fdpass->fd, VIR_COMMAND_PASS_FD_CLOSE_PARENT);
- fdpass->path = g_strdup_printf("%d", fdpass->fd);
+ g_free(fdpass->name);
+ fdpass->name = g_strdup_printf("%d", fdpass->fd);
fdpass->fd = -1;
}
@@ -318,7 +317,6 @@ qemuFDPassDirectTransferMonitor(qemuFDPassDirect *fdpass,
if (qemuMonitorSendFileHandle(mon, fdpass->name, fdpass->fd) < 0)
return -1;
- fdpass->path = g_strdup(fdpass->name);
VIR_FORCE_CLOSE(fdpass->fd);
fdpass->passed = true;
@@ -358,5 +356,5 @@ qemuFDPassDirectGetPath(qemuFDPassDirect *fdpass)
if (!fdpass)
return NULL;
- return fdpass->path;
+ return fdpass->name;
}
--
2.35.1

View File

@ -21,6 +21,9 @@
%define arches_systemtap_64bit %{arches_64bit}
%define arches_dmidecode %{arches_x86}
%define arches_xen %{arches_x86} aarch64
%if 0%{?fedora} >= 36
%define arches_xen x86_64 aarch64
%endif
%define arches_vbox %{arches_x86}
%define arches_ceph %{arches_64bit}
%define arches_zfs %{arches_x86} %{power64} %{arm}
@ -227,8 +230,8 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 8.4.0
Release: 3%{?dist}%{?extra_release}
Version: 8.5.0
Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
URL: https://libvirt.org/
@ -238,10 +241,6 @@ URL: https://libvirt.org/
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
Source1: symlinks
Patch1: libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
Patch2: libvirt-Revert-RHEL-Fix-virConnectGetMaxVcpus-output.patch
Patch3: libvirt-qemu-fd-Fix-monitor-usage-of-qemuFDPassDirectGetPath.patch
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
@ -2146,6 +2145,11 @@ exit 0
%changelog
* Fri Jul 1 2022 Jiri Denemark <jdenemar@redhat.com> - 8.5.0-1
- Rebased to libvirt-8.5.0 (rhbz#2060313)
- The rebase also fixes the following bugs:
rhbz#1475431, rhbz#2026765, rhbz#2059511, rhbz#2089431, rhbz#2102009
* Fri Jun 24 2022 Jiri Denemark <jdenemar@redhat.com> - 8.4.0-3
- qemu: fd: Fix monitor usage of qemuFDPassDirectGetPath (rhbz#2092856)

View File

@ -1 +1 @@
SHA512 (libvirt-8.4.0.tar.xz) = e9dcaa489f162e3a26fe1ca7bb83a22e3f1952594c3541ddd2a7f8e8a0e6ad37e193fb89421df1efe3d2a4d9bb7cf5455c7b7a0b59e133eb6c0ff3cbbd8403b6
SHA512 (libvirt-8.5.0.tar.xz) = 62b05c5cd58eab0ab2d945b832fd85807aea9b5f12a7ef5d1205fe0edac8d361ba3a9245f60f200a8548c96f718943d4502d87fff87c4495bd1e2637f14aaccf

View File

@ -5,10 +5,12 @@ tests/networkxml2xmlin/leasetime-hours.xml ../networkxml2confdata/leasetime-hour
tests/networkxml2xmlin/leasetime-infinite.xml ../networkxml2confdata/leasetime-infinite.xml
tests/networkxml2xmlin/leasetime-minutes.xml ../networkxml2confdata/leasetime-minutes.xml
tests/networkxml2xmlin/leasetime-seconds.xml ../networkxml2confdata/leasetime-seconds.xml
tests/networkxml2xmlin/netboot-tftp.xml ../networkxml2confdata/netboot-tftp.xml
tests/networkxml2xmlout/leasetime-hours.xml ../networkxml2xmlin/leasetime-hours.xml
tests/networkxml2xmlout/leasetime-infinite.xml ../networkxml2xmlin/leasetime-infinite.xml
tests/networkxml2xmlout/leasetime-minutes.xml ../networkxml2xmlin/leasetime-minutes.xml
tests/networkxml2xmlout/leasetime-seconds.xml ../networkxml2xmlin/leasetime-seconds.xml
tests/networkxml2xmlout/netboot-tftp.xml ../networkxml2confdata/netboot-tftp.xml
tests/nodedevxml2xmlout/DVD_GCC_4247N.xml ../nodedevschemadata/DVD_GCC_4247N.xml
tests/nodedevxml2xmlout/DVD_with_media.xml ../nodedevschemadata/DVD_with_media.xml
tests/nodedevxml2xmlout/ap_07_0038.xml ../nodedevschemadata/ap_07_0038.xml
@ -184,6 +186,7 @@ tests/qemuxml2xmloutdata/intel-iommu-caching-mode.x86_64-latest.xml ../qemuxml2a
tests/qemuxml2xmloutdata/intel-iommu-device-iotlb.x86_64-latest.xml ../qemuxml2argvdata/intel-iommu-device-iotlb.xml
tests/qemuxml2xmloutdata/intel-iommu-eim.x86_64-latest.xml ../qemuxml2argvdata/intel-iommu-eim.xml
tests/qemuxml2xmloutdata/intel-iommu.x86_64-latest.xml ../qemuxml2argvdata/intel-iommu.xml
tests/qemuxml2xmloutdata/iothreads-ids-pool-sizes.x86_64-latest.xml ../qemuxml2argvdata/iothreads-ids-pool-sizes.xml
tests/qemuxml2xmloutdata/kvm-features-off.xml ../qemuxml2argvdata/kvm-features-off.xml
tests/qemuxml2xmloutdata/kvm-features.xml ../qemuxml2argvdata/kvm-features.xml
tests/qemuxml2xmloutdata/luks-disks.x86_64-latest.xml ../qemuxml2argvdata/luks-disks.xml