diff --git a/Fixed-loongarch-qxl-device-not-displaying-during-sta.patch b/Fixed-loongarch-qxl-device-not-displaying-during-sta.patch new file mode 100644 index 0000000000000000000000000000000000000000..93709c6fe36afe2f8c96a33eb2b6a96d4fc8af08 --- /dev/null +++ b/Fixed-loongarch-qxl-device-not-displaying-during-sta.patch @@ -0,0 +1,30 @@ +From 8b57ac24787afc0a94f3ba8e065f9524c986fa7f Mon Sep 17 00:00:00 2001 +From: lixianglai +Date: Tue, 12 Sep 2023 02:08:31 -0400 +Subject: [PATCH] Fixed loongarch qxl device not displaying during startup + phase + +Fixed an issue where qxl devices could not be displayed in bios and grub +stages due to a loongarch architecture string comparison error. + +Signed-off-by: lixianglai +--- + src/qemu/qemu_domain.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c +index fbc665aff3..5933039f5c 100644 +--- a/src/qemu/qemu_domain.c ++++ b/src/qemu/qemu_domain.c +@@ -12998,7 +12998,7 @@ qemuDomainMachineIsLoongson(const char *machine, + return false; + + if (STREQ(machine, "loongson7a") || +- STRPREFIX(machine, "loongson7a-")) { ++ STRPREFIX(machine, "loongson7a")) { + return true; + } + +-- +2.27.0 + diff --git a/libvirt.spec b/libvirt.spec index 5d238ff6a682195d3ef4a12be748b2d2bb9f06fd..cf253e2b9893963a0aa5184916bcfdee67908d7e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -101,7 +101,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 6.2.0 -Release: 63 +Release: 64 License: LGPLv2+ URL: https://libvirt.org/ @@ -489,27 +489,31 @@ Patch0376: selinux-adapt-to-libselinux.patch Patch0377: Revert-selinux-adapt-to-libselinux.patch Patch0378: selinux-Reflect-context_str-type-change.patch Patch0379: virnetsshsession-Adapt-to-change-libssh2-API.patch -Patch0380: qemu-Fix-incorrect-command-name-in-error-messages.patch -Patch0381: esx-call-freeaddrinfo-earlier-in-esxUtil_ResolveHost.patch -Patch0382: admin-fix-leak-of-typed-parameters-on-error.patch -Patch0383: Use-un-signed-printf-specifiers-correctly.patch -Patch0384: fix-the-issue-of-errors-when-saving-after-virsh-edit.patch -Patch0385: virrandom-Fix-printf-format-string-in-virRandomGener.patch -Patch0386: qemu_migration_cookie-Rename-ret-in-qemuDomainExtrac.patch -Patch0387: tests-upstream-Fixing-compiler-warning-in-cputest.patch -Patch0388: qemu-Return-perf-status-that-affect-next-boot-for-sh.patch -Patch0389: lxc-fix-lxcContainerMountAllFS-DEREF_BEFORE_CHECK.patch -Patch0390: Include-vdpa-devices-in-node-device-list.patch -Patch0391: node_device-fix-leak-of-DIR.patch -Patch0392: vdpa-Introduce-the-new-device-type-vdpa-to-hostdev.patch -Patch0393: vdpa-support-vdpa-device-hot-plug-unplug.patch -Patch0394: vdpa-support-vdpa-device-migrate.patch -Patch0395: virsh-Fix-off-by-one-error-in-udevListInterfacesBySt.patch -Patch0396: remote-check-for-negative-array-lengths-before-alloc.patch -Patch0397: interface-fix-udev_device_get_sysattr_value-return-v.patch -Patch0398: util-keep-track-of-full-GSource-object-not-source-ID.patch -Patch0399: rpc-mark-source-returned-by-virEventGLibAddSocketWat.patch -Patch0400: rpc-ensure-temporary-GSource-is-removed-from-client-.patch +Patch0380: qemu-command-Use-correct-tpm-device-for-all-non-x86.patch +Patch0381: Fixed-loongarch-qxl-device-not-displaying-during-sta.patch +Patch0382: qemu-Fix-incorrect-command-name-in-error-messages.patch +Patch0383: esx-call-freeaddrinfo-earlier-in-esxUtil_ResolveHost.patch +Patch0384: admin-fix-leak-of-typed-parameters-on-error.patch +Patch0385: Use-un-signed-printf-specifiers-correctly.patch +Patch0386: fix-the-issue-of-errors-when-saving-after-virsh-edit.patch +Patch0387: virrandom-Fix-printf-format-string-in-virRandomGener.patch +Patch0388: qemu_migration_cookie-Rename-ret-in-qemuDomainExtrac.patch +Patch0389: tests-upstream-Fixing-compiler-warning-in-cputest.patch +Patch0390: qemu-Return-perf-status-that-affect-next-boot-for-sh.patch +Patch0391: lxc-fix-lxcContainerMountAllFS-DEREF_BEFORE_CHECK.patch +Patch0392: Include-vdpa-devices-in-node-device-list.patch +Patch0393: node_device-fix-leak-of-DIR.patch +Patch0394: vdpa-Introduce-the-new-device-type-vdpa-to-hostdev.patch +Patch0395: vdpa-support-vdpa-device-hot-plug-unplug.patch +Patch0396: vdpa-support-vdpa-device-migrate.patch +Patch0397: vdpa-return-pcieFlags-when-calculate-vdpa-passthroug.patch +Patch0398: vdpa-Release-pci-slot-address-when-unplugging-vdpa-d.patch +Patch0399: virsh-Fix-off-by-one-error-in-udevListInterfacesBySt.patch +Patch0400: remote-check-for-negative-array-lengths-before-alloc.patch +Patch0401: interface-fix-udev_device_get_sysattr_value-return-v.patch +Patch0402: util-keep-track-of-full-GSource-object-not-source-ID.patch +Patch0403: rpc-mark-source-returned-by-virEventGLibAddSocketWat.patch +Patch0404: rpc-ensure-temporary-GSource-is-removed-from-client-.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -2246,20 +2250,22 @@ exit 0 %changelog -* Fri May 24 2024 jiangjiacheng - 6.2.0-63 +* Fri May 24 2024 jiangjiacheng - 6.2.0-64 - util: keep track of full GSource object not source ID number - rpc: mark source returned by virEventGLibAddSocketWatch as unused - rpc: ensure temporary GSource is removed from client event loop (CVE-2024-4418) -* Wed Apr 10 2024 caozhongwang +* Wed Apr 10 2024 caozhongwang - 6.2.0-63 - interface: fix udev_device_get_sysattr_value return value check (CVE-2024-2496) - remote: check for negative array lengths before allocation (CVE-2024-2494) - vish:Fix off-by-one error in udevListInterfacesByStatus (CVE-2024-1441) -* Wed Mar 20 2024 Jian Chunfu - 6.2.0-61 -- spec: Add support for the ppc64le platform +* Wed Mar 13 2024 jiangdongxu - 6.2.0-62 +- vdpa: Release pci slot address when unplugging vdpa device +- vdpa: return pcieFlags when calculate vdpa passthrough devices. -* Wed Nov 29 2023 Jiabo Feng - 6.2.0-60 +* Wed Nov 29 2023 Jiabo Feng - 6.2.0-61 +- spec: Add support for the ppc64le platform - vdpa: support vdpa device migrate - vdpa: support vdpa device hot plug/unplug - vdpa: Introduce the new device type vdpa to hostdev @@ -2276,6 +2282,9 @@ exit 0 - esx: call freeaddrinfo earlier in esxUtil_ResolveHostname Call freeaddrinfo() as soon as @result is not needed anymore, i.e. right after getnameinfo(); this avoids calling freeaddrinfo() in two branches. - qemu: Fix incorrect command name in error messages +* Tue Sep 12 2023 lixianglai - 6.2.0-60 +- Fixed loongarch qxl device not displaying during startup phase +- Synchronize upstream patches "Use correct tpm device for all non-x86" * Wed Aug 9 2023 Jiabo Feng - 6.2.0-59 - virnetsshsession: Adapt to change libssh2 API diff --git a/qemu-command-Use-correct-tpm-device-for-all-non-x86.patch b/qemu-command-Use-correct-tpm-device-for-all-non-x86.patch new file mode 100644 index 0000000000000000000000000000000000000000..df4bd8b49ffe3efefcde69d41cedb247cdfbb170 --- /dev/null +++ b/qemu-command-Use-correct-tpm-device-for-all-non-x86.patch @@ -0,0 +1,32 @@ +From 4127f2c1599683af1de75574065f1942eea9ad88 Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Sat, 18 Jun 2022 12:46:03 -0400 +Subject: [PATCH] qemu: command: Use correct tpm device for all non-x86 + +The qemu `tpm-tis` device is an ISA device, so only really applicable +to x86 archs. For all non-x86 archs we should use `tpm-tis-device` + +This fixes tpm-tis usage on armv7l and riscv + +Reviewed-by: Michal Privoznik +Signed-off-by: Cole Robinson +--- + src/qemu/qemu_command.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c +index dc7fb871e7..832c17b602 100644 +--- a/src/qemu/qemu_command.c ++++ b/src/qemu/qemu_command.c +@@ -9311,7 +9311,7 @@ qemuBuildTPMDevStr(const virDomainDef *def, + virDomainTPMDef *tpm = def->tpm; + const char *model = virDomainTPMModelTypeToString(tpm->model); + +- if (tpm->model == VIR_DOMAIN_TPM_MODEL_TIS && def->os.arch == VIR_ARCH_AARCH64) ++ if (tpm->model == VIR_DOMAIN_TPM_MODEL_TIS && !ARCH_IS_X86(def->os.arch)) + model = "tpm-tis-device"; + + virBufferAsprintf(&buf, "%s,tpmdev=tpm-%s,id=%s", +-- +2.27.0 + diff --git a/vdpa-Release-pci-slot-address-when-unplugging-vdpa-d.patch b/vdpa-Release-pci-slot-address-when-unplugging-vdpa-d.patch new file mode 100644 index 0000000000000000000000000000000000000000..7a2f0b29c7019c7b94b31b6dc8b0b017af3ab999 --- /dev/null +++ b/vdpa-Release-pci-slot-address-when-unplugging-vdpa-d.patch @@ -0,0 +1,39 @@ +From 9858958385ae145196a0b95befbd9ae8f2f5ce18 Mon Sep 17 00:00:00 2001 +From: jiangdongxu1 +Date: Wed, 13 Mar 2024 15:28:47 +0800 +Subject: [PATCH] vdpa: Release pci slot address when unplugging vdpa device + +Signed-off-by: jiangdongxu1 +--- + src/qemu/qemu_hotplug.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c +index 3c5540291b..f44ac938ae 100644 +--- a/src/qemu/qemu_hotplug.c ++++ b/src/qemu/qemu_hotplug.c +@@ -4560,6 +4560,12 @@ qemuDomainRemoveMediatedDevice(virQEMUDriverPtr driver, + qemuDomainReleaseDeviceAddress(vm, hostdev->info); + } + ++static void ++qemuDomainRemoveVDPADevice(virDomainObjPtr vm, ++ virDomainHostdevDefPtr hostdev) ++{ ++ qemuDomainReleaseDeviceAddress(vm, hostdev->info); ++} + + static int + qemuDomainRemoveHostDevice(virQEMUDriverPtr driver, +@@ -4653,6 +4659,8 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver, + qemuDomainRemoveMediatedDevice(driver, vm, hostdev); + break; + case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_VDPA: ++ qemuDomainRemoveVDPADevice(vm, hostdev); ++ break; + case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST: + break; + } +-- +2.27.0 + diff --git a/vdpa-return-pcieFlags-when-calculate-vdpa-passthroug.patch b/vdpa-return-pcieFlags-when-calculate-vdpa-passthroug.patch new file mode 100644 index 0000000000000000000000000000000000000000..6fbca022aa1713902247dd6bd7ca07848d2d7c13 --- /dev/null +++ b/vdpa-return-pcieFlags-when-calculate-vdpa-passthroug.patch @@ -0,0 +1,32 @@ +From 78b7156840b421becd45c13c0ff4da57c314b4a5 Mon Sep 17 00:00:00 2001 +From: jiangdongxu1 +Date: Wed, 13 Mar 2024 15:23:57 +0800 +Subject: [PATCH] vdpa: return pcieFlags when calculate vdpa passthrough + devices. + +Signed-off-by: jiangdongxu1 +--- + src/qemu/qemu_domain_address.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c +index 6649553486..ce40fdc928 100644 +--- a/src/qemu/qemu_domain_address.c ++++ b/src/qemu/qemu_domain_address.c +@@ -825,6 +825,13 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, + if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV) + return pcieFlags; + ++ /* ++ * vDPA passthrough is currently only support on arm architechture. ++ * Thus, we just assume it's PCI Express. ++ */ ++ if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_VDPA) ++ return pcieFlags; ++ + /* according to pbonzini, from the guest PoV vhost-scsi devices + * are the same as virtio-scsi, so they should follow virtio logic + */ +-- +2.27.0 +