From 519ab5811b23da26d41b3896e4185bc824c6ce07 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 07 2020 09:15:03 +0000 Subject: import libvirt-4.5.0-35.3.module+el8.1.0+5931+8897e7e1 --- diff --git a/SOURCES/libvirt-qemu-Translate-features-in-virQEMUCapsGetCPUFeatures.patch b/SOURCES/libvirt-qemu-Translate-features-in-virQEMUCapsGetCPUFeatures.patch new file mode 100644 index 0000000..4f939a0 --- /dev/null +++ b/SOURCES/libvirt-qemu-Translate-features-in-virQEMUCapsGetCPUFeatures.patch @@ -0,0 +1,69 @@ +From e85f56920d0a22b55ab54b5955ab594568f24a60 Mon Sep 17 00:00:00 2001 +Message-Id: +From: Jiri Denemark +Date: Thu, 27 Feb 2020 15:23:04 +0100 +Subject: [PATCH] qemu: Translate features in virQEMUCapsGetCPUFeatures +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Starting with QEMU 4.1 qemuMonitorCPUModelInfo structure in virQEMUCaps +stores only canonical feature names which may differ from the name used +by libvirt. We need translate these canonical names into libvirt names +for further consumption. + +This fixes a bug in qemuConnectBaselineHypervisorCPU which would remove +all features for which libvirt's spelling differs from the QEMU's +preferred name. For example, the following result of +qemuConnectBaselineHypervisorCPU on my host with QEMU 4.1 is wrong: + + + Skylake-Client + Intel + + + + + + + + + + + + + +The 'pclmuldq' and 'lahf_lm' should not be disabled in the baseline CPU +as they are supported by QEMU on this host. + +Signed-off-by: Jiri Denemark +Reviewed-by: Andrea Bolognani +(cherry picked from commit 1fd28a2e79692babd63d6b8e9eea90168dd0897e) + +https://bugzilla.redhat.com/show_bug.cgi?id=1804224 +https://bugzilla.redhat.com/show_bug.cgi?id=1809510 + +Signed-off-by: Jiri Denemark +Message-Id: +Reviewed-by: Ján Tomko +--- + src/qemu/qemu_capabilities.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c +index c25d8c3e1a..a7cc324105 100644 +--- a/src/qemu/qemu_capabilities.c ++++ b/src/qemu/qemu_capabilities.c +@@ -2521,7 +2521,8 @@ virQEMUCapsGetCPUFeatures(virQEMUCapsPtr qemuCaps, + if (migratable && prop->migratable == VIR_TRISTATE_BOOL_NO) + continue; + +- if (VIR_STRDUP(list[n++], prop->name) < 0) ++ if (VIR_STRDUP(list[n++], ++ virQEMUCapsCPUFeatureFromQEMU(qemuCaps, prop->name)) < 0) + goto cleanup; + } + +-- +2.25.1 + diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index b4f6342..d1e4fe5 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -251,7 +251,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 4.5.0 -Release: 35.2%{?dist}%{?extra_release} +Release: 35.3%{?dist}%{?extra_release} License: LGPLv2+ URL: https://libvirt.org/ @@ -812,6 +812,7 @@ Patch548: libvirt-cpu_map-Drop-pconfig-from-Icelake-Server-CPU-model.patch Patch549: libvirt-qemu-Fix-NULL-ptr-dereference-caused-by-qemuDomainDefFormatBufInternal.patch Patch550: libvirt-cpu_map-Add-TAA_NO-bit-for-IA32_ARCH_CAPABILITIES-MSR.patch Patch551: libvirt-cpu_map-Add-TSX_CTRL-bit-for-IA32_ARCH_CAPABILITIES-MSR.patch +Patch552: libvirt-qemu-Translate-features-in-virQEMUCapsGetCPUFeatures.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -2723,6 +2724,9 @@ exit 0 %changelog +* Wed Mar 4 2020 Jiri Denemark - 4.5.0-35.3.el8 +- qemu: Translate features in virQEMUCapsGetCPUFeatures (rhbz#1809510) + * Mon Dec 16 2019 Jiri Denemark - 4.5.0-35.2.el8 - cpu_map: Add TAA_NO bit for IA32_ARCH_CAPABILITIES MSR (CVE-2019-11135) - cpu_map: Add TSX_CTRL bit for IA32_ARCH_CAPABILITIES MSR (CVE-2019-11135)