From b14161abefd8b21c2b443f002535b68ff6516833 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 20 Nov 2024 13:23:02 +0000 Subject: [PATCH] import RHEL 10 Beta libvirt-10.5.0-5.el10 --- .gitignore | 2 +- .libvirt.metadata | 1 - ...ibvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch | 49 - ...e-types-to-qemuDomainMachineNeedsFDC.patch | 47 - ...EL-Enable-usage-of-x-blockdev-reopen.patch | 257 -- ...HEL-Fix-virConnectGetMaxVcpus-output.patch | 46 - ...round-changed-Broadwell-Haswell-CPUs.patch | 185 - ...b-2.64.0-workaround-for-GSource-race.patch | 89 - ...ility-to-set-sgio-values-for-hostdev.patch | 81 - ...iv-sgio-for-SCSI-generic-host-device.patch | 66 - ...storing-memlock-limit-on-destination.patch | 52 - ...pe-before-getting-it-s-dev-node-name.patch | 215 -- ...-virSCSIDeviceGetUnprivSGIOSysfsPath.patch | 272 -- ...ort-TAPEs-in-virSCSIDeviceGetDevName.patch | 200 - ...-non-block-devices-in-virGetDeviceID.patch | 37 - ...sGetStatInfo-is-unable-to-parse-data.patch | 103 - ...ibvirt-guests-when-building-libvirtd.patch | 75 - ...-Introduce-memory-allocation-threads.patch | 155 - ...ET_TYPE_ETHERNET-not-share-host-view.patch | 46 - ...nalMemlock-into-qemuDomainObjPrivate.patch | 91 - ...me-virDomainDeviceCCWAddressParseXML.patch | 88 - ...onf-virtiofs-add-thread_pool-element.patch | 151 - ...u64-rhel-for-host-model-and-baseline.patch | 60 - ...ature-match-in-x86DecodeUseCandidate.patch | 75 - ...nput-models-in-x86DecodeUseCandidate.patch | 272 -- ...ed-features-when-computing-CPU-model.patch | 1229 ------- ...-comparison-in-x86DecodeUseCandidate.patch | 73 - ...t-Add-some-real-world-baseline-tests.patch | 498 --- ...p-some-old-artificial-baseline-tests.patch | 334 -- ...-Give-better-names-to-baseline-tests.patch | 97 - ...ut-validation-of-disk-startup-policy.patch | 111 - ...-controller-for-restrictive-numatune.patch | 77 - ..._device-Rework-udevKludgeStorageType.patch | 84 - ...ce-Treat-NVMe-disks-as-regular-disks.patch | 39 - ...-in-virNodeDeviceGetPCIVPDDynamicCap.patch | 52 - ...ress-of-channel-device-to-css-device.patch | 151 - ...ptional-device-address-to-css-device.patch | 149 - ...ted-error-msg-in-css-cap-XML-parsing.patch | 32 - ...nt-internal-error-on-dev_busid-parse.patch | 35 - ...-ccw-device-address-parsing-from-XML.patch | 140 - ...css-XML-parsing-from-ccw-XML-parsing.patch | 99 - ...or-css-format-from-ccw-format-method.patch | 62 - ...bvirt-nodedev-update-transient-mdevs.patch | 79 - ...n-counting-number-of-network-filters.patch | 55 - ...u-Add-qemuDomainSetMaxMemLock-helper.patch | 155 - ...g-vm.unprivileged_userfaultfd-sysctl.patch | 38 - ...e-struct-_qemuMonitorMessage-private.patch | 105 - ...-domain-definition-even-on-migration.patch | 72 - ...mber-from-guest-query-vcpus-optional.patch | 46 - ...omain-Fix-logic-when-tainting-domain.patch | 39 - ...rt-qemu-fix-inactive-snapshot-revert.patch | 44 - ...pu-Get-pid-without-binary-validation.patch | 67 - ...elds-from-struct-_qemuMonitorMessage.patch | 44 - ...-_qemuMonitor-to-qemu_monitor_priv.h.patch | 157 - ...-block-nodes-supports-flat-parameter.patch | 57 - ...NodeData-Remove-pointless-error-path.patch | 53 - ...d-memory-check-for-vhostuser-daemons.patch | 65 - ...-swtpm-pid-without-binary-validation.patch | 219 -- ...emu-virtiofs-format-thread-pool-size.patch | 37 - ...jectGetStringArray-for-optional-data.patch | 57 - ...mainSetupDisk-Initialize-targetPaths.patch | 41 - ...flat-mode-of-query-named-block-nodes.patch | 41 - ...ssReconnect-Don-t-build-memory-paths.patch | 57 - ...y-backend-.prealloc-threads-property.patch | 314 -- ...nerate-memory-only-after-controllers.patch | 663 ---- ...d-Generate-prealloc-threads-property.patch | 66 - ...qemuDomainObjPrivate-originalMemlock.patch | 55 - ...-Implement-VIR_MIGRATE_ZEROCOPY-flag.patch | 120 - ...estore-original-memory-locking-limit.patch | 133 - ...igration-Use-qemuDomainSetMaxMemLock.patch | 53 - ...mory-in-qemuDomainGetPreservedMounts.patch | 57 - ...case-in-qemuDomainGetPreservedMounts.patch | 80 - ...troduce-qemuDomainNamespaceSetupPath.patch | 68 - ...Ls-when-creating-a-path-in-namespace.patch | 45 - ...-require-a-hugetlbfs-mount-for-memfd.patch | 50 - ...pagate-hugetlbfs-mounts-on-reconnect.patch | 65 - ...sync-IO-when-starting-swtpm-emulator.patch | 49 - ...te-prealloc-threads-against-qemuCpas.patch | 39 - ...tive-array-lengths-before-allocation.patch | 218 -- .../libvirt-rpc-Fix-memory-leak-of-fds.patch | 36 - ...ce-is-removed-from-client-event-loop.patch | 101 - ...actor-out-nodedev-ccw-address-schema.patch | 64 - ...abel-existing-mode-bind-UNIX-sockets.patch | 64 - ...ls-Fix-install_mode-for-some-scripts.patch | 65 - ...urn-for-virProcessKillPainfullyDelay.patch | 39 - ...w-device-address-parsing-into-virccw.patch | 107 - ...CCWDeviceAddressFromString-to-virccw.patch | 107 - ...rom-virJSONValueObjectGetStringArray.patch | 124 - ...f-ccw-device-address-format-constant.patch | 70 - ...or-ccw-address-constants-into-virccw.patch | 80 - ...DomainCCWAddressAsString-into-virccw.patch | 194 - ...omainCCWAddressIncrement-into-virccw.patch | 100 - ...DomainDeviceCCWAddress-into-virccw.h.patch | 299 -- ...ainDeviceCCWAddressEqual-into-virccw.patch | 151 - ...nDeviceCCWAddressIsValid-into-virccw.patch | 126 - ...or-messages-for-startupPolicy-checks.patch | 51 - ...rtupPolicy-Validate-disk-type-better.patch | 42 - ...ix-check-of-startupPolicy-definition.patch | 56 - ...cpi-Add-PCIe-5.0-and-6.0-link-speeds.patch | 65 - ...-integer-overflow-in-virNumaGetPages.patch | 68 - ...in-virPCIVirtualFunctionList-cleanup.patch | 56 - ...-Add-virPidFileReadPathIfLocked-func.patch | 96 - ...upport-for-VIR_MIGRATE_ZEROCOPY-flag.patch | 80 - SOURCES/symlinks | 1123 ------ SPECS/libvirt.spec | 3265 ----------------- ...ingDestroyed-true-on-inactive-domain.patch | 124 + ...deprecated-options-for-new-virtiofsd.patch | 128 + ...qemu-fill-capabilities-for-virtiofsd.patch | 208 ++ ...gration-allow-migration-for-virtiofs.patch | 52 + ...iofs-cache-use-never-instead-of-none.patch | 49 + ...n-Strip-acpi-from-s390-x-definitions.patch | 105 + ...-for-the-ACPI-stripping-hack-on-s390.patch | 435 +++ ...nf-adjust-test-case-to-new-virtiofsd.patch | 46 + ...stuser-add-virtiofsd-json-descriptor.patch | 69 + ...idate-Allow-longer-list-of-CPU-flags.patch | 85 + ...t-virt-host-validate-Drop-extra-PASS.patch | 46 + ...en-trying-to-comprehend-serial-ports.patch | 97 + ...D-data-for-VMWare-Distributed-Switch.patch | 171 + ...lineInit-to-be-called-multiple-times.patch | 43 + libvirt.spec | 2868 +++++++++++++++ sources | 1 + 121 files changed, 4528 insertions(+), 16208 deletions(-) delete mode 100644 .libvirt.metadata delete mode 100644 SOURCES/libvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch delete mode 100644 SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch delete mode 100644 SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch delete mode 100644 SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch delete mode 100644 SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch delete mode 100644 SOURCES/libvirt-RHEL-Remove-glib-2.64.0-workaround-for-GSource-race.patch delete mode 100644 SOURCES/libvirt-RHEL-qemu-Add-ability-to-set-sgio-values-for-hostdev.patch delete mode 100644 SOURCES/libvirt-RHEL-qemu-Add-check-for-unpriv-sgio-for-SCSI-generic-host-device.patch delete mode 100644 SOURCES/libvirt-RHEL-qemu_migration-Fix-restoring-memlock-limit-on-destination.patch delete mode 100644 SOURCES/libvirt-RHEL-virscsi-Check-device-type-before-getting-it-s-dev-node-name.patch delete mode 100644 SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch delete mode 100644 SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch delete mode 100644 SOURCES/libvirt-RHEL-virutil-Accept-non-block-devices-in-virGetDeviceID.patch delete mode 100644 SOURCES/libvirt-Revert-report-error-when-virProcessGetStatInfo-is-unable-to-parse-data.patch delete mode 100644 SOURCES/libvirt-build-Only-install-libvirt-guests-when-building-libvirtd.patch delete mode 100644 SOURCES/libvirt-conf-Introduce-memory-allocation-threads.patch delete mode 100644 SOURCES/libvirt-conf-Make-VIR_DOMAIN_NET_TYPE_ETHERNET-not-share-host-view.patch delete mode 100644 SOURCES/libvirt-conf-Move-virDomainObj-originalMemlock-into-qemuDomainObjPrivate.patch delete mode 100644 SOURCES/libvirt-conf-adjust-method-name-virDomainDeviceCCWAddressParseXML.patch delete mode 100644 SOURCES/libvirt-conf-virtiofs-add-thread_pool-element.patch delete mode 100644 SOURCES/libvirt-cpu_map-Disable-cpu64-rhel-for-host-model-and-baseline.patch delete mode 100644 SOURCES/libvirt-cpu_x86-Consolidate-signature-match-in-x86DecodeUseCandidate.patch delete mode 100644 SOURCES/libvirt-cpu_x86-Ignore-enabled-features-for-input-models-in-x86DecodeUseCandidate.patch delete mode 100644 SOURCES/libvirt-cpu_x86-Penalize-disabled-features-when-computing-CPU-model.patch delete mode 100644 SOURCES/libvirt-cpu_x86-Refactor-feature-list-comparison-in-x86DecodeUseCandidate.patch delete mode 100644 SOURCES/libvirt-cputest-Add-some-real-world-baseline-tests.patch delete mode 100644 SOURCES/libvirt-cputest-Drop-some-old-artificial-baseline-tests.patch delete mode 100644 SOURCES/libvirt-cputest-Give-better-names-to-baseline-tests.patch delete mode 100644 SOURCES/libvirt-domain_validate-Split-out-validation-of-disk-startup-policy.patch delete mode 100644 SOURCES/libvirt-lib-Set-up-cpuset-controller-for-restrictive-numatune.patch delete mode 100644 SOURCES/libvirt-node_device-Rework-udevKludgeStorageType.patch delete mode 100644 SOURCES/libvirt-node_device-Treat-NVMe-disks-as-regular-disks.patch delete mode 100644 SOURCES/libvirt-node_device_conf-Avoid-memleak-in-virNodeDeviceGetPCIVPDDynamicCap.patch delete mode 100644 SOURCES/libvirt-nodedev-add-optional-device-address-of-channel-device-to-css-device.patch delete mode 100644 SOURCES/libvirt-nodedev-add-tests-for-optional-device-address-to-css-device.patch delete mode 100644 SOURCES/libvirt-nodedev-fix-reported-error-msg-in-css-cap-XML-parsing.patch delete mode 100644 SOURCES/libvirt-nodedev-prevent-internal-error-on-dev_busid-parse.patch delete mode 100644 SOURCES/libvirt-nodedev-refactor-ccw-device-address-parsing-from-XML.patch delete mode 100644 SOURCES/libvirt-nodedev-refactor-css-XML-parsing-from-ccw-XML-parsing.patch delete mode 100644 SOURCES/libvirt-nodedev-refactor-css-format-from-ccw-format-method.patch delete mode 100644 SOURCES/libvirt-nodedev-update-transient-mdevs.patch delete mode 100644 SOURCES/libvirt-nwfilter-fix-crash-when-counting-number-of-network-filters.patch delete mode 100644 SOURCES/libvirt-qemu-Add-qemuDomainSetMaxMemLock-helper.patch delete mode 100644 SOURCES/libvirt-qemu-Ignore-missing-vm.unprivileged_userfaultfd-sysctl.patch delete mode 100644 SOURCES/libvirt-qemu-Make-struct-_qemuMonitorMessage-private.patch delete mode 100644 SOURCES/libvirt-qemu-Validate-domain-definition-even-on-migration.patch delete mode 100644 SOURCES/libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch delete mode 100644 SOURCES/libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch delete mode 100644 SOURCES/libvirt-qemu-fix-inactive-snapshot-revert.patch delete mode 100644 SOURCES/libvirt-qemu-gpu-Get-pid-without-binary-validation.patch delete mode 100644 SOURCES/libvirt-qemu-monitor-Drop-old-monitor-fields-from-struct-_qemuMonitorMessage.patch delete mode 100644 SOURCES/libvirt-qemu-monitor-Move-declaration-of-struct-_qemuMonitor-to-qemu_monitor_priv.h.patch delete mode 100644 SOURCES/libvirt-qemu-monitor-Store-whether-query-named-block-nodes-supports-flat-parameter.patch delete mode 100644 SOURCES/libvirt-qemu-qemuBlockGetNamedNodeData-Remove-pointless-error-path.patch delete mode 100644 SOURCES/libvirt-qemu-relax-shared-memory-check-for-vhostuser-daemons.patch delete mode 100644 SOURCES/libvirt-qemu-tpm-Get-swtpm-pid-without-binary-validation.patch delete mode 100644 SOURCES/libvirt-qemu-virtiofs-format-thread-pool-size.patch delete mode 100644 SOURCES/libvirt-qemuAgentGetDisks-Don-t-use-virJSONValueObjectGetStringArray-for-optional-data.patch delete mode 100644 SOURCES/libvirt-qemuDomainSetupDisk-Initialize-targetPaths.patch delete mode 100644 SOURCES/libvirt-qemuMonitorJSONBlockStatsUpdateCapacityBlockdev-Use-flat-mode-of-query-named-block-nodes.patch delete mode 100644 SOURCES/libvirt-qemuProcessReconnect-Don-t-build-memory-paths.patch delete mode 100644 SOURCES/libvirt-qemu_capabilities-Detect-memory-backend-.prealloc-threads-property.patch delete mode 100644 SOURCES/libvirt-qemu_command-Generate-memory-only-after-controllers.patch delete mode 100644 SOURCES/libvirt-qemu_command-Generate-prealloc-threads-property.patch delete mode 100644 SOURCES/libvirt-qemu_domain-Format-qemuDomainObjPrivate-originalMemlock.patch delete mode 100644 SOURCES/libvirt-qemu_migration-Implement-VIR_MIGRATE_ZEROCOPY-flag.patch delete mode 100644 SOURCES/libvirt-qemu_migration-Restore-original-memory-locking-limit.patch delete mode 100644 SOURCES/libvirt-qemu_migration-Use-qemuDomainSetMaxMemLock.patch delete mode 100644 SOURCES/libvirt-qemu_namespace-Don-t-leak-memory-in-qemuDomainGetPreservedMounts.patch delete mode 100644 SOURCES/libvirt-qemu_namespace-Fix-a-corner-case-in-qemuDomainGetPreservedMounts.patch delete mode 100644 SOURCES/libvirt-qemu_namespace-Introduce-qemuDomainNamespaceSetupPath.patch delete mode 100644 SOURCES/libvirt-qemu_namespace-Tolerate-missing-ACLs-when-creating-a-path-in-namespace.patch delete mode 100644 SOURCES/libvirt-qemu_process-Don-t-require-a-hugetlbfs-mount-for-memfd.patch delete mode 100644 SOURCES/libvirt-qemu_process.c-Propagate-hugetlbfs-mounts-on-reconnect.patch delete mode 100644 SOURCES/libvirt-qemu_tpm-Do-async-IO-when-starting-swtpm-emulator.patch delete mode 100644 SOURCES/libvirt-qemu_validate-Validate-prealloc-threads-against-qemuCpas.patch delete mode 100644 SOURCES/libvirt-remote-check-for-negative-array-lengths-before-allocation.patch delete mode 100644 SOURCES/libvirt-rpc-Fix-memory-leak-of-fds.patch delete mode 100644 SOURCES/libvirt-rpc-ensure-temporary-GSource-is-removed-from-client-event-loop.patch delete mode 100644 SOURCES/libvirt-schemas-refactor-out-nodedev-ccw-address-schema.patch delete mode 100644 SOURCES/libvirt-security_selinux.c-Relabel-existing-mode-bind-UNIX-sockets.patch delete mode 100644 SOURCES/libvirt-tools-Fix-install_mode-for-some-scripts.patch delete mode 100644 SOURCES/libvirt-util-Fix-error-return-for-virProcessKillPainfullyDelay.patch delete mode 100644 SOURCES/libvirt-util-add-ccw-device-address-parsing-into-virccw.patch delete mode 100644 SOURCES/libvirt-util-add-virCCWDeviceAddressFromString-to-virccw.patch delete mode 100644 SOURCES/libvirt-util-json-Split-out-array-strinlist-conversion-from-virJSONValueObjectGetStringArray.patch delete mode 100644 SOURCES/libvirt-util-make-reuse-of-ccw-device-address-format-constant.patch delete mode 100644 SOURCES/libvirt-util-refactor-ccw-address-constants-into-virccw.patch delete mode 100644 SOURCES/libvirt-util-refactor-virDomainCCWAddressAsString-into-virccw.patch delete mode 100644 SOURCES/libvirt-util-refactor-virDomainCCWAddressIncrement-into-virccw.patch delete mode 100644 SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddress-into-virccw.h.patch delete mode 100644 SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressEqual-into-virccw.patch delete mode 100644 SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressIsValid-into-virccw.patch delete mode 100644 SOURCES/libvirt-virDomainDiskDefValidate-Improve-error-messages-for-startupPolicy-checks.patch delete mode 100644 SOURCES/libvirt-virDomainDiskDefValidateStartupPolicy-Validate-disk-type-better.patch delete mode 100644 SOURCES/libvirt-virDomainDiskTranslateSourcePool-Fix-check-of-startupPolicy-definition.patch delete mode 100644 SOURCES/libvirt-vircpi-Add-PCIe-5.0-and-6.0-link-speeds.patch delete mode 100644 SOURCES/libvirt-virnuma-Avoid-integer-overflow-in-virNumaGetPages.patch delete mode 100644 SOURCES/libvirt-virpci-Resolve-leak-in-virPCIVirtualFunctionList-cleanup.patch delete mode 100644 SOURCES/libvirt-virpidfile-Add-virPidFileReadPathIfLocked-func.patch delete mode 100644 SOURCES/libvirt-virsh-Add-support-for-VIR_MIGRATE_ZEROCOPY-flag.patch delete mode 100644 SOURCES/symlinks delete mode 100644 SPECS/libvirt.spec create mode 100644 libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch create mode 100644 libvirt-qemu-do-not-use-deprecated-options-for-new-virtiofsd.patch create mode 100644 libvirt-qemu-fill-capabilities-for-virtiofsd.patch create mode 100644 libvirt-qemu-migration-allow-migration-for-virtiofs.patch create mode 100644 libvirt-qemu-virtiofs-cache-use-never-instead-of-none.patch create mode 100644 libvirt-qemu_domain-Strip-acpi-from-s390-x-definitions.patch create mode 100644 libvirt-qemuxmlconftest-Add-tests-for-the-ACPI-stripping-hack-on-s390.patch create mode 100644 libvirt-tests-qemuxmlconf-adjust-test-case-to-new-virtiofsd.patch create mode 100644 libvirt-tests-vhostuser-add-virtiofsd-json-descriptor.patch create mode 100644 libvirt-virt-host-validate-Allow-longer-list-of-CPU-flags.patch create mode 100644 libvirt-virt-host-validate-Drop-extra-PASS.patch create mode 100644 libvirt-vmx-Be-even-more-lax-when-trying-to-comprehend-serial-ports.patch create mode 100644 libvirt-vmx-Do-not-require-all-ID-data-for-VMWare-Distributed-Switch.patch create mode 100644 libvirt-vsh-Allow-vshReadlineInit-to-be-called-multiple-times.patch create mode 100644 libvirt.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index fbb5a7e..60a5670 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libvirt-8.0.0.tar.xz +libvirt-10.5.0.tar.xz diff --git a/.libvirt.metadata b/.libvirt.metadata deleted file mode 100644 index 76dff0f..0000000 --- a/.libvirt.metadata +++ /dev/null @@ -1 +0,0 @@ -e440412e9b45d7e24f0ef492d8edf5cf2cbd3f4c SOURCES/libvirt-8.0.0.tar.xz diff --git a/SOURCES/libvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch b/SOURCES/libvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch deleted file mode 100644 index b65e479..0000000 --- a/SOURCES/libvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9c2fd182a02d64004e30900c52e3fcdb550de0bd Mon Sep 17 00:00:00 2001 -Message-Id: <9c2fd182a02d64004e30900c52e3fcdb550de0bd@dist-git> -From: Jiri Denemark -Date: Wed, 22 Jun 2022 16:35:50 +0200 -Subject: [PATCH] Add VIR_MIGRATE_ZEROCOPY flag -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The flag can be used to enable zero-copy mechanism for migrating memory -pages. - -Signed-off-by: Jiri Denemark -Reviewed-by: Ján Tomko -(cherry picked from commit 8744beecb36600e773c8a8c4823db2bf4b3e262d) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Conflicts: - include/libvirt/libvirt-domain.h - - post-copy recovery not backported - -Signed-off-by: Jiri Denemark ---- - include/libvirt/libvirt-domain.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h -index 5f0a9b7572..792973ce2d 100644 ---- a/include/libvirt/libvirt-domain.h -+++ b/include/libvirt/libvirt-domain.h -@@ -860,6 +860,14 @@ typedef enum { - */ - VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES = (1 << 18), - -+ /* Use zero-copy mechanism for migrating memory pages. For QEMU/KVM this -+ * means QEMU will be temporarily allowed to lock all guest pages in host's -+ * memory, although only those that are queued for transfer will be locked -+ * at the same time. -+ * -+ * Since: 8.5.0 -+ */ -+ VIR_MIGRATE_ZEROCOPY = (1 << 20), - } virDomainMigrateFlags; - - --- -2.35.1 - diff --git a/SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch b/SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch deleted file mode 100644 index df16973..0000000 --- a/SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch +++ /dev/null @@ -1,47 +0,0 @@ -From f0d0a6a9701522eee013682eb0ef566ef7cdac61 Mon Sep 17 00:00:00 2001 -Message-Id: -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Mon, 22 Feb 2016 12:51:51 +0100 -Subject: [PATCH] RHEL: Add rhel machine types to qemuDomainMachineNeedsFDC - -RHEL-only. - -pc-q35-rhel7.0.0 and pc-q35-rhel7.1.0 do not need an explicit -isa-fdc controller. - -https://bugzilla.redhat.com/show_bug.cgi?id=1227880 - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_domain.c | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c -index a8401bac30..40fe9985e6 100644 ---- a/src/qemu/qemu_domain.c -+++ b/src/qemu/qemu_domain.c -@@ -8767,8 +8767,19 @@ qemuDomainHasBuiltinIDE(const virDomainDef *def) - bool - qemuDomainNeedsFDC(const virDomainDef *def) - { -- /* all supported Q35 machines need explicit FDC */ -- return qemuDomainIsQ35(def); -+ const char *p; -+ -+ /* all supported Q35 machines need explicit FDC except for old RHEL-7 -+ * machine types */ -+ if (!qemuDomainIsQ35(def)) -+ return false; -+ -+ if ((p = STRSKIP(def->os.machine, "pc-q35-")) && -+ (STRPREFIX(p, "rhel7.0.0") || -+ STRPREFIX(p, "rhel7.1.0"))) -+ return false; -+ -+ return true; - } - - --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch b/SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch deleted file mode 100644 index 1505def..0000000 --- a/SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch +++ /dev/null @@ -1,257 +0,0 @@ -From b2529d5ff3a18a2b0022da75431cea5bf037819e Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Wed, 28 Jul 2021 17:37:21 +0200 -Subject: [PATCH] RHEL: Enable usage of x-blockdev-reopen -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RHEL-only - -Introduce a new capability QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API -based on the presence of '__com.redhat_rhel-av-8_2_0-api' feature for -'x-blockdev-reopen' which states that reopen works for what libvirt -is going to use it and wire up code to call the x- prefixed command. - -This implementation will become dormant once qemu starts supporting -upstream-stable blockdev-reopen. - -https://bugzilla.redhat.com/show_bug.cgi?id=1799013 - -Starting with libvirt-7.6, upstream has adapted to the new format of -arguments so this patch was modified to support blockdev-reopen which -takes an array of nodes to reopen. - -https://bugzilla.redhat.com/show_bug.cgi?id=1929765 -Message-Id: <3fcde2fc6add36d5276ae224caf18adc8bca7d48.1627486352.git.pkrempa@redhat.com> -Reviewed-by: Ján Tomko ---- - src/qemu/qemu_block.c | 24 +++++++++++++++--------- - src/qemu/qemu_block.h | 3 ++- - src/qemu/qemu_capabilities.c | 13 +++++++++++++ - src/qemu/qemu_capabilities.h | 3 +++ - src/qemu/qemu_monitor.c | 5 +++-- - src/qemu/qemu_monitor.h | 3 ++- - src/qemu/qemu_monitor_json.c | 12 +++++++++--- - src/qemu/qemu_monitor_json.h | 3 ++- - tests/qemumonitorjsontest.c | 2 +- - 9 files changed, 50 insertions(+), 18 deletions(-) - -diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c -index e5ff653a60..aa566d0097 100644 ---- a/src/qemu/qemu_block.c -+++ b/src/qemu/qemu_block.c -@@ -3331,7 +3331,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc, - - int - qemuBlockReopenFormatMon(qemuMonitor *mon, -- virStorageSource *src) -+ virStorageSource *src, -+ bool downstream) - { - g_autoptr(virJSONValue) reopenprops = NULL; - g_autoptr(virJSONValue) srcprops = NULL; -@@ -3340,15 +3341,19 @@ qemuBlockReopenFormatMon(qemuMonitor *mon, - if (!(srcprops = qemuBlockStorageSourceGetBlockdevProps(src, src->backingStore))) - return -1; - -- if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0) -- return -1; -+ if (downstream) { -+ reopenprops = g_steal_pointer(&srcprops); -+ } else { -+ if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0) -+ return -1; - -- if (virJSONValueObjectAdd(&reopenprops, -- "a:options", &reopenoptions, -- NULL) < 0) -- return -1; -+ if (virJSONValueObjectAdd(&reopenprops, -+ "a:options", &reopenoptions, -+ NULL) < 0) -+ return -1; -+ } - -- if (qemuMonitorBlockdevReopen(mon, &reopenprops) < 0) -+ if (qemuMonitorBlockdevReopen(mon, &reopenprops, downstream) < 0) - return -1; - - return 0; -@@ -3372,6 +3377,7 @@ qemuBlockReopenFormat(virDomainObj *vm, - { - qemuDomainObjPrivate *priv = vm->privateData; - virQEMUDriver *driver = priv->driver; -+ bool downstream = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API); - int rc; - - /* If we are lacking the object here, qemu might have opened an image with -@@ -3385,7 +3391,7 @@ qemuBlockReopenFormat(virDomainObj *vm, - if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) - return -1; - -- rc = qemuBlockReopenFormatMon(priv->mon, src); -+ rc = qemuBlockReopenFormatMon(priv->mon, src, downstream); - - qemuDomainObjExitMonitor(driver, vm); - if (rc < 0) -diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h -index 184a549d5c..130cfcdefd 100644 ---- a/src/qemu/qemu_block.h -+++ b/src/qemu/qemu_block.h -@@ -267,7 +267,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc, - /* only for use in qemumonitorjsontest */ - int - qemuBlockReopenFormatMon(qemuMonitor *mon, -- virStorageSource *src); -+ virStorageSource *src, -+ bool downstream); - - int - qemuBlockReopenReadWrite(virDomainObj *vm, -diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c -index 5f1eb5014c..8ae80ef8d7 100644 ---- a/src/qemu/qemu_capabilities.c -+++ b/src/qemu/qemu_capabilities.c -@@ -654,6 +654,9 @@ VIR_ENUM_IMPL(virQEMUCaps, - "rbd-encryption", /* QEMU_CAPS_RBD_ENCRYPTION */ - "sev-guest-kernel-hashes", /* QEMU_CAPS_SEV_GUEST_KERNEL_HASHES */ - "sev-inject-launch-secret", /* QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET */ -+ -+ /* 420 */ -+ "blockdev-reopen.__com.redhat_rhel-av-8_2_0-api", /* QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API */ - ); - - -@@ -1540,6 +1543,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVhostUserFS[] = - /* see documentation for virQEMUQAPISchemaPathGet for the query format */ - static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { - { "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT }, -+ { "x-blockdev-reopen/$__com.redhat_rhel-av-8_2_0-api", QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API }, - { "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUSTER_DEBUG_LEVEL}, - { "blockdev-add/arg-type/+gluster/debug", QEMU_CAPS_GLUSTER_DEBUG_LEVEL}, - { "blockdev-add/arg-type/+vxhs", QEMU_CAPS_VXHS}, -@@ -5235,6 +5239,15 @@ virQEMUCapsInitProcessCaps(virQEMUCaps *qemuCaps) - qemuCaps->arch == VIR_ARCH_MIPS) - virQEMUCapsSet(qemuCaps, QEMU_CAPS_SCSI_NCR53C90); - -+ /* RHEL-only: -+ * - if upstream blockdev-reopen is enabled, clear the downstream flag -+ * - if the downstream flag is present but not the upstream, assert the upstream flag too -+ */ -+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN)) -+ virQEMUCapsClear(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API); -+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API)) -+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN); -+ - virQEMUCapsInitProcessCapsInterlock(qemuCaps); - } - -diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h -index e3a3ab4445..cde6c18b4c 100644 ---- a/src/qemu/qemu_capabilities.h -+++ b/src/qemu/qemu_capabilities.h -@@ -634,6 +634,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ - QEMU_CAPS_SEV_GUEST_KERNEL_HASHES, /* sev-guest.kernel-hashes= */ - QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET, /* 'sev-inject-launch-secret' qmp command present */ - -+ /* 420 */ -+ QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API, /* downstream support for blockdev reopen in rhel-av-8.2.0 */ -+ - QEMU_CAPS_LAST /* this must always be the last item */ - } virQEMUCapsFlags; - -diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c -index babf9e62fb..23638d3fe8 100644 ---- a/src/qemu/qemu_monitor.c -+++ b/src/qemu/qemu_monitor.c -@@ -4247,14 +4247,15 @@ qemuMonitorBlockdevAdd(qemuMonitor *mon, - - int - qemuMonitorBlockdevReopen(qemuMonitor *mon, -- virJSONValue **props) -+ virJSONValue **props, -+ bool downstream) - { - VIR_DEBUG("props=%p (node-name=%s)", *props, - NULLSTR(virJSONValueObjectGetString(*props, "node-name"))); - - QEMU_CHECK_MONITOR(mon); - -- return qemuMonitorJSONBlockdevReopen(mon, props); -+ return qemuMonitorJSONBlockdevReopen(mon, props, downstream); - } - - -diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h -index 9b2e4e1421..d2037914be 100644 ---- a/src/qemu/qemu_monitor.h -+++ b/src/qemu/qemu_monitor.h -@@ -1426,7 +1426,8 @@ int qemuMonitorBlockdevAdd(qemuMonitor *mon, - virJSONValue **props); - - int qemuMonitorBlockdevReopen(qemuMonitor *mon, -- virJSONValue **props); -+ virJSONValue **props, -+ bool downstream); - - int qemuMonitorBlockdevDel(qemuMonitor *mon, - const char *nodename); -diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c -index b0b513683b..34a46b9b41 100644 ---- a/src/qemu/qemu_monitor_json.c -+++ b/src/qemu/qemu_monitor_json.c -@@ -8051,13 +8051,19 @@ qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, - - int - qemuMonitorJSONBlockdevReopen(qemuMonitor *mon, -- virJSONValue **props) -+ virJSONValue **props, -+ bool downstream) - { - g_autoptr(virJSONValue) cmd = NULL; - g_autoptr(virJSONValue) reply = NULL; - -- if (!(cmd = qemuMonitorJSONMakeCommandInternal("blockdev-reopen", props))) -- return -1; -+ if (downstream) { -+ if (!(cmd = qemuMonitorJSONMakeCommandInternal("x-blockdev-reopen", props))) -+ return -1; -+ } else { -+ if (!(cmd = qemuMonitorJSONMakeCommandInternal("blockdev-reopen", props))) -+ return -1; -+ } - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; -diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h -index 64d9ebdaa3..15ce03d7af 100644 ---- a/src/qemu/qemu_monitor_json.h -+++ b/src/qemu/qemu_monitor_json.h -@@ -748,7 +748,8 @@ qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, - - int - qemuMonitorJSONBlockdevReopen(qemuMonitor *mon, -- virJSONValue **props) -+ virJSONValue **props, -+ bool downstream) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); - - int -diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c -index 48e2a457ab..8624a547b5 100644 ---- a/tests/qemumonitorjsontest.c -+++ b/tests/qemumonitorjsontest.c -@@ -2780,7 +2780,7 @@ testQemuMonitorJSONBlockdevReopen(const void *opaque) - if (qemuMonitorTestAddItem(test, "blockdev-reopen", "{\"return\":{}}") < 0) - return -1; - -- if (qemuBlockReopenFormatMon(qemuMonitorTestGetMonitor(test), src) < 0) -+ if (qemuBlockReopenFormatMon(qemuMonitorTestGetMonitor(test), src, false) < 0) - return -1; - - return 0; --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch b/SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch deleted file mode 100644 index 4fd27b2..0000000 --- a/SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 29eb7b77805cf5fb756c964cdbe7fb7fb2c01f5f Mon Sep 17 00:00:00 2001 -Message-Id: <29eb7b77805cf5fb756c964cdbe7fb7fb2c01f5f@dist-git> -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -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 - -https: //bugzilla.redhat.com/show_bug.cgi?id=1582222 -Reviewed-by: Andrea Bolognani ---- - src/util/virhostcpu.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c -index a07c00a0e9..35f41daef2 100644 ---- a/src/util/virhostcpu.c -+++ b/src/util/virhostcpu.c -@@ -1166,6 +1166,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.34.1 - diff --git a/SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch b/SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch deleted file mode 100644 index 77ba3f8..0000000 --- a/SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 1d93a3944a200b7c955800faa598e0e11da098f8 Mon Sep 17 00:00:00 2001 -Message-Id: <1d93a3944a200b7c955800faa598e0e11da098f8@dist-git> -From: Jiri Denemark -Date: Fri, 27 Mar 2015 12:48:40 +0100 -Subject: [PATCH] RHEL: Hack around changed Broadwell/Haswell CPUs - -RHEL-only - -Upstream tried to solve the change of Broadwell and Haswell CPUs by -removing rtm and hle features from the corresponding CPU models for new -machine types. Then they reverted this and introduced new *-noTSX models -instead. However, the original fix was backported to RHEL. - -This patch makes sure Broadwell and Haswell will always contain rtm and -hle features regardless on RHEL version or machine type used. - -https://bugzilla.redhat.com/show_bug.cgi?id=1199446 - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_command.c | 22 +++++++++++++++++++ - tests/qemuxml2argvdata/cpu-Haswell.args | 2 +- - .../qemuxml2argvdata/cpu-host-model-cmt.args | 2 +- - .../cpu-translation.x86_64-4.0.0.args | 2 +- - .../cpu-translation.x86_64-latest.args | 2 +- - tests/qemuxml2argvdata/cpu-tsc-frequency.args | 2 +- - tests/qemuxml2argvdata/q35-acpi-nouefi.args | 2 +- - tests/qemuxml2argvdata/q35-acpi-uefi.args | 2 +- - tests/qemuxml2argvdata/q35-noacpi-nouefi.args | 2 +- - 9 files changed, 30 insertions(+), 8 deletions(-) - -diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c -index d822533ccb..6b4647a711 100644 ---- a/src/qemu/qemu_command.c -+++ b/src/qemu/qemu_command.c -@@ -6521,6 +6521,8 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, - { - size_t i; - virCPUDef *cpu = def->cpu; -+ bool hle = false; -+ bool rtm = false; - - switch ((virCPUMode) cpu->mode) { - case VIR_CPU_MODE_HOST_PASSTHROUGH: -@@ -6587,6 +6589,12 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, - for (i = 0; i < cpu->nfeatures; i++) { - const char *featname = - virQEMUCapsCPUFeatureToQEMU(qemuCaps, cpu->features[i].name); -+ -+ if (STREQ("rtm", cpu->features[i].name)) -+ rtm = true; -+ if (STREQ("hle", cpu->features[i].name)) -+ hle = true; -+ - switch ((virCPUFeaturePolicy) cpu->features[i].policy) { - case VIR_CPU_FEATURE_FORCE: - case VIR_CPU_FEATURE_REQUIRE: -@@ -6604,6 +6612,20 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, - } - } - -+ /* Some versions of qemu-kvm in RHEL provide Broadwell and Haswell CPU -+ * models which lack rtm and hle features when used with some machine -+ * types. Let's make sure Broadwell and Haswell will always have these -+ * features. But only if the features were not explicitly mentioned in -+ * the guest CPU definition. -+ */ -+ if (STREQ_NULLABLE(cpu->model, "Broadwell") || -+ STREQ_NULLABLE(cpu->model, "Haswell")) { -+ if (!rtm) -+ virBufferAddLit(buf, ",rtm=on"); -+ if (!hle) -+ virBufferAddLit(buf, ",hle=on"); -+ } -+ - return 0; - } - -diff --git a/tests/qemuxml2argvdata/cpu-Haswell.args b/tests/qemuxml2argvdata/cpu-Haswell.args -index b57fdfddc5..965274c1f0 100644 ---- a/tests/qemuxml2argvdata/cpu-Haswell.args -+++ b/tests/qemuxml2argvdata/cpu-Haswell.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ - -machine pc,usb=off,dump-guest-core=off \ - -accel kvm \ ---cpu Haswell \ -+-cpu Haswell,rtm=on,hle=on \ - -m 214 \ - -realtime mlock=off \ - -smp 6,sockets=6,cores=1,threads=1 \ -diff --git a/tests/qemuxml2argvdata/cpu-host-model-cmt.args b/tests/qemuxml2argvdata/cpu-host-model-cmt.args -index 0de04e877d..602f70de86 100644 ---- a/tests/qemuxml2argvdata/cpu-host-model-cmt.args -+++ b/tests/qemuxml2argvdata/cpu-host-model-cmt.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ - -machine pc,usb=off,dump-guest-core=off \ - -accel tcg \ ---cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on \ -+-cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on,rtm=on,hle=on \ - -m 214 \ - -realtime mlock=off \ - -smp 6,sockets=6,cores=1,threads=1 \ -diff --git a/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args -index 09141106d5..ace08d5d76 100644 ---- a/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args -+++ b/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ - -machine pc-i440fx-4.0,usb=off,dump-guest-core=off \ - -accel tcg \ ---cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \ -+-cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,rtm=on,hle=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \ - -m 214 \ - -overcommit mem-lock=off \ - -smp 1,sockets=1,cores=1,threads=1 \ -diff --git a/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args -index 2dab572a6b..a9f7c4b910 100644 ---- a/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args -@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ - -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ - -accel tcg \ ---cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \ -+-cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,rtm=on,hle=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \ - -m 214 \ - -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ - -overcommit mem-lock=off \ -diff --git a/tests/qemuxml2argvdata/cpu-tsc-frequency.args b/tests/qemuxml2argvdata/cpu-tsc-frequency.args -index 4a032f5d85..48fb75abcc 100644 ---- a/tests/qemuxml2argvdata/cpu-tsc-frequency.args -+++ b/tests/qemuxml2argvdata/cpu-tsc-frequency.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ - -machine pc,usb=off,dump-guest-core=off \ - -accel kvm \ ---cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on,invtsc=on,tsc-frequency=4567890000 \ -+-cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on,invtsc=on,rtm=on,hle=on,tsc-frequency=4567890000 \ - -m 214 \ - -realtime mlock=off \ - -smp 1,sockets=1,cores=1,threads=1 \ -diff --git a/tests/qemuxml2argvdata/q35-acpi-nouefi.args b/tests/qemuxml2argvdata/q35-acpi-nouefi.args -index 3faee48c77..a1f742712d 100644 ---- a/tests/qemuxml2argvdata/q35-acpi-nouefi.args -+++ b/tests/qemuxml2argvdata/q35-acpi-nouefi.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \ - -machine q35,usb=off,dump-guest-core=off \ - -accel tcg \ ---cpu Haswell \ -+-cpu Haswell,rtm=on,hle=on \ - -m 1024 \ - -realtime mlock=off \ - -smp 1,sockets=1,cores=1,threads=1 \ -diff --git a/tests/qemuxml2argvdata/q35-acpi-uefi.args b/tests/qemuxml2argvdata/q35-acpi-uefi.args -index 60da1e282a..620056223a 100644 ---- a/tests/qemuxml2argvdata/q35-acpi-uefi.args -+++ b/tests/qemuxml2argvdata/q35-acpi-uefi.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \ - -machine q35,usb=off,dump-guest-core=off \ - -accel tcg \ ---cpu Haswell \ -+-cpu Haswell,rtm=on,hle=on \ - -drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \ - -drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,unit=1 \ - -m 1024 \ -diff --git a/tests/qemuxml2argvdata/q35-noacpi-nouefi.args b/tests/qemuxml2argvdata/q35-noacpi-nouefi.args -index 14e5bbc22a..ea66536c2a 100644 ---- a/tests/qemuxml2argvdata/q35-noacpi-nouefi.args -+++ b/tests/qemuxml2argvdata/q35-noacpi-nouefi.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \ - -machine q35,usb=off,dump-guest-core=off \ - -accel tcg \ ---cpu Haswell \ -+-cpu Haswell,rtm=on,hle=on \ - -m 1024 \ - -realtime mlock=off \ - -smp 1,sockets=1,cores=1,threads=1 \ --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-Remove-glib-2.64.0-workaround-for-GSource-race.patch b/SOURCES/libvirt-RHEL-Remove-glib-2.64.0-workaround-for-GSource-race.patch deleted file mode 100644 index 5808523..0000000 --- a/SOURCES/libvirt-RHEL-Remove-glib-2.64.0-workaround-for-GSource-race.patch +++ /dev/null @@ -1,89 +0,0 @@ -From b550b671bace6d979a0763a837ce97ddf72e8fc8 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Martin Kletzander -Date: Fri, 28 Jan 2022 20:33:12 +0100 -Subject: [PATCH] RHEL: Remove -Reviewed-by: Peter Krempa ---- - src/util/glibcompat.c | 46 ++++++++----------------------------------- - 1 file changed, 8 insertions(+), 38 deletions(-) - -diff --git a/src/util/glibcompat.c b/src/util/glibcompat.c -index eb6dcc0111..bf890f10d2 100644 ---- a/src/util/glibcompat.c -+++ b/src/util/glibcompat.c -@@ -212,51 +212,21 @@ vir_g_strdup_vprintf(const char *msg, va_list args) - 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 -+ * This is a leftover of a hack that works around glib older than 2.64.0, but -+ * the fix in glib as backported in RHEL-8 to glib2-2.56.4-12 in BZ 1948988: - * -- * Thus we're using an idle func to release our ref... -+ * https://bugzilla.redhat.com/show_bug.cgi?id=1948988 - * -- * ...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. -+ * and our workaround coupled with that glib fix started causing leaks, which -+ * surfaced with us not unreferencing the qemu monitor socket in BZ 2045879: - * -- * The function below is used from a header file definition. -+ * https://bugzilla.redhat.com/show_bug.cgi?id=2045879 - * -- * Drop when min glib >= 2.64.0 -+ * Keeping this wrapper makes it easier to follow with other backports without -+ * conflicts in callers due to the function name change. - */ --#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 --- -2.35.1 - diff --git a/SOURCES/libvirt-RHEL-qemu-Add-ability-to-set-sgio-values-for-hostdev.patch b/SOURCES/libvirt-RHEL-qemu-Add-ability-to-set-sgio-values-for-hostdev.patch deleted file mode 100644 index 0dddc76..0000000 --- a/SOURCES/libvirt-RHEL-qemu-Add-ability-to-set-sgio-values-for-hostdev.patch +++ /dev/null @@ -1,81 +0,0 @@ -From d6956a1aaa8757fab60132c3ee46c2bb199a78a8 Mon Sep 17 00:00:00 2001 -Message-Id: -From: John Ferlan -Date: Mon, 17 Dec 2018 20:42:30 -0500 -Subject: [PATCH] RHEL: qemu: Add ability to set sgio values for hostdev -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -https://bugzilla.redhat.com/show_bug.cgi?id=1582424 - -RHEL-only - -Add necessary checks in order to allow setting sgio values for a scsi -host device - -Signed-off-by: John Ferlan -Signed-off-by: Ján Tomko -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_conf.c | 25 ++++++++++++++++--------- - 1 file changed, 16 insertions(+), 9 deletions(-) - -diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c -index 6077457ff4..ba85fc6e22 100644 ---- a/src/qemu/qemu_conf.c -+++ b/src/qemu/qemu_conf.c -@@ -1841,8 +1841,9 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev) - virDomainDiskDef *disk = NULL; - virDomainHostdevDef *hostdev = NULL; - g_autofree char *sysfs_path = NULL; -+ g_autofree char *hostdev_path = NULL; - const char *path = NULL; -- int val = -1; -+ int val = 0; - - /* "sgio" is only valid for block disk; cdrom - * and floopy disk can have empty source. -@@ -1858,17 +1859,14 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev) - } else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) { - hostdev = dev->data.hostdev; - -- if (!qemuIsSharedHostdev(hostdev)) -+ if (hostdev->source.subsys.u.scsi.protocol == -+ VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) - return 0; - -- if (hostdev->source.subsys.u.scsi.sgio) { -- virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -- _("'sgio' is not supported for SCSI " -- "generic device yet ")); -+ if (!(hostdev_path = qemuGetHostdevPath(hostdev))) - return -1; -- } - -- return 0; -+ path = hostdev_path; - } else { - return 0; - } -@@ -1877,7 +1875,16 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev) - return -1; - - /* By default, filter the SG_IO commands, i.e. set unpriv_sgio to 0. */ -- val = (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED); -+ if (dev->type == VIR_DOMAIN_DEVICE_DISK) { -+ if (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED) -+ val = 1; -+ } else { -+ /* Only settable if was present for hostdev */ -+ if (qemuIsSharedHostdev(hostdev) && -+ hostdev->source.subsys.u.scsi.sgio == -+ VIR_DOMAIN_DEVICE_SGIO_UNFILTERED) -+ val = 1; -+ } - - /* Do not do anything if unpriv_sgio is not supported by the kernel and the - * whitelist is enabled. But if requesting unfiltered access, always call --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-qemu-Add-check-for-unpriv-sgio-for-SCSI-generic-host-device.patch b/SOURCES/libvirt-RHEL-qemu-Add-check-for-unpriv-sgio-for-SCSI-generic-host-device.patch deleted file mode 100644 index b6ad4ea..0000000 --- a/SOURCES/libvirt-RHEL-qemu-Add-check-for-unpriv-sgio-for-SCSI-generic-host-device.patch +++ /dev/null @@ -1,66 +0,0 @@ -From f562b4c83d342002291f6bd7c5776eaecbd3147f Mon Sep 17 00:00:00 2001 -Message-Id: -From: John Ferlan -Date: Mon, 17 Dec 2018 20:42:31 -0500 -Subject: [PATCH] RHEL: qemu: Add check for unpriv sgio for SCSI generic host - device -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -https://bugzilla.redhat.com/show_bug.cgi?id=1582424 - -RHEL-only - -Check if the hostdev has set the sgio filtered/unfiltered and handle -appropriately. - -This restores functionality removed by upstream commit id 'ce346623' -to remove sgio support for the SCSI generic host device. - -Signed-off-by: John Ferlan -Signed-off-by: Ján Tomko -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_conf.c | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - -diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c -index ba85fc6e22..28c334761b 100644 ---- a/src/qemu/qemu_conf.c -+++ b/src/qemu/qemu_conf.c -@@ -1749,13 +1749,29 @@ qemuSharedHostdevAddRemoveInternal(virQEMUDriver *driver, - { - g_autofree char *dev_path = NULL; - g_autofree char *key = NULL; -+ virDomainHostdevSubsysSCSI *scsisrc = &hostdev->source.subsys.u.scsi; -+ virDomainHostdevSubsysSCSIHost *scsihostsrc = &scsisrc->u.host; - int ret = -1; - - if (!qemuIsSharedHostdev(hostdev)) - return 0; - -- if (!(dev_path = qemuGetHostdevPath(hostdev)) || -- !(key = qemuGetSharedDeviceKey(dev_path))) -+ if (!(dev_path = qemuGetHostdevPath(hostdev))) -+ return -1; -+ -+ if ((ret = qemuCheckUnprivSGIO(driver->sharedDevices, dev_path, -+ scsisrc->sgio)) < 0) { -+ if (ret == -2) { -+ virReportError(VIR_ERR_OPERATION_INVALID, -+ _("sgio of shared scsi host device '%s-%u-%u-%llu' " -+ "conflicts with other active domains"), -+ scsihostsrc->adapter, scsihostsrc->bus, -+ scsihostsrc->target, scsihostsrc->unit); -+ } -+ return -1; -+ } -+ -+ if (!(key = qemuGetSharedDeviceKey(dev_path))) - return -1; - - qemuDriverLock(driver); --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-qemu_migration-Fix-restoring-memlock-limit-on-destination.patch b/SOURCES/libvirt-RHEL-qemu_migration-Fix-restoring-memlock-limit-on-destination.patch deleted file mode 100644 index 985f693..0000000 --- a/SOURCES/libvirt-RHEL-qemu_migration-Fix-restoring-memlock-limit-on-destination.patch +++ /dev/null @@ -1,52 +0,0 @@ -From b6c1f9ca8eb0ca8f7603ab205c7dc95b9f07b5a0 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Jiri Denemark -Date: Mon, 18 Jul 2022 16:01:20 +0200 -Subject: [PATCH] RHEL: qemu_migration: Fix restoring memlock limit on - destination - -Restoring memory locking limit on the destination host only makes sense -when migration succeeded as otherwise the QEMU process will be killed -anyway. Specifically if the migration fails because the process died, -touching the limit would produce rather unhelpful error message instead -of the real issue: - - cannot get locked memory limit of process -1: No such file or - directory - -This patch is RHEL-only caused by misplacing the call to -qemuDomainSetMaxMemLock when the "qemu_migration: Restore original -memory locking limit" upstream patch was backported to an older code -base. - -https://bugzilla.redhat.com/show_bug.cgi?id=2107954 - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_migration.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c -index db5163e993..11f87296d6 100644 ---- a/src/qemu/qemu_migration.c -+++ b/src/qemu/qemu_migration.c -@@ -5895,6 +5895,8 @@ qemuMigrationDstFinish(virQEMUDriver *driver, - */ - if (inPostCopy) - g_clear_pointer(&priv->job.completed, qemuDomainJobInfoFree); -+ -+ qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock); - } - - qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN, -@@ -5907,7 +5909,6 @@ qemuMigrationDstFinish(virQEMUDriver *driver, - cleanup: - g_clear_pointer(&jobInfo, qemuDomainJobInfoFree); - virPortAllocatorRelease(port); -- qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock); - if (priv->mon) - qemuMonitorSetDomainLog(priv->mon, NULL, NULL, NULL); - VIR_FREE(priv->origname); --- -2.35.1 - diff --git a/SOURCES/libvirt-RHEL-virscsi-Check-device-type-before-getting-it-s-dev-node-name.patch b/SOURCES/libvirt-RHEL-virscsi-Check-device-type-before-getting-it-s-dev-node-name.patch deleted file mode 100644 index c467444..0000000 --- a/SOURCES/libvirt-RHEL-virscsi-Check-device-type-before-getting-it-s-dev-node-name.patch +++ /dev/null @@ -1,215 +0,0 @@ -From 9c5daeb8c99ca12a66387de448f585742887fd75 Mon Sep 17 00:00:00 2001 -Message-Id: <9c5daeb8c99ca12a66387de448f585742887fd75@dist-git> -From: Michal Privoznik -Date: Fri, 6 Mar 2020 15:52:21 +0100 -Subject: [PATCH] RHEL: virscsi: Check device type before getting it's /dev - node name - -Not all SCSI devices are block devices, therefore -/sys/bus/scsi/devices/X:X:X:X/block/ directory does not always -exist. Check if the SCSI device is a block device beforehand. - -https://bugzilla.redhat.com/show_bug.cgi?id=1808390 - -Signed-off-by: Michal Privoznik -Signed-off-by: Andrea Bolognani -Message-Id: <20200306145226.1610708-2-abologna@redhat.com> -Reviewed-by: Jiri Denemark ---- - src/util/virscsi.c | 140 ++++++++++++++++++++++++++++++--- - tests/virscsidata/0-0-0-0/type | 1 + - tests/virscsidata/1-0-0-0/type | 1 + - 3 files changed, 131 insertions(+), 11 deletions(-) - create mode 100644 tests/virscsidata/0-0-0-0/type - create mode 100644 tests/virscsidata/1-0-0-0/type - -diff --git a/src/util/virscsi.c b/src/util/virscsi.c -index 6a90d9002f..770f727cac 100644 ---- a/src/util/virscsi.c -+++ b/src/util/virscsi.c -@@ -47,6 +47,32 @@ struct _virUsedByInfo { - }; - typedef struct _virUsedByInfo virUsedByInfo; - -+ -+/* Keep in sync with scsi/scsi_proto.h */ -+typedef enum { -+ VIR_SCSI_DEVICE_TYPE_NONE = -1, -+ VIR_SCSI_DEVICE_TYPE_DISK = 0x00, -+ VIR_SCSI_DEVICE_TYPE_TAPE = 0x01, -+ VIR_SCSI_DEVICE_TYPE_PRINTER = 0x02, -+ VIR_SCSI_DEVICE_TYPE_PROCESSOR = 0x03, -+ VIR_SCSI_DEVICE_TYPE_WORM = 0x04, -+ VIR_SCSI_DEVICE_TYPE_ROM = 0x05, -+ VIR_SCSI_DEVICE_TYPE_SCANNER = 0x06, -+ VIR_SCSI_DEVICE_TYPE_MOD = 0x07, -+ VIR_SCSI_DEVICE_TYPE_MEDIUM_CHANGER = 0x08, -+ VIR_SCSI_DEVICE_TYPE_COMM = 0x09, -+ VIR_SCSI_DEVICE_TYPE_RAID = 0x0c, -+ VIR_SCSI_DEVICE_TYPE_ENCLOSURE = 0x0d, -+ VIR_SCSI_DEVICE_TYPE_RBC = 0x0e, -+ VIR_SCSI_DEVICE_TYPE_OSD = 0x11, -+ VIR_SCSI_DEVICE_TYPE_ZBC = 0x14, -+ VIR_SCSI_DEVICE_TYPE_WLUN = 0x1e, -+ VIR_SCSI_DEVICE_TYPE_NO_LUN = 0x7f, -+ -+ VIR_SCSI_DEVICE_TYPE_LAST, -+} virSCSIDeviceType; -+ -+ - struct _virSCSIDevice { - unsigned int adapter; - unsigned int bus; -@@ -126,6 +152,78 @@ virSCSIDeviceGetSgName(const char *sysfs_prefix, - return NULL; - } - -+ -+static int -+virSCSIDeviceGetType(const char *prefix, -+ unsigned int adapter, -+ unsigned int bus, -+ unsigned int target, -+ unsigned long long unit, -+ virSCSIDeviceType *type) -+{ -+ int intType; -+ -+ if (virFileReadValueInt(&intType, -+ "%s/%d:%u:%u:%llu/type", -+ prefix, adapter, bus, target, unit) < 0) -+ return -1; -+ -+ switch (intType) { -+ case VIR_SCSI_DEVICE_TYPE_DISK: -+ case VIR_SCSI_DEVICE_TYPE_TAPE: -+ case VIR_SCSI_DEVICE_TYPE_PRINTER: -+ case VIR_SCSI_DEVICE_TYPE_PROCESSOR: -+ case VIR_SCSI_DEVICE_TYPE_WORM: -+ case VIR_SCSI_DEVICE_TYPE_ROM: -+ case VIR_SCSI_DEVICE_TYPE_SCANNER: -+ case VIR_SCSI_DEVICE_TYPE_MOD: -+ case VIR_SCSI_DEVICE_TYPE_MEDIUM_CHANGER: -+ case VIR_SCSI_DEVICE_TYPE_COMM: -+ case VIR_SCSI_DEVICE_TYPE_RAID: -+ case VIR_SCSI_DEVICE_TYPE_ENCLOSURE: -+ case VIR_SCSI_DEVICE_TYPE_RBC: -+ case VIR_SCSI_DEVICE_TYPE_OSD: -+ case VIR_SCSI_DEVICE_TYPE_ZBC: -+ case VIR_SCSI_DEVICE_TYPE_WLUN: -+ case VIR_SCSI_DEVICE_TYPE_NO_LUN: -+ *type = intType; -+ break; -+ -+ default: -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ _("unknown SCSI device type: %x"), -+ intType); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+ -+static char * -+virSCSIDeviceGetDevNameBlock(const char *prefix, -+ unsigned int adapter, -+ unsigned int bus, -+ unsigned int target, -+ unsigned long long unit) -+{ -+ g_autoptr(DIR) dir = NULL; -+ struct dirent *entry; -+ g_autofree char *path = NULL; -+ -+ path = g_strdup_printf("%s/%d:%u:%u:%llu/block", -+ prefix, adapter, bus, target, unit); -+ -+ if (virDirOpen(&dir, path) < 0) -+ return NULL; -+ -+ if (virDirRead(dir, &entry, path) > 0) -+ return g_strdup(entry->d_name); -+ -+ return NULL; -+} -+ -+ - /* Returns device name (e.g. "sdc") on success, or NULL - * on failure. - */ -@@ -136,25 +234,45 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix, - unsigned int target, - unsigned long long unit) - { -- g_autoptr(DIR) dir = NULL; -- struct dirent *entry; -- g_autofree char *path = NULL; - unsigned int adapter_id; -+ virSCSIDeviceType type; - const char *prefix = sysfs_prefix ? sysfs_prefix : SYSFS_SCSI_DEVICES; - - if (virSCSIDeviceGetAdapterId(adapter, &adapter_id) < 0) - return NULL; - -- path = g_strdup_printf("%s/%d:%u:%u:%llu/block", prefix, adapter_id, bus, -- target, unit); -- -- if (virDirOpen(&dir, path) < 0) -+ if (virSCSIDeviceGetType(prefix, adapter_id, -+ bus, target, unit, &type) < 0) - return NULL; - -- if (virDirRead(dir, &entry, path) > 0) -- return g_strdup(entry->d_name); -- -- return NULL; -+ switch (type) { -+ case VIR_SCSI_DEVICE_TYPE_DISK: -+ return virSCSIDeviceGetDevNameBlock(prefix, adapter_id, bus, target, unit); -+ -+ case VIR_SCSI_DEVICE_TYPE_TAPE: -+ case VIR_SCSI_DEVICE_TYPE_PRINTER: -+ case VIR_SCSI_DEVICE_TYPE_PROCESSOR: -+ case VIR_SCSI_DEVICE_TYPE_WORM: -+ case VIR_SCSI_DEVICE_TYPE_ROM: -+ case VIR_SCSI_DEVICE_TYPE_SCANNER: -+ case VIR_SCSI_DEVICE_TYPE_MOD: -+ case VIR_SCSI_DEVICE_TYPE_MEDIUM_CHANGER: -+ case VIR_SCSI_DEVICE_TYPE_COMM: -+ case VIR_SCSI_DEVICE_TYPE_RAID: -+ case VIR_SCSI_DEVICE_TYPE_ENCLOSURE: -+ case VIR_SCSI_DEVICE_TYPE_RBC: -+ case VIR_SCSI_DEVICE_TYPE_OSD: -+ case VIR_SCSI_DEVICE_TYPE_ZBC: -+ case VIR_SCSI_DEVICE_TYPE_WLUN: -+ case VIR_SCSI_DEVICE_TYPE_NO_LUN: -+ case VIR_SCSI_DEVICE_TYPE_NONE: -+ case VIR_SCSI_DEVICE_TYPE_LAST: -+ default: -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ _("unsupported SCSI device type: %x"), -+ type); -+ return NULL; -+ } - } - - virSCSIDevice * -diff --git a/tests/virscsidata/0-0-0-0/type b/tests/virscsidata/0-0-0-0/type -new file mode 100644 -index 0000000000..573541ac97 ---- /dev/null -+++ b/tests/virscsidata/0-0-0-0/type -@@ -0,0 +1 @@ -+0 -diff --git a/tests/virscsidata/1-0-0-0/type b/tests/virscsidata/1-0-0-0/type -new file mode 100644 -index 0000000000..573541ac97 ---- /dev/null -+++ b/tests/virscsidata/1-0-0-0/type -@@ -0,0 +1 @@ -+0 --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch b/SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch deleted file mode 100644 index ad3f8bc..0000000 --- a/SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch +++ /dev/null @@ -1,272 +0,0 @@ -From 1ce4faffcd4616bbcea4d198c3f60cbcfddd784e Mon Sep 17 00:00:00 2001 -Message-Id: <1ce4faffcd4616bbcea4d198c3f60cbcfddd784e@dist-git> -From: Michal Privoznik -Date: Fri, 6 Mar 2020 15:52:23 +0100 -Subject: [PATCH] RHEL: virscsi: Introduce and use - virSCSIDeviceGetUnprivSGIOSysfsPath() - -When constructing a path to the 'unpriv_sgio' file of given SCSI -device we don't need to go through /dev/* and major() + minor() -path. The generated path points to -/sys/dev/block/MAJ:MIN/queue/unpriv_sgio which is wrong if the -SCSI device in question is not a block device. We can generate a -different path: /sys/bus/scsi/devices/X:X:X:X/unpriv_sgio where -the file is directly accessible regardless of the SCSI device -type. - -https://bugzilla.redhat.com/show_bug.cgi?id=1808390 - -Signed-off-by: Michal Privoznik -Signed-off-by: Andrea Bolognani -Message-Id: <20200306145226.1610708-4-abologna@redhat.com> -Reviewed-by: Jiri Denemark ---- - src/libvirt_private.syms | 1 + - src/qemu/qemu_conf.c | 31 +++++++++++++++++++------------ - src/util/virscsi.c | 19 +++++++++++++++++++ - src/util/virscsi.h | 5 +++++ - src/util/virutil.c | 24 ++++++------------------ - src/util/virutil.h | 2 -- - 6 files changed, 50 insertions(+), 32 deletions(-) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 5b76e66e61..2c42e2a5e8 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -3191,6 +3191,7 @@ virSCSIDeviceGetSgName; - virSCSIDeviceGetShareable; - virSCSIDeviceGetTarget; - virSCSIDeviceGetUnit; -+virSCSIDeviceGetUnprivSGIOSysfsPath; - virSCSIDeviceIsAvailable; - virSCSIDeviceListAdd; - virSCSIDeviceListCount; -diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c -index 28c334761b..a0b8076d6b 100644 ---- a/src/qemu/qemu_conf.c -+++ b/src/qemu/qemu_conf.c -@@ -1506,7 +1506,7 @@ qemuCheckUnprivSGIO(GHashTable *sharedDevices, - if (!(virHashLookup(sharedDevices, key))) - return 0; - -- if (virGetDeviceUnprivSGIO(device_path, NULL, &val) < 0) -+ if (virGetDeviceUnprivSGIO(sysfs_path, &val) < 0) - return -1; - - /* Error message on failure needs to be handled in caller -@@ -1857,39 +1857,46 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev) - virDomainDiskDef *disk = NULL; - virDomainHostdevDef *hostdev = NULL; - g_autofree char *sysfs_path = NULL; -- g_autofree char *hostdev_path = NULL; -- const char *path = NULL; - int val = 0; - - /* "sgio" is only valid for block disk; cdrom - * and floopy disk can have empty source. - */ - if (dev->type == VIR_DOMAIN_DEVICE_DISK) { -+ const char *path; -+ - disk = dev->data.disk; -+ path = virDomainDiskGetSource(disk); - - if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN || - !virStorageSourceIsBlockLocal(disk->src)) - return 0; - -- path = virDomainDiskGetSource(disk); -+ if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, NULL))) -+ return -1; -+ - } else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) { -+ virDomainHostdevSubsysSCSI *scsisrc; -+ virDomainHostdevSubsysSCSIHost *scsihostsrc; -+ - hostdev = dev->data.hostdev; -+ scsisrc = &hostdev->source.subsys.u.scsi; -+ scsihostsrc = &scsisrc->u.host; - - if (hostdev->source.subsys.u.scsi.protocol == - VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) - return 0; - -- if (!(hostdev_path = qemuGetHostdevPath(hostdev))) -+ if (!(sysfs_path = virSCSIDeviceGetUnprivSGIOSysfsPath(NULL, -+ scsihostsrc->adapter, -+ scsihostsrc->bus, -+ scsihostsrc->target, -+ scsihostsrc->unit))) - return -1; -- -- path = hostdev_path; - } else { - return 0; - } - -- if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, NULL))) -- return -1; -- - /* By default, filter the SG_IO commands, i.e. set unpriv_sgio to 0. */ - if (dev->type == VIR_DOMAIN_DEVICE_DISK) { - if (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED) -@@ -1909,11 +1916,11 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev) - if (virFileExists(sysfs_path) || val == 1) { - int curr_val; - -- if (virGetDeviceUnprivSGIO(path, NULL, &curr_val) < 0) -+ if (virGetDeviceUnprivSGIO(sysfs_path, &curr_val) < 0) - return -1; - - if (curr_val != val && -- virSetDeviceUnprivSGIO(path, NULL, val) < 0) { -+ virSetDeviceUnprivSGIO(sysfs_path, val) < 0) { - return -1; - } - } -diff --git a/src/util/virscsi.c b/src/util/virscsi.c -index 6165196423..b437fdcac0 100644 ---- a/src/util/virscsi.c -+++ b/src/util/virscsi.c -@@ -302,6 +302,25 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix, - } - } - -+ -+char * -+virSCSIDeviceGetUnprivSGIOSysfsPath(const char *sysfs_prefix, -+ const char *adapter, -+ unsigned int bus, -+ unsigned int target, -+ unsigned long long unit) -+{ -+ unsigned int adapter_id; -+ const char *prefix = sysfs_prefix ? sysfs_prefix : SYSFS_SCSI_DEVICES; -+ -+ if (virSCSIDeviceGetAdapterId(adapter, &adapter_id) < 0) -+ return NULL; -+ -+ return g_strdup_printf("%s/%d:%u:%u:%llu/unpriv_sgio", -+ prefix, adapter_id, bus, target, unit); -+} -+ -+ - virSCSIDevice * - virSCSIDeviceNew(const char *sysfs_prefix, - const char *adapter, -diff --git a/src/util/virscsi.h b/src/util/virscsi.h -index 65ad15ed76..5721985939 100644 ---- a/src/util/virscsi.h -+++ b/src/util/virscsi.h -@@ -40,6 +40,11 @@ char *virSCSIDeviceGetDevName(const char *sysfs_prefix, - unsigned int bus, - unsigned int target, - unsigned long long unit); -+char *virSCSIDeviceGetUnprivSGIOSysfsPath(const char *sysfs_prefix, -+ const char *adapter, -+ unsigned int bus, -+ unsigned int target, -+ unsigned long long unit); - - virSCSIDevice *virSCSIDeviceNew(const char *sysfs_prefix, - const char *adapter, -diff --git a/src/util/virutil.c b/src/util/virutil.c -index e04f1343d8..b1e37b45c5 100644 ---- a/src/util/virutil.c -+++ b/src/util/virutil.c -@@ -1377,18 +1377,13 @@ virGetUnprivSGIOSysfsPath(const char *path, - - int - virSetDeviceUnprivSGIO(const char *path, -- const char *sysfs_dir, - int unpriv_sgio) - { -- char *sysfs_path = NULL; - char *val = NULL; - int ret = -1; - int rc; - -- if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, sysfs_dir))) -- return -1; -- -- if (!virFileExists(sysfs_path)) { -+ if (!virFileExists(path)) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("unpriv_sgio is not supported by this kernel")); - goto cleanup; -@@ -1396,38 +1391,32 @@ virSetDeviceUnprivSGIO(const char *path, - - val = g_strdup_printf("%d", unpriv_sgio); - -- if ((rc = virFileWriteStr(sysfs_path, val, 0)) < 0) { -- virReportSystemError(-rc, _("failed to set %s"), sysfs_path); -+ if ((rc = virFileWriteStr(path, val, 0)) < 0) { -+ virReportSystemError(-rc, _("failed to set %s"), path); - goto cleanup; - } - - ret = 0; - cleanup: -- VIR_FREE(sysfs_path); - VIR_FREE(val); - return ret; - } - - int - virGetDeviceUnprivSGIO(const char *path, -- const char *sysfs_dir, - int *unpriv_sgio) - { -- char *sysfs_path = NULL; - char *buf = NULL; - char *tmp = NULL; - int ret = -1; - -- if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, sysfs_dir))) -- return -1; -- -- if (!virFileExists(sysfs_path)) { -+ if (!virFileExists(path)) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("unpriv_sgio is not supported by this kernel")); - goto cleanup; - } - -- if (virFileReadAll(sysfs_path, 1024, &buf) < 0) -+ if (virFileReadAll(path, 1024, &buf) < 0) - goto cleanup; - - if ((tmp = strchr(buf, '\n'))) -@@ -1435,13 +1424,12 @@ virGetDeviceUnprivSGIO(const char *path, - - if (virStrToLong_i(buf, NULL, 10, unpriv_sgio) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, -- _("failed to parse value of %s"), sysfs_path); -+ _("failed to parse value of %s"), path); - goto cleanup; - } - - ret = 0; - cleanup: -- VIR_FREE(sysfs_path); - VIR_FREE(buf); - return ret; - } -diff --git a/src/util/virutil.h b/src/util/virutil.h -index 854b494890..da267c6446 100644 ---- a/src/util/virutil.h -+++ b/src/util/virutil.h -@@ -120,10 +120,8 @@ int virGetDeviceID(const char *path, - int *maj, - int *min) G_GNUC_NO_INLINE; - int virSetDeviceUnprivSGIO(const char *path, -- const char *sysfs_dir, - int unpriv_sgio); - int virGetDeviceUnprivSGIO(const char *path, -- const char *sysfs_dir, - int *unpriv_sgio); - char *virGetUnprivSGIOSysfsPath(const char *path, - const char *sysfs_dir); --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch b/SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch deleted file mode 100644 index c9a8660..0000000 --- a/SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch +++ /dev/null @@ -1,200 +0,0 @@ -From 5b96a8773d33af9822f6b6ccddc8f372841895a6 Mon Sep 17 00:00:00 2001 -Message-Id: <5b96a8773d33af9822f6b6ccddc8f372841895a6@dist-git> -From: Michal Privoznik -Date: Fri, 6 Mar 2020 15:52:22 +0100 -Subject: [PATCH] RHEL: virscsi: Support TAPEs in virSCSIDeviceGetDevName() - -If the SCSI device we want to get /dev node name for is TAPE -device we need to look at 'tape' symlink in the sysfs dir -corresponding to the device. - -https://bugzilla.redhat.com/show_bug.cgi?id=1808390 - -Signed-off-by: Michal Privoznik -Signed-off-by: Andrea Bolognani -Message-Id: <20200306145226.1610708-3-abologna@redhat.com> -Reviewed-by: Jiri Denemark ---- - src/util/virscsi.c | 27 +++++++++++++++ - tests/virscsidata/2-0-0-0/model | 1 + - tests/virscsidata/2-0-0-0/scsi_tape/st0/dev | 1 + - tests/virscsidata/2-0-0-0/sg3/dev | 1 + - tests/virscsidata/2-0-0-0/tape | 1 + - tests/virscsidata/2-0-0-0/type | 1 + - tests/virscsidata/2-0-0-0/vendor | 1 + - tests/virscsidata/sg3 | 0 - tests/virscsitest.c | 38 ++++++++++++++++++--- - 9 files changed, 66 insertions(+), 5 deletions(-) - create mode 100644 tests/virscsidata/2-0-0-0/model - create mode 100644 tests/virscsidata/2-0-0-0/scsi_tape/st0/dev - create mode 100644 tests/virscsidata/2-0-0-0/sg3/dev - create mode 120000 tests/virscsidata/2-0-0-0/tape - create mode 100644 tests/virscsidata/2-0-0-0/type - create mode 100644 tests/virscsidata/2-0-0-0/vendor - create mode 100644 tests/virscsidata/sg3 - -diff --git a/src/util/virscsi.c b/src/util/virscsi.c -index 770f727cac..6165196423 100644 ---- a/src/util/virscsi.c -+++ b/src/util/virscsi.c -@@ -224,6 +224,31 @@ virSCSIDeviceGetDevNameBlock(const char *prefix, - } - - -+static char * -+virSCSIDeviceGetDevNameTape(const char *prefix, -+ unsigned int adapter, -+ unsigned int bus, -+ unsigned int target, -+ unsigned long long unit) -+{ -+ g_autofree char *path = NULL; -+ g_autofree char *resolvedPath = NULL; -+ g_autoptr(GError) err = NULL; -+ -+ path = g_strdup_printf("%s/%d:%u:%u:%llu/tape", -+ prefix, adapter, bus, target, unit); -+ -+ if (!(resolvedPath = g_file_read_link(path, &err))) { -+ virReportError(VIR_ERR_SYSTEM_ERROR, -+ _("Unable to read link: %s"), -+ err->message); -+ return NULL; -+ } -+ -+ return g_path_get_basename(resolvedPath); -+} -+ -+ - /* Returns device name (e.g. "sdc") on success, or NULL - * on failure. - */ -@@ -250,6 +275,8 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix, - return virSCSIDeviceGetDevNameBlock(prefix, adapter_id, bus, target, unit); - - case VIR_SCSI_DEVICE_TYPE_TAPE: -+ return virSCSIDeviceGetDevNameTape(prefix, adapter_id, bus, target, unit); -+ - case VIR_SCSI_DEVICE_TYPE_PRINTER: - case VIR_SCSI_DEVICE_TYPE_PROCESSOR: - case VIR_SCSI_DEVICE_TYPE_WORM: -diff --git a/tests/virscsidata/2-0-0-0/model b/tests/virscsidata/2-0-0-0/model -new file mode 100644 -index 0000000000..d2ab4715c3 ---- /dev/null -+++ b/tests/virscsidata/2-0-0-0/model -@@ -0,0 +1 @@ -+scsi_debug -diff --git a/tests/virscsidata/2-0-0-0/scsi_tape/st0/dev b/tests/virscsidata/2-0-0-0/scsi_tape/st0/dev -new file mode 100644 -index 0000000000..3dd777e840 ---- /dev/null -+++ b/tests/virscsidata/2-0-0-0/scsi_tape/st0/dev -@@ -0,0 +1 @@ -+9:0 -diff --git a/tests/virscsidata/2-0-0-0/sg3/dev b/tests/virscsidata/2-0-0-0/sg3/dev -new file mode 100644 -index 0000000000..b369a59b3e ---- /dev/null -+++ b/tests/virscsidata/2-0-0-0/sg3/dev -@@ -0,0 +1 @@ -+21:3 -diff --git a/tests/virscsidata/2-0-0-0/tape b/tests/virscsidata/2-0-0-0/tape -new file mode 120000 -index 0000000000..6ca7f77539 ---- /dev/null -+++ b/tests/virscsidata/2-0-0-0/tape -@@ -0,0 +1 @@ -+scsi_tape/st0 -\ No newline at end of file -diff --git a/tests/virscsidata/2-0-0-0/type b/tests/virscsidata/2-0-0-0/type -new file mode 100644 -index 0000000000..d00491fd7e ---- /dev/null -+++ b/tests/virscsidata/2-0-0-0/type -@@ -0,0 +1 @@ -+1 -diff --git a/tests/virscsidata/2-0-0-0/vendor b/tests/virscsidata/2-0-0-0/vendor -new file mode 100644 -index 0000000000..9b075671ea ---- /dev/null -+++ b/tests/virscsidata/2-0-0-0/vendor -@@ -0,0 +1 @@ -+Linux -diff --git a/tests/virscsidata/sg3 b/tests/virscsidata/sg3 -new file mode 100644 -index 0000000000..e69de29bb2 -diff --git a/tests/virscsitest.c b/tests/virscsitest.c -index c96699e157..924b77af08 100644 ---- a/tests/virscsitest.c -+++ b/tests/virscsitest.c -@@ -33,17 +33,33 @@ VIR_LOG_INIT("tests.scsitest"); - - static char *virscsi_prefix; - -+typedef struct { -+ const char *adapter; -+ unsigned int bus; -+ unsigned int target; -+ unsigned int unit; -+ const char *expectedName; -+} testGetDevNameData; -+ - static int --test1(const void *data G_GNUC_UNUSED) -+testGetDevName(const void *opaque) - { -+ const testGetDevNameData *data = opaque; - g_autofree char *name = NULL; - - if (!(name = virSCSIDeviceGetDevName(virscsi_prefix, -- "scsi_host1", 0, 0, 0))) -+ data->adapter, -+ data->bus, -+ data->target, -+ data->unit))) - return -1; - -- if (STRNEQ(name, "sdh")) -+ if (STRNEQ(name, data->expectedName)) { -+ fprintf(stderr, -+ "SCSI dev name mismatch, expected %s got %s", -+ data->expectedName, name); - return -1; -+ } - - return 0; - } -@@ -200,15 +216,27 @@ mymain(void) - - CREATE_SYMLINK("0-0-0-0", "0:0:0:0"); - CREATE_SYMLINK("1-0-0-0", "1:0:0:0"); -+ CREATE_SYMLINK("2-0-0-0", "2:0:0:0"); - CREATE_SYMLINK("sg0", "sg0"); -+ CREATE_SYMLINK("sg3", "sg3"); - CREATE_SYMLINK("sg8", "sg8"); - - VIR_FREE(virscsi_prefix); - - virscsi_prefix = g_strdup(tmpdir); - -- if (virTestRun("test1", test1, NULL) < 0) -- ret = -1; -+#define TEST_GET_DEV_NAME(adapter, bus, target, unit, expectedName) \ -+ do { \ -+ testGetDevNameData data = {adapter, bus, target, unit, expectedName}; \ -+ if (virTestRun("test getDevname " expectedName, \ -+ testGetDevName, &data) < 0) \ -+ ret = -1; \ -+ } while (0) -+ -+ TEST_GET_DEV_NAME("scsi_host0", 0, 0, 0, "sda"); -+ TEST_GET_DEV_NAME("scsi_host1", 0, 0, 0, "sdh"); -+ TEST_GET_DEV_NAME("scsi_host2", 0, 0, 0, "st0"); -+ - if (virTestRun("test2", test2, NULL) < 0) - ret = -1; - --- -2.34.1 - diff --git a/SOURCES/libvirt-RHEL-virutil-Accept-non-block-devices-in-virGetDeviceID.patch b/SOURCES/libvirt-RHEL-virutil-Accept-non-block-devices-in-virGetDeviceID.patch deleted file mode 100644 index 33400cc..0000000 --- a/SOURCES/libvirt-RHEL-virutil-Accept-non-block-devices-in-virGetDeviceID.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ac8357ab7dd676af82b971673f8d7e862ff07624 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Fri, 6 Mar 2020 15:52:24 +0100 -Subject: [PATCH] RHEL: virutil: Accept non-block devices in virGetDeviceID() - -If a caller wants to learn major or minor number for a device, -let them. There's no need to check if the device is a block -device here. - -https://bugzilla.redhat.com/show_bug.cgi?id=1808390 - -Signed-off-by: Michal Privoznik -Signed-off-by: Andrea Bolognani -Message-Id: <20200306145226.1610708-5-abologna@redhat.com> -Reviewed-by: Jiri Denemark ---- - src/util/virutil.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/util/virutil.c b/src/util/virutil.c -index b1e37b45c5..ced8493516 100644 ---- a/src/util/virutil.c -+++ b/src/util/virutil.c -@@ -1333,9 +1333,6 @@ virGetDeviceID(const char *path, int *maj, int *min) - if (stat(path, &sb) < 0) - return -errno; - -- if (!S_ISBLK(sb.st_mode)) -- return -EINVAL; -- - if (maj) - *maj = major(sb.st_rdev); - if (min) --- -2.34.1 - diff --git a/SOURCES/libvirt-Revert-report-error-when-virProcessGetStatInfo-is-unable-to-parse-data.patch b/SOURCES/libvirt-Revert-report-error-when-virProcessGetStatInfo-is-unable-to-parse-data.patch deleted file mode 100644 index 7d5ce9a..0000000 --- a/SOURCES/libvirt-Revert-report-error-when-virProcessGetStatInfo-is-unable-to-parse-data.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 732113455fb7eadeea178c71cc77f0ffdf639f24 Mon Sep 17 00:00:00 2001 -Message-Id: <732113455fb7eadeea178c71cc77f0ffdf639f24@dist-git> -From: Michal Privoznik -Date: Tue, 18 Jan 2022 12:40:09 +0100 -Subject: [PATCH] Revert "report error when virProcessGetStatInfo() is unable - to parse data" - -This reverts commit 938382b60ae5bd1f83b5cb09e1ce68b9a88f679a. - -Turns out, the commit did more harm than good. It changed -semantics on some public APIs. For instance, while -qemuDomainGetInfo() previously did not returned an error it does -now. While the calls to virProcessGetStatInfo() is guarded with -virDomainObjIsActive() it doesn't necessarily mean that QEMU's -PID is still alive. QEMU might be gone but we just haven't -realized it (e.g. because the eof handler thread is waiting for a -job). - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2041610 -Signed-off-by: Michal Privoznik -Reviewed-by: Andrea Bolognani -(cherry picked from commit 105dace22cc7b5b18d72a4dcad4a2cf386ce5c99) -Signed-off-by: Michal Privoznik ---- - src/ch/ch_driver.c | 2 ++ - src/qemu/qemu_driver.c | 7 ++++++- - src/util/virprocess.c | 8 ++------ - 3 files changed, 10 insertions(+), 7 deletions(-) - -diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c -index 3cbc668489..53e0872207 100644 ---- a/src/ch/ch_driver.c -+++ b/src/ch/ch_driver.c -@@ -1073,6 +1073,8 @@ chDomainHelperGetVcpus(virDomainObj *vm, - if (virProcessGetStatInfo(&vcpuinfo->cpuTime, - &vcpuinfo->cpu, NULL, - vm->pid, vcpupid) < 0) { -+ virReportSystemError(errno, "%s", -+ _("cannot get vCPU placement & pCPU time")); - return -1; - } - } -diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c -index 65ac5ef367..d3d76c003f 100644 ---- a/src/qemu/qemu_driver.c -+++ b/src/qemu/qemu_driver.c -@@ -1359,6 +1359,8 @@ qemuDomainHelperGetVcpus(virDomainObj *vm, - if (virProcessGetStatInfo(&vcpuinfo->cpuTime, - &vcpuinfo->cpu, NULL, - vm->pid, vcpupid) < 0) { -+ virReportSystemError(errno, "%s", -+ _("cannot get vCPU placement & pCPU time")); - return -1; - } - } -@@ -2519,6 +2521,8 @@ qemuDomainGetInfo(virDomainPtr dom, - if (virDomainObjIsActive(vm)) { - if (virProcessGetStatInfo(&(info->cpuTime), NULL, NULL, - vm->pid, 0) < 0) { -+ virReportError(VIR_ERR_OPERATION_FAILED, "%s", -+ _("cannot read cputime for domain")); - goto cleanup; - } - } -@@ -10526,7 +10530,8 @@ qemuDomainMemoryStatsInternal(virQEMUDriver *driver, - } - - if (virProcessGetStatInfo(NULL, NULL, &rss, vm->pid, 0) < 0) { -- virResetLastError(); -+ virReportError(VIR_ERR_OPERATION_FAILED, "%s", -+ _("cannot get RSS for domain")); - } else { - stats[ret].tag = VIR_DOMAIN_MEMORY_STAT_RSS; - stats[ret].val = rss; -diff --git a/src/util/virprocess.c b/src/util/virprocess.c -index 85d8c8e747..b559a4257e 100644 ---- a/src/util/virprocess.c -+++ b/src/util/virprocess.c -@@ -1784,10 +1784,7 @@ virProcessGetStatInfo(unsigned long long *cpuTime, - virStrToLong_ullp(proc_stat[VIR_PROCESS_STAT_STIME], NULL, 10, &systime) < 0 || - virStrToLong_l(proc_stat[VIR_PROCESS_STAT_RSS], NULL, 10, &rss) < 0 || - virStrToLong_i(proc_stat[VIR_PROCESS_STAT_PROCESSOR], NULL, 10, &cpu) < 0) { -- virReportError(VIR_ERR_INTERNAL_ERROR, -- _("cannot parse process status data for pid '%d/%d'"), -- (int) pid, (int) tid); -- return -1; -+ VIR_WARN("cannot parse process status data"); - } - - /* We got jiffies -@@ -1884,8 +1881,7 @@ virProcessGetStatInfo(unsigned long long *cpuTime G_GNUC_UNUSED, - pid_t pid G_GNUC_UNUSED, - pid_t tid G_GNUC_UNUSED) - { -- virReportSystemError(ENOSYS, "%s", -- _("Process statistics data is not supported on this platform")); -+ errno = ENOSYS; - return -1; - } - --- -2.35.0 - diff --git a/SOURCES/libvirt-build-Only-install-libvirt-guests-when-building-libvirtd.patch b/SOURCES/libvirt-build-Only-install-libvirt-guests-when-building-libvirtd.patch deleted file mode 100644 index c02569a..0000000 --- a/SOURCES/libvirt-build-Only-install-libvirt-guests-when-building-libvirtd.patch +++ /dev/null @@ -1,75 +0,0 @@ -From b0fb5cbba2e03fbca8471487bf78931b3090b108 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Jim Fehlig -Date: Mon, 10 Jan 2022 11:42:58 -0700 -Subject: [PATCH] build: Only install libvirt-guests when building libvirtd - -libvirt-guests was already moved to the libvirt daemon package in commit -d800c50349. It only needs to be installed when building libvirtd. - -Signed-off-by: Jim Fehlig -Reviewed-by: Andrea Bolognani -(cherry picked from commit 3be5ba11a2c6fcb2dfdffa03ab4f847113f36b85) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2153688 -Signed-off-by: Michal Privoznik ---- - tools/meson.build | 38 ++++++++++++++++++++------------------ - 1 file changed, 20 insertions(+), 18 deletions(-) - -diff --git a/tools/meson.build b/tools/meson.build -index 22fa3604ba..2d0aecb90b 100644 ---- a/tools/meson.build -+++ b/tools/meson.build -@@ -297,29 +297,31 @@ if conf.has('WITH_SANLOCK') - ) - endif - --configure_file( -- input: 'libvirt-guests.sh.in', -- output: '@BASENAME@', -- configuration: tools_conf, -- install: true, -- install_dir: libexecdir, -- install_mode: 'rwxrwxr-x', --) -- --if init_script == 'systemd' -- install_data( -- 'libvirt-guests.sysconf', -- install_dir: sysconfdir / 'sysconfig', -- rename: 'libvirt-guests', -- ) -- -+if conf.has('WITH_LIBVIRTD') - configure_file( -- input: 'libvirt-guests.service.in', -+ input: 'libvirt-guests.sh.in', - output: '@BASENAME@', - configuration: tools_conf, - install: true, -- install_dir: prefix / 'lib' / 'systemd' / 'system', -+ install_dir: libexecdir, -+ install_mode: 'rwxrwxr-x', - ) -+ -+ if init_script == 'systemd' -+ install_data( -+ 'libvirt-guests.sysconf', -+ install_dir: sysconfdir / 'sysconfig', -+ rename: 'libvirt-guests', -+ ) -+ -+ configure_file( -+ input: 'libvirt-guests.service.in', -+ output: '@BASENAME@', -+ configuration: tools_conf, -+ install: true, -+ install_dir: prefix / 'lib' / 'systemd' / 'system', -+ ) -+ endif - endif - - if bash_completion_dep.found() --- -2.39.0 - diff --git a/SOURCES/libvirt-conf-Introduce-memory-allocation-threads.patch b/SOURCES/libvirt-conf-Introduce-memory-allocation-threads.patch deleted file mode 100644 index add140c..0000000 --- a/SOURCES/libvirt-conf-Introduce-memory-allocation-threads.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 19f7e6dc950baf346738f462ac5c6b815c04edcc Mon Sep 17 00:00:00 2001 -Message-Id: <19f7e6dc950baf346738f462ac5c6b815c04edcc@dist-git> -From: Michal Privoznik -Date: Mon, 21 Mar 2022 16:49:25 +0100 -Subject: [PATCH] conf: Introduce memory allocation threads - -Since its v5.0.0 release QEMU is capable of specifying number of -threads used to allocate memory. It defaults to 1, which may be -too low for humongous guests with gigantic pages. - -In general, on QEMU cmd line level it is possible to use -different number of threads per each memory-backend-* object, in -practical terms it's not useful. Therefore, use -to set guest wide value and let all memory devices 'inherit' it, -silently. IOW, don't introduce per device knob because that would -only complicate things for a little or no benefit. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit ba7f98126fa84d354ce72929b77cc111a9a557a9) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2067126 -Signed-off-by: Michal Privoznik ---- - docs/formatdomain.rst | 8 +++++--- - docs/schemas/domaincommon.rng | 19 +++++++++++++------ - src/conf/domain_conf.c | 15 ++++++++++++++- - src/conf/domain_conf.h | 1 + - tests/qemuxml2argvdata/memfd-memory-numa.xml | 2 +- - 5 files changed, 34 insertions(+), 11 deletions(-) - -diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst -index 8128e43da4..17e89a0c0d 100644 ---- a/docs/formatdomain.rst -+++ b/docs/formatdomain.rst -@@ -977,7 +977,7 @@ Memory Backing - - - -- -+ - - - ... -@@ -1026,8 +1026,10 @@ influence how virtual memory pages are backed by host pages. - Using the ``mode`` attribute, specify if the memory is to be "shared" or - "private". This can be overridden per numa node by ``memAccess``. - ``allocation`` -- Using the ``mode`` attribute, specify when to allocate the memory by -- supplying either "immediate" or "ondemand". -+ Using the optional ``mode`` attribute, specify when to allocate the memory by -+ supplying either "immediate" or "ondemand". :since:`Since 8.2.0` it is -+ possible to set the number of threads that hypervisor uses to allocate -+ memory via ``threads`` attribute. - ``discard`` - When set and supported by hypervisor the memory content is discarded just - before guest shuts down (or when DIMM module is unplugged). Please note that -diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng -index 7fa5c2b8b5..c9c1529979 100644 ---- a/docs/schemas/domaincommon.rng -+++ b/docs/schemas/domaincommon.rng -@@ -745,12 +745,19 @@ - - - -- -- -- immediate -- ondemand -- -- -+ -+ -+ -+ immediate -+ ondemand -+ -+ -+ -+ -+ -+ -+ -+ - - - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index 5691b8d2d5..805a15848e 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -19095,6 +19095,13 @@ virDomainDefParseMemory(virDomainDef *def, - VIR_FREE(tmp); - } - -+ if (virXPathUInt("string(./memoryBacking/allocation/@threads)", -+ ctxt, &def->mem.allocation_threads) == -2) { -+ virReportError(VIR_ERR_XML_ERROR, "%s", -+ _("Failed to parse memory allocation threads")); -+ return -1; -+ } -+ - if (virXPathNode("./memoryBacking/hugepages", ctxt)) { - /* hugepages will be used */ - if ((n = virXPathNodeSet("./memoryBacking/hugepages/page", ctxt, &nodes)) < 0) { -@@ -27639,6 +27646,7 @@ virDomainMemorybackingFormat(virBuffer *buf, - const virDomainMemtune *mem) - { - g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf); -+ g_auto(virBuffer) allocAttrBuf = VIR_BUFFER_INITIALIZER; - - if (mem->nhugepages) - virDomainHugepagesFormat(&childBuf, mem->hugepages, mem->nhugepages); -@@ -27653,8 +27661,13 @@ virDomainMemorybackingFormat(virBuffer *buf, - virBufferAsprintf(&childBuf, "\n", - virDomainMemoryAccessTypeToString(mem->access)); - if (mem->allocation) -- virBufferAsprintf(&childBuf, "\n", -+ virBufferAsprintf(&allocAttrBuf, " mode='%s'", - virDomainMemoryAllocationTypeToString(mem->allocation)); -+ if (mem->allocation_threads > 0) -+ virBufferAsprintf(&allocAttrBuf, " threads='%u'", mem->allocation_threads); -+ -+ virXMLFormatElement(&childBuf, "allocation", &allocAttrBuf, NULL); -+ - if (mem->discard) - virBufferAddLit(&childBuf, "\n"); - -diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h -index 144ba4dd12..10af94e2e4 100644 ---- a/src/conf/domain_conf.h -+++ b/src/conf/domain_conf.h -@@ -2677,6 +2677,7 @@ struct _virDomainMemtune { - int source; /* enum virDomainMemorySource */ - int access; /* enum virDomainMemoryAccess */ - int allocation; /* enum virDomainMemoryAllocation */ -+ unsigned int allocation_threads; - - virTristateBool discard; - }; -diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.xml b/tests/qemuxml2argvdata/memfd-memory-numa.xml -index 1ebcee8939..1ac87e3aef 100644 ---- a/tests/qemuxml2argvdata/memfd-memory-numa.xml -+++ b/tests/qemuxml2argvdata/memfd-memory-numa.xml -@@ -10,7 +10,7 @@ - - - -- -+ - - 8 - --- -2.35.1 - diff --git a/SOURCES/libvirt-conf-Make-VIR_DOMAIN_NET_TYPE_ETHERNET-not-share-host-view.patch b/SOURCES/libvirt-conf-Make-VIR_DOMAIN_NET_TYPE_ETHERNET-not-share-host-view.patch deleted file mode 100644 index 98e82d4..0000000 --- a/SOURCES/libvirt-conf-Make-VIR_DOMAIN_NET_TYPE_ETHERNET-not-share-host-view.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 666b68a93006c4299747d159bcacb7164b8c5d91 Mon Sep 17 00:00:00 2001 -Message-Id: <666b68a93006c4299747d159bcacb7164b8c5d91@dist-git> -From: Michal Privoznik -Date: Thu, 24 Nov 2022 10:28:59 +0100 -Subject: [PATCH] conf: Make VIR_DOMAIN_NET_TYPE_ETHERNET not share 'host view' - -When setting up QoS for a domain , or when reporting -its statistics we may need to swap TX/RX values. This is all -explained in comment to virDomainNetTypeSharesHostView(). -However, this function claims that VIR_DOMAIN_NET_TYPE_ETHERNET -also shares the 'host view', meaning the TX/RX values must be -swapped. But that's not true. - -An easy reproducer is to start a domain with two -s: -one type of network, the other of type ethernet and configure the -same for both. Reversed setting can then be observed -(e.g. via tc). - -Reported-by: Oleg Vasilev -Signed-off-by: Michal Privoznik -Reviewed-by: Jiri Denemark -(cherry picked from commit 0862cb3ce46253a58ca02d36b2b6a6397a60bfc7) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2172578 -Signed-off-by: Michal Privoznik ---- - src/conf/domain_conf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index 401ddaa1a0..427e7d1bb5 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -30472,9 +30472,9 @@ virDomainNetTypeSharesHostView(const virDomainNetDef *net) - virDomainNetType actualType = virDomainNetGetActualType(net); - switch (actualType) { - case VIR_DOMAIN_NET_TYPE_DIRECT: -- case VIR_DOMAIN_NET_TYPE_ETHERNET: - return true; - case VIR_DOMAIN_NET_TYPE_USER: -+ case VIR_DOMAIN_NET_TYPE_ETHERNET: - case VIR_DOMAIN_NET_TYPE_VHOSTUSER: - case VIR_DOMAIN_NET_TYPE_SERVER: - case VIR_DOMAIN_NET_TYPE_CLIENT: --- -2.39.2 - diff --git a/SOURCES/libvirt-conf-Move-virDomainObj-originalMemlock-into-qemuDomainObjPrivate.patch b/SOURCES/libvirt-conf-Move-virDomainObj-originalMemlock-into-qemuDomainObjPrivate.patch deleted file mode 100644 index 4edd02b..0000000 --- a/SOURCES/libvirt-conf-Move-virDomainObj-originalMemlock-into-qemuDomainObjPrivate.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 00c5cab2b92b653edbf491d9ef60359578c3d59a Mon Sep 17 00:00:00 2001 -Message-Id: <00c5cab2b92b653edbf491d9ef60359578c3d59a@dist-git> -From: Michal Privoznik -Date: Wed, 11 May 2022 16:27:18 +0200 -Subject: [PATCH] conf: Move virDomainObj::originalMemlock into - qemuDomainObjPrivate - -Since v1.3.0-90-gafbe1d4c56 the original value of memlock limit -is stored inside virDomainObj struct directly (under -originalMemlock member). This is needless because the value is -used only inside QEMU driver and thus can reside in -qemuDomainObjPrivate struct. - -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -(cherry picked from commit 75df6d2c291c48d65c1e54dd93e3d2d3cb0712e7) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Signed-off-by: Jiri Denemark ---- - src/conf/domain_conf.h | 3 --- - src/qemu/qemu_domain.c | 9 +++++---- - src/qemu/qemu_domain.h | 3 +++ - 3 files changed, 8 insertions(+), 7 deletions(-) - -diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h -index d0d0fdc815..45976beb2b 100644 ---- a/src/conf/domain_conf.h -+++ b/src/conf/domain_conf.h -@@ -3031,9 +3031,6 @@ struct _virDomainObj { - int taint; - size_t ndeprecations; - char **deprecations; -- -- unsigned long long originalMemlock; /* Original RLIMIT_MEMLOCK, zero if no -- * restore will be required later */ - }; - - G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainObj, virObjectUnref); -diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c -index 40fe9985e6..86d673dafa 100644 ---- a/src/qemu/qemu_domain.c -+++ b/src/qemu/qemu_domain.c -@@ -9269,6 +9269,7 @@ int - qemuDomainAdjustMaxMemLock(virDomainObj *vm, - bool forceVFIO) - { -+ qemuDomainObjPrivate *priv = vm->privateData; - unsigned long long currentMemLock = 0; - unsigned long long desiredMemLock = 0; - -@@ -9281,8 +9282,8 @@ qemuDomainAdjustMaxMemLock(virDomainObj *vm, - /* If this is the first time adjusting the limit, save the current - * value so that we can restore it once memory locking is no longer - * required */ -- if (vm->originalMemlock == 0) { -- vm->originalMemlock = currentMemLock; -+ if (priv->originalMemlock == 0) { -+ priv->originalMemlock = currentMemLock; - } - } else { - /* If the limit is already high enough, we can assume -@@ -9295,8 +9296,8 @@ qemuDomainAdjustMaxMemLock(virDomainObj *vm, - } else { - /* Once memory locking is no longer required, we can restore the - * original, usually very low, limit */ -- desiredMemLock = vm->originalMemlock; -- vm->originalMemlock = 0; -+ desiredMemLock = priv->originalMemlock; -+ priv->originalMemlock = 0; - } - - if (desiredMemLock > 0 && -diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h -index e5046367e3..e9497d20de 100644 ---- a/src/qemu/qemu_domain.h -+++ b/src/qemu/qemu_domain.h -@@ -241,6 +241,9 @@ struct _qemuDomainObjPrivate { - GSList *dbusVMStateIds; - /* true if -object dbus-vmstate was added */ - bool dbusVMState; -+ -+ unsigned long long originalMemlock; /* Original RLIMIT_MEMLOCK, zero if no -+ * restore will be required later */ - }; - - #define QEMU_DOMAIN_PRIVATE(vm) \ --- -2.35.1 - diff --git a/SOURCES/libvirt-conf-adjust-method-name-virDomainDeviceCCWAddressParseXML.patch b/SOURCES/libvirt-conf-adjust-method-name-virDomainDeviceCCWAddressParseXML.patch deleted file mode 100644 index 11e3e70..0000000 --- a/SOURCES/libvirt-conf-adjust-method-name-virDomainDeviceCCWAddressParseXML.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 3c65b917f70d556fa1059b0400771c8159b8ca3b Mon Sep 17 00:00:00 2001 -Message-Id: <3c65b917f70d556fa1059b0400771c8159b8ca3b@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:08 +0200 -Subject: [PATCH] conf: adjust method name virDomainDeviceCCWAddressParseXML - -Adjust method name virDomainDeviceCCWAddressParseXML to -virCCWDeviceAddressParseXML. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 2d9fd19bf5d7a3d33b94e464c335252682edd623) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/device_conf.c | 4 ++-- - src/conf/device_conf.h | 4 ++-- - src/conf/domain_conf.c | 3 +-- - src/libvirt_private.syms | 2 +- - 4 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c -index 958e2f43cc..e93fd57341 100644 ---- a/src/conf/device_conf.c -+++ b/src/conf/device_conf.c -@@ -259,8 +259,8 @@ virPCIDeviceAddressFormat(virBuffer *buf, - } - - int --virDomainDeviceCCWAddressParseXML(xmlNodePtr node, -- virCCWDeviceAddress *addr) -+virCCWDeviceAddressParseXML(xmlNodePtr node, -+ virCCWDeviceAddress *addr) - { - int cssid; - int ssid; -diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h -index 01e2edccc9..910e6b7792 100644 ---- a/src/conf/device_conf.h -+++ b/src/conf/device_conf.h -@@ -193,8 +193,8 @@ void virPCIDeviceAddressFormat(virBuffer *buf, - virPCIDeviceAddress addr, - bool includeTypeInAddr); - --int virDomainDeviceCCWAddressParseXML(xmlNodePtr node, -- virCCWDeviceAddress *addr); -+int virCCWDeviceAddressParseXML(xmlNodePtr node, -+ virCCWDeviceAddress *addr); - - int virDomainDeviceDriveAddressParseXML(xmlNodePtr node, - virDomainDeviceDriveAddress *addr); -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index 1e1c7f01b1..401ddaa1a0 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -6630,8 +6630,7 @@ virDomainDeviceAddressParseXML(xmlNodePtr address, - break; - - case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW: -- if (virDomainDeviceCCWAddressParseXML -- (address, &info->addr.ccw) < 0) -+ if (virCCWDeviceAddressParseXML(address, &info->addr.ccw) < 0) - return -1; - break; - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 0d3ee4c20a..44b551fb60 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -124,6 +124,7 @@ virCPUModeTypeToString; - - - # conf/device_conf.h -+virCCWDeviceAddressParseXML; - virDeviceInfoPCIAddressExtensionIsPresent; - virDeviceInfoPCIAddressExtensionIsWanted; - virDeviceInfoPCIAddressIsPresent; -@@ -131,7 +132,6 @@ virDeviceInfoPCIAddressIsWanted; - virDomainDeviceAddressIsValid; - virDomainDeviceAddressTypeToString; - virDomainDeviceCcidAddressParseXML; --virDomainDeviceCCWAddressParseXML; - virDomainDeviceDriveAddressParseXML; - virDomainDeviceInfoAddressIsEqual; - virDomainDeviceSpaprVioAddressParseXML; --- -2.39.1 - diff --git a/SOURCES/libvirt-conf-virtiofs-add-thread_pool-element.patch b/SOURCES/libvirt-conf-virtiofs-add-thread_pool-element.patch deleted file mode 100644 index e03c66d..0000000 --- a/SOURCES/libvirt-conf-virtiofs-add-thread_pool-element.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 0c09e4225c511ce1b0ebe22e45962f83d5145e66 Mon Sep 17 00:00:00 2001 -Message-Id: <0c09e4225c511ce1b0ebe22e45962f83d5145e66@dist-git> -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Fri, 10 Jun 2022 15:10:29 +0200 -Subject: [PATCH] conf: virtiofs: add thread_pool element -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add an element to configure the thread pool size: - -... - - - -... - -https://bugzilla.redhat.com/show_bug.cgi?id=2072905 - -Signed-off-by: Ján Tomko -Reviewed-by: Michal Privoznik -(cherry picked from commit 0df2e7df80452f81edbfeb0ee355235b533346a9) -Signed-off-by: Ján Tomko - -https://bugzilla.redhat.com/show_bug.cgi?id=2079582 ---- - docs/formatdomain.rst | 6 ++++++ - docs/schemas/domaincommon.rng | 9 +++++++++ - src/conf/domain_conf.c | 15 +++++++++++++++ - src/conf/domain_conf.h | 1 + - .../qemuxml2argvdata/vhost-user-fs-fd-memory.xml | 1 + - 5 files changed, 32 insertions(+) - -diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst -index 17e89a0c0d..e6cf2ec083 100644 ---- a/docs/formatdomain.rst -+++ b/docs/formatdomain.rst -@@ -3316,6 +3316,7 @@ A directory on the host that can be accessed directly from the guest. - - - -+ - - - -@@ -3449,6 +3450,11 @@ A directory on the host that can be accessed directly from the guest. - ``chroot``, see the - `virtiofsd documentation `__ - for more details. ( :since:`Since 7.2.0` ) -+ Element ``thread_pool`` accepts one attribute ``size`` which defines the -+ maximum thread pool size. A value of "0" disables the pool. -+ The thread pool helps increase the number of requests in flight when used with -+ storage that has a higher latency. However, it has an overhead, and so for -+ fast, low latency filesystems, it may be best to turn it off. ( :since:`Since 8.5.0` ) - ``source`` - The resource on the host that is being accessed in the guest. The ``name`` - attribute must be used with ``type='template'``, and the ``dir`` attribute -diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng -index c9c1529979..79c8979410 100644 ---- a/docs/schemas/domaincommon.rng -+++ b/docs/schemas/domaincommon.rng -@@ -3064,6 +3064,15 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index 92510973e6..95afd9226e 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -2447,6 +2447,8 @@ virDomainFSDefNew(virDomainXMLOption *xmlopt) - - ret->src = virStorageSourceNew(); - -+ ret->thread_pool_size = -1; -+ - if (xmlopt && - xmlopt->privateData.fsNew && - !(ret->privateData = xmlopt->privateData.fsNew())) -@@ -9869,6 +9871,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, - if (def->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS) { - g_autofree char *queue_size = virXPathString("string(./driver/@queue)", ctxt); - g_autofree char *binary = virXPathString("string(./binary/@path)", ctxt); -+ g_autofree char *thread_pool_size = virXPathString("string(./binary/thread_pool/@size)", ctxt); - g_autofree char *xattr = virXPathString("string(./binary/@xattr)", ctxt); - g_autofree char *cache = virXPathString("string(./binary/cache/@mode)", ctxt); - g_autofree char *sandbox = virXPathString("string(./binary/sandbox/@mode)", ctxt); -@@ -9883,6 +9886,14 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, - goto error; - } - -+ if (thread_pool_size && -+ virStrToLong_i(thread_pool_size, NULL, 10, &def->thread_pool_size) < 0) { -+ virReportError(VIR_ERR_XML_ERROR, -+ _("cannot parse thread pool size '%s' for virtiofs"), -+ queue_size); -+ goto error; -+ } -+ - if (binary) - def->binary = virFileSanitizePath(binary); - -@@ -24205,6 +24216,10 @@ virDomainFSDefFormat(virBuffer *buf, - } - - virXMLFormatElement(&binaryBuf, "lock", &lockAttrBuf, NULL); -+ -+ if (def->thread_pool_size >= 0) -+ virBufferAsprintf(&binaryBuf, "\n", def->thread_pool_size); -+ - } - - virDomainVirtioOptionsFormat(&driverAttrBuf, def->virtio); -diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h -index 10af94e2e4..d0d0fdc815 100644 ---- a/src/conf/domain_conf.h -+++ b/src/conf/domain_conf.h -@@ -892,6 +892,7 @@ struct _virDomainFSDef { - virTristateSwitch posix_lock; - virTristateSwitch flock; - virDomainFSSandboxMode sandbox; -+ int thread_pool_size; - virDomainVirtioOptions *virtio; - virObject *privateData; - }; -diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml -index abddf0870b..81de8c0dd7 100644 ---- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml -+++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml -@@ -32,6 +32,7 @@ - - - -+ - - - --- -2.35.1 - diff --git a/SOURCES/libvirt-cpu_map-Disable-cpu64-rhel-for-host-model-and-baseline.patch b/SOURCES/libvirt-cpu_map-Disable-cpu64-rhel-for-host-model-and-baseline.patch deleted file mode 100644 index 7711d3b..0000000 --- a/SOURCES/libvirt-cpu_map-Disable-cpu64-rhel-for-host-model-and-baseline.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 46f4cfe513f0f893c862dca7f02ed7d7932b2115 Mon Sep 17 00:00:00 2001 -Message-Id: <46f4cfe513f0f893c862dca7f02ed7d7932b2115@dist-git> -From: Jiri Denemark -Date: Tue, 26 Apr 2022 12:50:41 +0200 -Subject: [PATCH] cpu_map: Disable cpu64-rhel* for host-model and baseline - -These ancient RHEL-only CPU models should not really be used by any CPU -definition created by libvirt. We keep them just for backwards -compatibility with domains which might still be using them. - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit d2e4d66be35cd04da72e5f5129a8a4da6a931505) - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark ---- - src/cpu_map/x86_cpu64-rhel5.xml | 2 +- - src/cpu_map/x86_cpu64-rhel6.xml | 2 +- - tests/cputestdata/x86_64-baseline-no-vendor-result.xml | 3 ++- - 3 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/cpu_map/x86_cpu64-rhel5.xml b/src/cpu_map/x86_cpu64-rhel5.xml -index be6bcdb7a6..7402b7603c 100644 ---- a/src/cpu_map/x86_cpu64-rhel5.xml -+++ b/src/cpu_map/x86_cpu64-rhel5.xml -@@ -1,6 +1,6 @@ - - -- -+ - - - -diff --git a/src/cpu_map/x86_cpu64-rhel6.xml b/src/cpu_map/x86_cpu64-rhel6.xml -index c62b1b5575..061939c733 100644 ---- a/src/cpu_map/x86_cpu64-rhel6.xml -+++ b/src/cpu_map/x86_cpu64-rhel6.xml -@@ -1,6 +1,6 @@ - - -- -+ - - - -diff --git a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml -index 00e03b2152..4b4921cf93 100644 ---- a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml -+++ b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml -@@ -1,3 +1,4 @@ - -- cpu64-rhel6 -+ kvm64 -+ - --- -2.35.1 - diff --git a/SOURCES/libvirt-cpu_x86-Consolidate-signature-match-in-x86DecodeUseCandidate.patch b/SOURCES/libvirt-cpu_x86-Consolidate-signature-match-in-x86DecodeUseCandidate.patch deleted file mode 100644 index 2e9660e..0000000 --- a/SOURCES/libvirt-cpu_x86-Consolidate-signature-match-in-x86DecodeUseCandidate.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 99a298a4a0575bf0072f504c4b8e4551400c44c0 Mon Sep 17 00:00:00 2001 -Message-Id: <99a298a4a0575bf0072f504c4b8e4551400c44c0@dist-git> -From: Jiri Denemark -Date: Tue, 26 Apr 2022 11:58:07 +0200 -Subject: [PATCH] cpu_x86: Consolidate signature match in x86DecodeUseCandidate - -Checking the signature in two different places makes no sense since the -code in between can only mark the candidate as the best option so far, -which is what the second signature match does as well. - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit 35ce086667e68e8f546cf36473591dd7c19c72eb) - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark ---- - src/cpu/cpu_x86.c | 31 ++++++++++++++----------------- - 1 file changed, 14 insertions(+), 17 deletions(-) - -diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c -index 5cb9caef8a..f007487824 100644 ---- a/src/cpu/cpu_x86.c -+++ b/src/cpu/cpu_x86.c -@@ -2020,15 +2020,22 @@ x86DecodeUseCandidate(virCPUx86Model *current, - } - - /* Ideally we want to select a model with family/model equal to -- * family/model of the real CPU. Once we found such model, we only -+ * family/model of the real CPU and once we found such model, we only - * consider candidates with matching family/model. - */ -- if (signature && -- virCPUx86SignaturesMatch(current->signatures, signature) && -- !virCPUx86SignaturesMatch(candidate->signatures, signature)) { -- VIR_DEBUG("%s differs in signature from matching %s", -- cpuCandidate->model, cpuCurrent->model); -- return 0; -+ if (signature) { -+ if (virCPUx86SignaturesMatch(current->signatures, signature) && -+ !virCPUx86SignaturesMatch(candidate->signatures, signature)) { -+ VIR_DEBUG("%s differs in signature from matching %s", -+ cpuCandidate->model, cpuCurrent->model); -+ return 0; -+ } -+ -+ if (!virCPUx86SignaturesMatch(current->signatures, signature) && -+ virCPUx86SignaturesMatch(candidate->signatures, signature)) { -+ VIR_DEBUG("%s provides matching signature", cpuCandidate->model); -+ return 1; -+ } - } - - if (cpuCurrent->nfeatures > cpuCandidate->nfeatures) { -@@ -2037,16 +2044,6 @@ x86DecodeUseCandidate(virCPUx86Model *current, - return 1; - } - -- /* Prefer a candidate with matching signature even though it would -- * result in longer list of features. -- */ -- if (signature && -- virCPUx86SignaturesMatch(candidate->signatures, signature) && -- !virCPUx86SignaturesMatch(current->signatures, signature)) { -- VIR_DEBUG("%s provides matching signature", cpuCandidate->model); -- return 1; -- } -- - VIR_DEBUG("%s does not result in shorter feature list than %s", - cpuCandidate->model, cpuCurrent->model); - return 0; --- -2.35.1 - diff --git a/SOURCES/libvirt-cpu_x86-Ignore-enabled-features-for-input-models-in-x86DecodeUseCandidate.patch b/SOURCES/libvirt-cpu_x86-Ignore-enabled-features-for-input-models-in-x86DecodeUseCandidate.patch deleted file mode 100644 index e1b8a79..0000000 --- a/SOURCES/libvirt-cpu_x86-Ignore-enabled-features-for-input-models-in-x86DecodeUseCandidate.patch +++ /dev/null @@ -1,272 +0,0 @@ -From 752c74eeae67d41e7550991cb3bbe289984ec9d3 Mon Sep 17 00:00:00 2001 -Message-Id: <752c74eeae67d41e7550991cb3bbe289984ec9d3@dist-git> -From: Jiri Denemark -Date: Fri, 29 Apr 2022 10:35:02 +0200 -Subject: [PATCH] cpu_x86: Ignore enabled features for input models in - x86DecodeUseCandidate - -While we don't want to aim for the shortest list of disabled features in -the baseline result (it would select a very old model), we want to do so -while looking at any of the input models for which we're trying to -compute a baseline CPU model. Given a set of input models, we always -want to take the least capable one of them (i.e., the one with shortest -list of disabled features) or a better model which is not one of the -input models. - -So when considering an input model, we just check whether its list of -disabled features is shorter than the currently best one. When looking -at other models we check both enabled and disabled features while -penalizing disabled features as implemented by the previous patch. - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit bb6cedd2082599323257ee0df18c93a6e0551b0b) - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark ---- - src/cpu/cpu_x86.c | 66 ++++++++++++------- - ...4-baseline-Westmere+Nehalem-migratable.xml | 8 ++- - ...86_64-baseline-Westmere+Nehalem-result.xml | 8 ++- - ...-cpuid-baseline-Cooperlake+Cascadelake.xml | 13 ++-- - 4 files changed, 64 insertions(+), 31 deletions(-) - -diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c -index ebcd96edb1..7b59dad8bf 100644 ---- a/src/cpu/cpu_x86.c -+++ b/src/cpu/cpu_x86.c -@@ -1975,7 +1975,8 @@ virCPUx86Compare(virCPUDef *host, - - static int - virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent, -- virCPUDef *cpuCandidate) -+ virCPUDef *cpuCandidate, -+ bool isPreferred) - { - size_t current = cpuCurrent->nfeatures; - size_t enabledCurrent = current; -@@ -2017,6 +2018,14 @@ virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent, - return 1; - } - -+ if (isPreferred && disabled < disabledCurrent) { -+ VIR_DEBUG("%s is in the list of preferred models and provides fewer " -+ "disabled features than %s: %zu < %zu", -+ cpuCandidate->model, cpuCurrent->model, -+ disabled, disabledCurrent); -+ return 1; -+ } -+ - VIR_DEBUG("%s is not better than %s: %zu (%zu, %zu) >= %zu (%zu, %zu)", - cpuCandidate->model, cpuCurrent->model, - candidate, enabled, disabled, -@@ -2039,8 +2048,10 @@ x86DecodeUseCandidate(virCPUx86Model *current, - virCPUx86Model *candidate, - virCPUDef *cpuCandidate, - uint32_t signature, -- const char *preferred) -+ const char **preferred) - { -+ bool isPreferred = false; -+ - if (cpuCandidate->type == VIR_CPU_TYPE_HOST && - !candidate->decodeHost) { - VIR_DEBUG("%s is not supposed to be used for host CPU definition", -@@ -2064,9 +2075,13 @@ x86DecodeUseCandidate(virCPUx86Model *current, - } - } - -- if (preferred && STREQ(cpuCandidate->model, preferred)) { -- VIR_DEBUG("%s is the preferred model", cpuCandidate->model); -- return 2; -+ if (preferred) { -+ isPreferred = g_strv_contains(preferred, cpuCandidate->model); -+ -+ if (isPreferred && !preferred[1]) { -+ VIR_DEBUG("%s is the preferred model", cpuCandidate->model); -+ return 2; -+ } - } - - if (!cpuCurrent) { -@@ -2093,7 +2108,8 @@ x86DecodeUseCandidate(virCPUx86Model *current, - } - } - -- return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate); -+ return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate, -+ isPreferred); - } - - -@@ -2136,7 +2152,7 @@ static int - x86Decode(virCPUDef *cpu, - const virCPUx86Data *cpuData, - virDomainCapsCPUModels *models, -- const char *preferred, -+ const char **preferred, - bool migratable) - { - virCPUx86Map *map; -@@ -2169,6 +2185,9 @@ x86Decode(virCPUDef *cpu, - - x86DataFilterTSX(&data, vendor, map); - -+ if (preferred && !preferred[0]) -+ preferred = NULL; -+ - /* Walk through the CPU models in reverse order to check newest - * models first. - */ -@@ -2176,16 +2195,18 @@ x86Decode(virCPUDef *cpu, - candidate = map->models[i]; - if (models && - !(hvModel = virDomainCapsCPUModelsGet(models, candidate->name))) { -- if (preferred && STREQ(candidate->name, preferred)) { -+ if (preferred && -+ !preferred[1] && -+ STREQ(candidate->name, preferred[0])) { - if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU model %s is not supported by hypervisor"), -- preferred); -+ preferred[0]); - return -1; - } else { - VIR_WARN("Preferred CPU model %s not allowed by" - " hypervisor; closest supported model will be" -- " used", preferred); -+ " used", preferred[0]); - } - } else { - VIR_DEBUG("CPU model %s not allowed by hypervisor; ignoring", -@@ -2793,8 +2814,8 @@ virCPUx86Baseline(virCPUDef **cpus, - size_t i; - virCPUx86Vendor *vendor = NULL; - bool outputVendor = true; -- const char *modelName; -- bool matchingNames = true; -+ g_autofree char **modelNames = NULL; -+ size_t namesLen = 0; - g_autoptr(virCPUData) featData = NULL; - - if (!(map = virCPUx86GetMap())) -@@ -2816,19 +2837,17 @@ virCPUx86Baseline(virCPUDef **cpus, - return NULL; - } - -- modelName = cpus[0]->model; -+ modelNames = g_new0(char *, ncpus + 1); -+ if (cpus[0]->model) -+ modelNames[namesLen++] = cpus[0]->model; -+ - for (i = 1; i < ncpus; i++) { - g_autoptr(virCPUx86Model) model = NULL; - const char *vn = NULL; - -- if (matchingNames && cpus[i]->model) { -- if (!modelName) { -- modelName = cpus[i]->model; -- } else if (STRNEQ(modelName, cpus[i]->model)) { -- modelName = NULL; -- matchingNames = false; -- } -- } -+ if (cpus[i]->model && -+ !g_strv_contains((const char **) modelNames, cpus[i]->model)) -+ modelNames[namesLen++] = cpus[i]->model; - - if (!(model = x86ModelFromCPU(cpus[i], map, -1))) - return NULL; -@@ -2891,10 +2910,11 @@ virCPUx86Baseline(virCPUDef **cpus, - virCPUx86DataAddItem(&base_model->data, &vendor->data) < 0) - return NULL; - -- if (x86Decode(cpu, &base_model->data, models, modelName, migratable) < 0) -+ if (x86Decode(cpu, &base_model->data, models, -+ (const char **) modelNames, migratable) < 0) - return NULL; - -- if (STREQ_NULLABLE(cpu->model, modelName)) -+ if (namesLen == 1 && STREQ(cpu->model, modelNames[0])) - cpu->fallback = VIR_CPU_FALLBACK_FORBID; - - if (!outputVendor) -diff --git a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml -index 775a27de2e..f5846b1619 100644 ---- a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml -+++ b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml -@@ -1,10 +1,14 @@ - -- SandyBridge -+ Westmere - Intel - - -+ - -+ -+ -+ - -+ - -- - -diff --git a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml -index cafca97d62..166833276c 100644 ---- a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml -+++ b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml -@@ -1,11 +1,15 @@ - -- SandyBridge -+ Westmere - Intel - - -+ - -+ -+ -+ - -+ - - -- - -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml -index 46c32c996f..ecac749b97 100644 ---- a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml -@@ -1,17 +1,22 @@ - -- Cooperlake -+ Cascadelake-Server - Intel - - - - -- - -+ - -+ -+ - - - -+ -+ -+ -+ -+ - -- -- - --- -2.35.1 - diff --git a/SOURCES/libvirt-cpu_x86-Penalize-disabled-features-when-computing-CPU-model.patch b/SOURCES/libvirt-cpu_x86-Penalize-disabled-features-when-computing-CPU-model.patch deleted file mode 100644 index a778c81..0000000 --- a/SOURCES/libvirt-cpu_x86-Penalize-disabled-features-when-computing-CPU-model.patch +++ /dev/null @@ -1,1229 +0,0 @@ -From 5db9a525e3cec267544580d43554b2cf5779b6b9 Mon Sep 17 00:00:00 2001 -Message-Id: <5db9a525e3cec267544580d43554b2cf5779b6b9@dist-git> -From: Jiri Denemark -Date: Tue, 26 Apr 2022 15:06:30 +0200 -Subject: [PATCH] cpu_x86: Penalize disabled features when computing CPU model - -For finding the best matching CPU model for a given set of features -while we don't know the CPU signature (i.e., when computing a baseline -CPU model) we've been using a "shortest list of features" heuristics. -This works well if new CPU models are supersets of older models, but -that's not always the case. As a result it may actually select a new CPU -model as a baseline while removing some features from it to make it -compatible with older models. This is in general worse than using an old -CPU model with a bunch of added features as a guest OS or apps may crash -when using features that were disabled. - -On the other hand we don't want to end up with a very old model which -would guarantee no disabled features as it could stop a guest OS or apps -from using some features provided by the CPU because they would not -expect them on such an old CPU. - -This patch changes the heuristics to something in between. Enabled and -disabled features are counted separately so that a CPU model requiring -some features to be disabled looks worse than a model with fewer -disabled features even if its complete list of features is longer. The -penalty given for each additional disabled feature gets bigger to make -longer list of disabled features look even worse. - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit 48341b025acdd04a66696a709c7b09b3bfd42acf) - -Conflicts: - tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml - tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml - tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml - tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml - - not supported upstream anymore - -Signed-off-by: Jiri Denemark ---- - src/cpu/cpu_x86.c | 44 ++++++++++++++++--- - .../x86_64-cpuid-Atom-D510-guest.xml | 5 ++- - .../x86_64-cpuid-Atom-N450-guest.xml | 5 ++- - .../x86_64-cpuid-Phenom-B95-json.xml | 21 +++++---- - ...id-baseline-Broadwell-IBRS+Cascadelake.xml | 11 +++-- - ..._64-cpuid-baseline-Cascadelake+Icelake.xml | 13 +++--- - ...puid-baseline-Cascadelake+Skylake-IBRS.xml | 5 ++- - ...6_64-cpuid-baseline-Cooperlake+Icelake.xml | 13 +++--- - .../x86_64-host+guest,models-result.xml | 10 +++-- - .../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml | 34 ++++++++------ - .../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml | 34 ++++++++------ - .../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml | 16 ++++--- - .../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml | 35 +++++++++------ - .../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml | 35 +++++++++------ - .../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml | 36 ++++++++------- - .../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 37 +++++++++------- - .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 37 +++++++++------- - .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 36 +++++++++------ - .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 36 +++++++++------ - .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 36 +++++++++------ - .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 36 +++++++++------ - .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 36 +++++++++------ - .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 36 +++++++++------ - tests/qemuxml2argvdata/cpu-fallback.args | 2 +- - .../cpu-host-model-cmt.x86_64-4.0.0.args | 2 +- - .../cpu-host-model-fallback.args | 2 +- - 26 files changed, 382 insertions(+), 231 deletions(-) - -diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c -index 81c2441b8b..ebcd96edb1 100644 ---- a/src/cpu/cpu_x86.c -+++ b/src/cpu/cpu_x86.c -@@ -1970,23 +1970,57 @@ virCPUx86Compare(virCPUDef *host, - } - - -+/* Base penalty for disabled features. */ -+#define BASE_PENALTY 2 -+ - static int - virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent, - virCPUDef *cpuCandidate) - { - size_t current = cpuCurrent->nfeatures; -+ size_t enabledCurrent = current; -+ size_t disabledCurrent = 0; - size_t candidate = cpuCandidate->nfeatures; -+ size_t enabled = candidate; -+ size_t disabled = 0; -+ -+ if (cpuCandidate->type != VIR_CPU_TYPE_HOST) { -+ size_t i; -+ int penalty = BASE_PENALTY; -+ -+ for (i = 0; i < enabledCurrent; i++) { -+ if (cpuCurrent->features[i].policy == VIR_CPU_FEATURE_DISABLE) { -+ enabledCurrent--; -+ disabledCurrent += penalty; -+ penalty++; -+ } -+ } -+ current = enabledCurrent + disabledCurrent; -+ -+ penalty = BASE_PENALTY; -+ for (i = 0; i < enabled; i++) { -+ if (cpuCandidate->features[i].policy == VIR_CPU_FEATURE_DISABLE) { -+ enabled--; -+ disabled += penalty; -+ penalty++; -+ } -+ } -+ candidate = enabled + disabled; -+ } - -- if (candidate < current) { -- VIR_DEBUG("%s is better than %s: %zu < %zu", -+ if (candidate < current || -+ (candidate == current && disabled < disabledCurrent)) { -+ VIR_DEBUG("%s is better than %s: %zu (%zu, %zu) < %zu (%zu, %zu)", - cpuCandidate->model, cpuCurrent->model, -- candidate, current); -+ candidate, enabled, disabled, -+ current, enabledCurrent, disabledCurrent); - return 1; - } - -- VIR_DEBUG("%s is not better than %s: %zu >= %zu", -+ VIR_DEBUG("%s is not better than %s: %zu (%zu, %zu) >= %zu (%zu, %zu)", - cpuCandidate->model, cpuCurrent->model, -- candidate, current); -+ candidate, enabled, disabled, -+ current, enabledCurrent, disabledCurrent); - return 0; - } - -diff --git a/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml -index caa0bfd53b..d2f7a79074 100644 ---- a/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml -+++ b/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml -@@ -1,6 +1,7 @@ - -- core2duo -+ n270 - Intel -+ - - - -@@ -14,6 +15,6 @@ - - - -+ - -- - -diff --git a/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml -index e8f5c93881..779faf6cef 100644 ---- a/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml -+++ b/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml -@@ -1,5 +1,5 @@ - -- core2duo -+ n270 - Intel - - -@@ -15,6 +15,7 @@ - - - -+ -+ - -- - -diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml -index b4198f66a5..7f6289c6d7 100644 ---- a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml -+++ b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml -@@ -1,22 +1,25 @@ - -- Opteron_G3 -+ athlon - AMD -- -+ -+ -+ -+ - -+ - -- -+ - - -- -- -+ -+ - - -+ -+ -+ - - - - -- -- -- -- - -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml -index 4e3f253e9b..99bce8db87 100644 ---- a/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml -@@ -1,11 +1,14 @@ - -- Skylake-Client-IBRS -+ Broadwell-IBRS - Intel -+ - -+ -+ - -+ - -+ - -- -- -- -+ - -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml -index e372a3e446..071c799ba2 100644 ---- a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml -@@ -1,14 +1,15 @@ - -- Cooperlake -+ Cascadelake-Server - Intel - - - -- - -+ -+ -+ - -- -- -- -- -+ -+ -+ - -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml -index e559e01583..5e42876b39 100644 ---- a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml -@@ -1,12 +1,13 @@ - -- Cascadelake-Server -+ Skylake-Server-IBRS - Intel - - - -+ - - -+ - - -- - -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml -index e372a3e446..071c799ba2 100644 ---- a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml -@@ -1,14 +1,15 @@ - -- Cooperlake -+ Cascadelake-Server - Intel - - - -- - -+ -+ -+ - -- -- -- -- -+ -+ -+ - -diff --git a/tests/cputestdata/x86_64-host+guest,models-result.xml b/tests/cputestdata/x86_64-host+guest,models-result.xml -index 0dd6955898..42664a48b4 100644 ---- a/tests/cputestdata/x86_64-host+guest,models-result.xml -+++ b/tests/cputestdata/x86_64-host+guest,models-result.xml -@@ -1,17 +1,19 @@ - -- Nehalem -+ qemu64 - - - -+ - - -+ - -- -+ - - -- - -- - - -+ -+ - -diff --git a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml -index cccc6830f9..4a92b5bead 100644 ---- a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml -@@ -36,34 +36,42 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - - -+ -+ -+ -+ - - -- -- -- -- -- -- -- -- -- -- -+ - -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml -index 575506d852..7799a6a7a6 100644 ---- a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml -@@ -36,34 +36,42 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - - -+ -+ -+ -+ - - -- -- -- -- -- -- -- -- -- -- -+ - -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml -index b47c426f1b..fe12641fbe 100644 ---- a/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml -@@ -36,12 +36,19 @@ - - - -- Opteron_G4 -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ - -+ -+ -+ - - - -@@ -61,14 +68,13 @@ - - - -+ - - - -- -+ -+ - -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml -index 301101095c..daccacba0e 100644 ---- a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml -@@ -36,35 +36,42 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- -- - -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml -index 1a5bc25b99..2a65cb0ad9 100644 ---- a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml -@@ -36,35 +36,42 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- -- - -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml -index e744ac27ac..a4dc7bafc9 100644 ---- a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml -@@ -36,36 +36,42 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- -- - -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml -index 80b1ce8ef9..b20c02cb68 100644 ---- a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml -@@ -36,36 +36,43 @@ - - - -- EPYC-IBPB -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- - -- -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml -index 91b3ed6f80..d0ee3f7b7a 100644 ---- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml -@@ -36,36 +36,43 @@ - - - -- EPYC-IBPB -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- - -- -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml -index b8737613e9..d277c96426 100644 ---- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml -@@ -36,35 +36,43 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- - -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml -index 034036ca96..4f1ffbb2ba 100644 ---- a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml -@@ -36,35 +36,43 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- - -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml -index d3a4b01234..6cff0f815e 100644 ---- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml -@@ -36,35 +36,43 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- - -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml -index 6b85c9c45a..65f4459bcb 100644 ---- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml -@@ -36,35 +36,43 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- - -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml -index 2c761fc1af..40bc875e3c 100644 ---- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml -@@ -36,35 +36,43 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - -- -- -- -- -- -- -- -- -- - -- -- -- -- - - - qemu64 -diff --git a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml -index 8db840faac..a439dda190 100644 ---- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml -+++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml -@@ -36,36 +36,44 @@ - - - -- EPYC -+ Opteron_G3 - AMD - - -+ - -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ - - -+ -+ - -+ - - - -+ -+ -+ -+ - - -+ - - -- -- -- -- -- -- -- -- -- - -- -- -- -- - - - qemu64 -diff --git a/tests/qemuxml2argvdata/cpu-fallback.args b/tests/qemuxml2argvdata/cpu-fallback.args -index 1b1769d420..53667dfa3a 100644 ---- a/tests/qemuxml2argvdata/cpu-fallback.args -+++ b/tests/qemuxml2argvdata/cpu-fallback.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ - -machine pc,usb=off,dump-guest-core=off \ - -accel kvm \ ---cpu Penryn,sse4.1=off,sse4.2=off,popcnt=off,aes=off \ -+-cpu Conroe,cx16=on,sse4.1=off,sse4.2=off,popcnt=off,aes=off \ - -m 214 \ - -realtime mlock=off \ - -smp 6,sockets=6,cores=1,threads=1 \ -diff --git a/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args -index 3ff226a289..0de09e1d88 100644 ---- a/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args -+++ b/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ - -machine pc-i440fx-4.0,usb=off,dump-guest-core=off \ - -accel tcg \ ---cpu EPYC,acpi=on,ss=on,monitor=on,hypervisor=on,erms=on,mpx=on,pcommit=on,clwb=on,pku=on,la57=on,3dnowext=on,3dnow=on,npt=on,vme=off,fma=off,avx=off,f16c=off,rdrand=off,avx2=off,rdseed=off,sha-ni=off,xsavec=off,fxsr-opt=off,misalignsse=off,3dnowprefetch=off,osvw=off,topoext=off,nrip-save=off \ -+-cpu Opteron_G3,acpi=on,ss=on,pclmulqdq=on,monitor=on,ssse3=on,sse4.1=on,sse4.2=on,movbe=on,aes=on,xsave=on,hypervisor=on,arat=on,fsgsbase=on,bmi1=on,smep=on,bmi2=on,erms=on,mpx=on,adx=on,smap=on,pcommit=on,clflushopt=on,clwb=on,pku=on,la57=on,xsaveopt=on,xgetbv1=on,mmxext=on,pdpe1gb=on,3dnowext=on,3dnow=on,cr8legacy=on,npt=on,misalignsse=off \ - -m 214 \ - -overcommit mem-lock=off \ - -smp 6,sockets=6,cores=1,threads=1 \ -diff --git a/tests/qemuxml2argvdata/cpu-host-model-fallback.args b/tests/qemuxml2argvdata/cpu-host-model-fallback.args -index e90b781da4..763e630120 100644 ---- a/tests/qemuxml2argvdata/cpu-host-model-fallback.args -+++ b/tests/qemuxml2argvdata/cpu-host-model-fallback.args -@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \ - -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ - -machine pc,usb=off,dump-guest-core=off \ - -accel tcg \ ---cpu Penryn,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,monitor=on,ds-cpl=on,vmx=on,est=on,tm2=on,xtpr=on,sse4.1=off,cx16=on,lahf-lm=on \ -+-cpu Conroe,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,monitor=on,ds-cpl=on,vmx=on,est=on,tm2=on,cx16=on,xtpr=on,lahf-lm=on \ - -m 214 \ - -realtime mlock=off \ - -smp 6,sockets=6,cores=1,threads=1 \ --- -2.35.1 - diff --git a/SOURCES/libvirt-cpu_x86-Refactor-feature-list-comparison-in-x86DecodeUseCandidate.patch b/SOURCES/libvirt-cpu_x86-Refactor-feature-list-comparison-in-x86DecodeUseCandidate.patch deleted file mode 100644 index 24591e6..0000000 --- a/SOURCES/libvirt-cpu_x86-Refactor-feature-list-comparison-in-x86DecodeUseCandidate.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 3d7a4041d31e403dc9e762b34f7faf36f7f20a28 Mon Sep 17 00:00:00 2001 -Message-Id: <3d7a4041d31e403dc9e762b34f7faf36f7f20a28@dist-git> -From: Jiri Denemark -Date: Tue, 26 Apr 2022 15:02:51 +0200 -Subject: [PATCH] cpu_x86: Refactor feature list comparison in - x86DecodeUseCandidate - -It will become more complicated and so it deserves to be separated into -a new function. - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit 1d6ca40ac23c039abc4392b668f256d0eda33280) - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark ---- - src/cpu/cpu_x86.c | 31 ++++++++++++++++++++++--------- - 1 file changed, 22 insertions(+), 9 deletions(-) - -diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c -index f007487824..81c2441b8b 100644 ---- a/src/cpu/cpu_x86.c -+++ b/src/cpu/cpu_x86.c -@@ -1970,6 +1970,27 @@ virCPUx86Compare(virCPUDef *host, - } - - -+static int -+virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent, -+ virCPUDef *cpuCandidate) -+{ -+ size_t current = cpuCurrent->nfeatures; -+ size_t candidate = cpuCandidate->nfeatures; -+ -+ if (candidate < current) { -+ VIR_DEBUG("%s is better than %s: %zu < %zu", -+ cpuCandidate->model, cpuCurrent->model, -+ candidate, current); -+ return 1; -+ } -+ -+ VIR_DEBUG("%s is not better than %s: %zu >= %zu", -+ cpuCandidate->model, cpuCurrent->model, -+ candidate, current); -+ return 0; -+} -+ -+ - /* - * Checks whether a candidate model is a better fit for the CPU data than the - * current model. -@@ -2038,15 +2059,7 @@ x86DecodeUseCandidate(virCPUx86Model *current, - } - } - -- if (cpuCurrent->nfeatures > cpuCandidate->nfeatures) { -- VIR_DEBUG("%s results in shorter feature list than %s", -- cpuCandidate->model, cpuCurrent->model); -- return 1; -- } -- -- VIR_DEBUG("%s does not result in shorter feature list than %s", -- cpuCandidate->model, cpuCurrent->model); -- return 0; -+ return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate); - } - - --- -2.35.1 - diff --git a/SOURCES/libvirt-cputest-Add-some-real-world-baseline-tests.patch b/SOURCES/libvirt-cputest-Add-some-real-world-baseline-tests.patch deleted file mode 100644 index 6007a0f..0000000 --- a/SOURCES/libvirt-cputest-Add-some-real-world-baseline-tests.patch +++ /dev/null @@ -1,498 +0,0 @@ -From b37a398da4323407de24d19afac937eac80170cc Mon Sep 17 00:00:00 2001 -Message-Id: -From: Jiri Denemark -Date: Thu, 21 Apr 2022 18:25:15 +0200 -Subject: [PATCH] cputest: Add some real world baseline tests - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit 63d633b9a4fc42da7e2acaf45501914607d968a5) - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark ---- - tests/cputest.c | 118 +++++++++++++++--- - ...id-baseline-Broadwell-IBRS+Cascadelake.xml | 11 ++ - ..._64-cpuid-baseline-Cascadelake+Icelake.xml | 14 +++ - ...puid-baseline-Cascadelake+Skylake-IBRS.xml | 12 ++ - ..._64-cpuid-baseline-Cascadelake+Skylake.xml | 8 ++ - ...-cpuid-baseline-Cooperlake+Cascadelake.xml | 17 +++ - ...6_64-cpuid-baseline-Cooperlake+Icelake.xml | 14 +++ - .../x86_64-cpuid-baseline-EPYC+Rome.xml | 13 ++ - .../x86_64-cpuid-baseline-Haswell+Skylake.xml | 14 +++ - ...-baseline-Haswell-noTSX-IBRS+Broadwell.xml | 14 +++ - ...seline-Haswell-noTSX-IBRS+Skylake-IBRS.xml | 14 +++ - ...id-baseline-Haswell-noTSX-IBRS+Skylake.xml | 14 +++ - .../x86_64-cpuid-baseline-Ryzen+Rome.xml | 13 ++ - ...4-cpuid-baseline-Skylake-Client+Server.xml | 9 ++ - 14 files changed, 271 insertions(+), 14 deletions(-) - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml - create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml - -diff --git a/tests/cputest.c b/tests/cputest.c -index b939e20718..b39ec7e18b 100644 ---- a/tests/cputest.c -+++ b/tests/cputest.c -@@ -58,6 +58,8 @@ struct data { - const char *name; - virDomainCapsCPUModels *models; - const char *modelsName; -+ const char **cpus; -+ int ncpus; - unsigned int flags; - int result; - }; -@@ -561,6 +563,60 @@ cpuTestCPUID(bool guest, const void *arg) - } - - -+static int -+cpuTestCPUIDBaseline(const void *arg) -+{ -+ const struct data *data = arg; -+ int ret = -1; -+ virCPUDef **cpus = NULL; -+ virCPUDef *baseline = NULL; -+ g_autofree char *result = NULL; -+ size_t i; -+ -+ cpus = g_new0(virCPUDef *, data->ncpus); -+ for (i = 0; i < data->ncpus; i++) { -+ g_autofree char *name = NULL; -+ -+ name = g_strdup_printf("cpuid-%s-json", data->cpus[i]); -+ if (!(cpus[i] = cpuTestLoadXML(data->arch, name))) -+ goto cleanup; -+ } -+ -+ baseline = virCPUBaseline(data->arch, cpus, data->ncpus, NULL, NULL, false); -+ if (!baseline) -+ goto cleanup; -+ -+ result = g_strdup_printf("cpuid-baseline-%s", data->name); -+ -+ if (cpuTestCompareXML(data->arch, baseline, result) < 0) -+ goto cleanup; -+ -+ for (i = 0; i < data->ncpus; i++) { -+ virCPUCompareResult cmp; -+ -+ cmp = virCPUCompare(data->arch, cpus[i], baseline, false); -+ if (cmp != VIR_CPU_COMPARE_SUPERSET && -+ cmp != VIR_CPU_COMPARE_IDENTICAL) { -+ VIR_TEST_VERBOSE("\nbaseline CPU is incompatible with CPU %zu", i); -+ VIR_TEST_VERBOSE("%74s", "... "); -+ ret = -1; -+ goto cleanup; -+ } -+ } -+ -+ ret = 0; -+ -+ cleanup: -+ if (cpus) { -+ for (i = 0; i < data->ncpus; i++) -+ virCPUDefFree(cpus[i]); -+ VIR_FREE(cpus); -+ } -+ virCPUDefFree(baseline); -+ return ret; -+} -+ -+ - static int - cpuTestHostCPUID(const void *arg) - { -@@ -888,13 +944,13 @@ mymain(void) - goto cleanup; - } - --#define DO_TEST(arch, api, name, host, cpu, \ -+#define DO_TEST(arch, api, name, host, cpu, cpus, ncpus, \ - models, flags, result) \ - do { \ - struct data data = { \ - arch, host, cpu, models, \ - models == NULL ? NULL : #models, \ -- flags, result \ -+ cpus, ncpus, flags, result \ - }; \ - g_autofree char *testLabel = NULL; \ - \ -@@ -907,12 +963,12 @@ mymain(void) - #define DO_TEST_COMPARE(arch, host, cpu, result) \ - DO_TEST(arch, cpuTestCompare, \ - host "/" cpu " (" #result ")", \ -- host, cpu, NULL, 0, result) -+ host, cpu, NULL, 0, NULL, 0, result) - - #define DO_TEST_UPDATE_ONLY(arch, host, cpu) \ - DO_TEST(arch, cpuTestUpdate, \ - cpu " on " host, \ -- host, cpu, NULL, 0, 0) -+ host, cpu, NULL, 0, NULL, 0, 0) - - #define DO_TEST_UPDATE(arch, host, cpu, result) \ - do { \ -@@ -930,31 +986,31 @@ mymain(void) - suffix = " (migratable)"; \ - label = g_strdup_printf("%s%s", name, suffix); \ - DO_TEST(arch, cpuTestBaseline, label, NULL, \ -- "baseline-" name, NULL, flags, result); \ -+ "baseline-" name, NULL, 0, NULL, flags, result); \ - } while (0) - - #define DO_TEST_HASFEATURE(arch, host, feature, result) \ - DO_TEST(arch, cpuTestHasFeature, \ - host "/" feature " (" #result ")", \ -- host, feature, NULL, 0, result) -+ host, feature, NULL, 0, NULL, 0, result) - - #define DO_TEST_GUESTCPU(arch, host, cpu, models, result) \ - DO_TEST(arch, cpuTestGuestCPU, \ - host "/" cpu " (" #models ")", \ -- host, cpu, models, 0, result) -+ host, cpu, NULL, 0, models, 0, result) - - #if WITH_QEMU - # define DO_TEST_JSON(arch, host, json) \ - do { \ - if (json == JSON_MODELS) { \ - DO_TEST(arch, cpuTestGuestCPUID, host, host, \ -- NULL, NULL, 0, 0); \ -+ NULL, NULL, 0, NULL, 0, 0); \ - } \ - if (json != JSON_NONE) { \ - DO_TEST(arch, cpuTestJSONCPUID, host, host, \ -- NULL, NULL, json, 0); \ -+ NULL, NULL, 0, NULL, json, 0); \ - DO_TEST(arch, cpuTestJSONSignature, host, host, \ -- NULL, NULL, 0, 0); \ -+ NULL, NULL, 0, NULL, 0, 0); \ - } \ - } while (0) - #else -@@ -964,18 +1020,26 @@ mymain(void) - #define DO_TEST_CPUID(arch, host, json) \ - do { \ - DO_TEST(arch, cpuTestHostCPUID, host, host, \ -- NULL, NULL, 0, 0); \ -+ NULL, NULL, 0, NULL, 0, 0); \ - DO_TEST(arch, cpuTestGuestCPUID, host, host, \ -- NULL, NULL, json, 0); \ -+ NULL, NULL, 0, NULL, json, 0); \ - DO_TEST(arch, cpuTestCPUIDSignature, host, host, \ -- NULL, NULL, 0, 0); \ -+ NULL, NULL, 0, NULL, 0, 0); \ - DO_TEST_JSON(arch, host, json); \ - if (json != JSON_NONE) { \ - DO_TEST(arch, cpuTestUpdateLive, host, host, \ -- NULL, NULL, json, 0); \ -+ NULL, NULL, 0, NULL, json, 0); \ - } \ - } while (0) - -+#define DO_TEST_CPUID_BASELINE(arch, label, cpu1, cpu2) \ -+ do { \ -+ const char *cpus[] = {cpu1, cpu2}; \ -+ DO_TEST(arch, cpuTestCPUIDBaseline, \ -+ label " (" cpu1 ", " cpu2 ")", \ -+ NULL, label, cpus, 2, NULL, 0, 0); \ -+ } while (0) -+ - /* host to host comparison */ - DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host", VIR_CPU_COMPARE_IDENTICAL); - DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE); -@@ -1157,6 +1221,32 @@ mymain(void) - DO_TEST_CPUID(VIR_ARCH_X86_64, "Ice-Lake-Server", JSON_MODELS); - DO_TEST_CPUID(VIR_ARCH_X86_64, "Cooperlake", JSON_MODELS); - -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Ryzen+Rome", -+ "Ryzen-7-1800X-Eight-Core", "Ryzen-9-3900X-12-Core"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "EPYC+Rome", -+ "EPYC-7601-32-Core", "EPYC-7502-32-Core"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Skylake", -+ "Xeon-E5-2609-v3", "Xeon-Gold-6148"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Skylake-IBRS", -+ "Xeon-E5-2609-v3", "Xeon-Gold-6130"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Broadwell-IBRS+Cascadelake", -+ "Xeon-E5-2623-v4", "Xeon-Platinum-8268"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Skylake-IBRS", -+ "Xeon-Platinum-8268", "Xeon-Gold-6130"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Skylake", -+ "Xeon-Platinum-9242", "Xeon-Gold-6148"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Icelake", -+ "Xeon-Platinum-9242", "Ice-Lake-Server"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cooperlake+Icelake", -+ "Cooperlake", "Ice-Lake-Server"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cooperlake+Cascadelake", -+ "Cooperlake", "Xeon-Platinum-9242"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Skylake-Client+Server", -+ "Core-i5-6600", "Xeon-Gold-6148"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Broadwell", -+ "Xeon-E5-2609-v3", "Xeon-E5-2650-v4"); -+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell+Skylake", -+ "Xeon-E7-8890-v3", "Xeon-Gold-5115"); - cleanup: - #if WITH_QEMU - qemuTestDriverFree(&driver); -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml -new file mode 100644 -index 0000000000..4e3f253e9b ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml -@@ -0,0 +1,11 @@ -+ -+ Skylake-Client-IBRS -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml -new file mode 100644 -index 0000000000..e372a3e446 ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml -@@ -0,0 +1,14 @@ -+ -+ Cooperlake -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml -new file mode 100644 -index 0000000000..e559e01583 ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml -@@ -0,0 +1,12 @@ -+ -+ Cascadelake-Server -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml -new file mode 100644 -index 0000000000..906259df0b ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml -@@ -0,0 +1,8 @@ -+ -+ Skylake-Server -+ Intel -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml -new file mode 100644 -index 0000000000..46c32c996f ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml -@@ -0,0 +1,17 @@ -+ -+ Cooperlake -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml -new file mode 100644 -index 0000000000..e372a3e446 ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml -@@ -0,0 +1,14 @@ -+ -+ Cooperlake -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml b/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml -new file mode 100644 -index 0000000000..e1984b2890 ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml -@@ -0,0 +1,13 @@ -+ -+ EPYC -+ AMD -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml -new file mode 100644 -index 0000000000..e687a679b3 ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml -@@ -0,0 +1,14 @@ -+ -+ Haswell -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml -new file mode 100644 -index 0000000000..651457b17a ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml -@@ -0,0 +1,14 @@ -+ -+ Haswell-noTSX -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml -new file mode 100644 -index 0000000000..8bda1c02e2 ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml -@@ -0,0 +1,14 @@ -+ -+ Haswell-noTSX-IBRS -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml -new file mode 100644 -index 0000000000..651457b17a ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml -@@ -0,0 +1,14 @@ -+ -+ Haswell-noTSX -+ Intel -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml b/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml -new file mode 100644 -index 0000000000..051402b9d5 ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml -@@ -0,0 +1,13 @@ -+ -+ EPYC -+ AMD -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml b/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml -new file mode 100644 -index 0000000000..d46ff26eeb ---- /dev/null -+++ b/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml -@@ -0,0 +1,9 @@ -+ -+ Skylake-Client -+ Intel -+ -+ -+ -+ -+ -+ --- -2.35.1 - diff --git a/SOURCES/libvirt-cputest-Drop-some-old-artificial-baseline-tests.patch b/SOURCES/libvirt-cputest-Drop-some-old-artificial-baseline-tests.patch deleted file mode 100644 index 997dad8..0000000 --- a/SOURCES/libvirt-cputest-Drop-some-old-artificial-baseline-tests.patch +++ /dev/null @@ -1,334 +0,0 @@ -From 50d94f13286ca19ef1f457be72debdbf77547df6 Mon Sep 17 00:00:00 2001 -Message-Id: <50d94f13286ca19ef1f457be72debdbf77547df6@dist-git> -From: Jiri Denemark -Date: Wed, 4 May 2022 16:21:38 +0200 -Subject: [PATCH] cputest: Drop some old artificial baseline tests - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit 6aff36019bbaf643f451779621c6c88cab0e64a7) - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark ---- - tests/cputest.c | 6 --- - .../cputestdata/x86_64-baseline-1-result.xml | 5 -- - tests/cputestdata/x86_64-baseline-1.xml | 20 -------- - .../cputestdata/x86_64-baseline-2-result.xml | 4 -- - tests/cputestdata/x86_64-baseline-2.xml | 22 --------- - .../x86_64-baseline-5-expanded.xml | 47 ------------------- - .../cputestdata/x86_64-baseline-5-result.xml | 10 ---- - tests/cputestdata/x86_64-baseline-5.xml | 35 -------------- - .../cputestdata/x86_64-baseline-7-result.xml | 4 -- - tests/cputestdata/x86_64-baseline-7.xml | 24 ---------- - .../cputestdata/x86_64-baseline-8-result.xml | 4 -- - tests/cputestdata/x86_64-baseline-8.xml | 28 ----------- - 12 files changed, 209 deletions(-) - delete mode 100644 tests/cputestdata/x86_64-baseline-1-result.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-1.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-2-result.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-2.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-5-expanded.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-5-result.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-5.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-7-result.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-7.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-8-result.xml - delete mode 100644 tests/cputestdata/x86_64-baseline-8.xml - -diff --git a/tests/cputest.c b/tests/cputest.c -index 0f0621292a..20d56836be 100644 ---- a/tests/cputest.c -+++ b/tests/cputest.c -@@ -1051,18 +1051,12 @@ mymain(void) - DO_TEST_BASELINE(VIR_ARCH_X86_64, "incompatible-vendors", 0, -1); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "no-vendor", 0, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "some-vendors", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "1", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "2", 0, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", 0, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", 0, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", 0, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "7", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "8", 0, 0); - - DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-vendors", 0, -1); - DO_TEST_BASELINE(VIR_ARCH_PPC64, "no-vendor", 0, 0); -diff --git a/tests/cputestdata/x86_64-baseline-1-result.xml b/tests/cputestdata/x86_64-baseline-1-result.xml -deleted file mode 100644 -index 96c4f43b3d..0000000000 ---- a/tests/cputestdata/x86_64-baseline-1-result.xml -+++ /dev/null -@@ -1,5 +0,0 @@ -- -- Conroe -- Intel -- -- -diff --git a/tests/cputestdata/x86_64-baseline-1.xml b/tests/cputestdata/x86_64-baseline-1.xml -deleted file mode 100644 -index 509e6a85d2..0000000000 ---- a/tests/cputestdata/x86_64-baseline-1.xml -+++ /dev/null -@@ -1,20 +0,0 @@ -- -- -- x86_64 -- Penryn -- Intel -- -- -- -- x86_64 -- Conroe -- Intel -- -- -- -- x86_64 -- core2duo -- Intel -- -- -- -diff --git a/tests/cputestdata/x86_64-baseline-2-result.xml b/tests/cputestdata/x86_64-baseline-2-result.xml -deleted file mode 100644 -index a11352d0b1..0000000000 ---- a/tests/cputestdata/x86_64-baseline-2-result.xml -+++ /dev/null -@@ -1,4 +0,0 @@ -- -- core2duo -- -- -diff --git a/tests/cputestdata/x86_64-baseline-2.xml b/tests/cputestdata/x86_64-baseline-2.xml -deleted file mode 100644 -index 055223fd34..0000000000 ---- a/tests/cputestdata/x86_64-baseline-2.xml -+++ /dev/null -@@ -1,22 +0,0 @@ -- -- -- x86_64 -- core2duo -- -- -- -- x86_64 -- pentiumpro -- -- -- -- -- -- -- -- -- -- -- -- -- -diff --git a/tests/cputestdata/x86_64-baseline-5-expanded.xml b/tests/cputestdata/x86_64-baseline-5-expanded.xml -deleted file mode 100644 -index 2c1b400150..0000000000 ---- a/tests/cputestdata/x86_64-baseline-5-expanded.xml -+++ /dev/null -@@ -1,47 +0,0 @@ -- -- SandyBridge -- Intel -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -diff --git a/tests/cputestdata/x86_64-baseline-5-result.xml b/tests/cputestdata/x86_64-baseline-5-result.xml -deleted file mode 100644 -index 775a27de2e..0000000000 ---- a/tests/cputestdata/x86_64-baseline-5-result.xml -+++ /dev/null -@@ -1,10 +0,0 @@ -- -- SandyBridge -- Intel -- -- -- -- -- -- -- -diff --git a/tests/cputestdata/x86_64-baseline-5.xml b/tests/cputestdata/x86_64-baseline-5.xml -deleted file mode 100644 -index 80cd533ca4..0000000000 ---- a/tests/cputestdata/x86_64-baseline-5.xml -+++ /dev/null -@@ -1,35 +0,0 @@ -- -- -- x86_64 -- Westmere -- Intel -- -- -- -- -- -- -- -- -- -- -- -- -- -- x86_64 -- Nehalem -- Intel -- -- -- -- -- -- -- -- -- -- -- -- -- -- -diff --git a/tests/cputestdata/x86_64-baseline-7-result.xml b/tests/cputestdata/x86_64-baseline-7-result.xml -deleted file mode 100644 -index 2af549e77a..0000000000 ---- a/tests/cputestdata/x86_64-baseline-7-result.xml -+++ /dev/null -@@ -1,4 +0,0 @@ -- -- Haswell-noTSX -- Intel -- -diff --git a/tests/cputestdata/x86_64-baseline-7.xml b/tests/cputestdata/x86_64-baseline-7.xml -deleted file mode 100644 -index b7e61b160c..0000000000 ---- a/tests/cputestdata/x86_64-baseline-7.xml -+++ /dev/null -@@ -1,24 +0,0 @@ -- -- -- x86_64 -- SandyBridge -- Intel -- -- -- -- -- -- -- -- -- -- -- -- -- -- x86_64 -- Haswell-noTSX -- Intel -- -- -- -diff --git a/tests/cputestdata/x86_64-baseline-8-result.xml b/tests/cputestdata/x86_64-baseline-8-result.xml -deleted file mode 100644 -index 88226b3dab..0000000000 ---- a/tests/cputestdata/x86_64-baseline-8-result.xml -+++ /dev/null -@@ -1,4 +0,0 @@ -- -- Broadwell-noTSX -- Intel -- -diff --git a/tests/cputestdata/x86_64-baseline-8.xml b/tests/cputestdata/x86_64-baseline-8.xml -deleted file mode 100644 -index f1ee67d542..0000000000 ---- a/tests/cputestdata/x86_64-baseline-8.xml -+++ /dev/null -@@ -1,28 +0,0 @@ -- -- -- x86_64 -- SandyBridge -- Intel -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- x86_64 -- Broadwell-noTSX -- Intel -- -- -- --- -2.35.1 - diff --git a/SOURCES/libvirt-cputest-Give-better-names-to-baseline-tests.patch b/SOURCES/libvirt-cputest-Give-better-names-to-baseline-tests.patch deleted file mode 100644 index ece2b12..0000000 --- a/SOURCES/libvirt-cputest-Give-better-names-to-baseline-tests.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 6cf9cd8f6d9e90eadd58d8a37129e7401876e4e8 Mon Sep 17 00:00:00 2001 -Message-Id: <6cf9cd8f6d9e90eadd58d8a37129e7401876e4e8@dist-git> -From: Jiri Denemark -Date: Wed, 4 May 2022 16:28:03 +0200 -Subject: [PATCH] cputest: Give better names to baseline tests - -Signed-off-by: Jiri Denemark -Reviewed-by: Michal Privoznik -(cherry picked from commit 3daa68e26514dc114d71f4c44f7d728e93a53cd0) - -https://bugzilla.redhat.com/show_bug.cgi?id=1851227 - -Signed-off-by: Jiri Denemark ---- - tests/cputest.c | 12 ++++++------ - ... x86_64-baseline-Westmere+Nehalem-migratable.xml} | 0 - ...l => x86_64-baseline-Westmere+Nehalem-result.xml} | 0 - ...ne-6.xml => x86_64-baseline-Westmere+Nehalem.xml} | 0 - ...ded.xml => x86_64-baseline-features-expanded.xml} | 0 - ...esult.xml => x86_64-baseline-features-result.xml} | 0 - ...4-baseline-4.xml => x86_64-baseline-features.xml} | 0 - ...anded.xml => x86_64-baseline-simple-expanded.xml} | 0 - ...-result.xml => x86_64-baseline-simple-result.xml} | 0 - ..._64-baseline-3.xml => x86_64-baseline-simple.xml} | 0 - 10 files changed, 6 insertions(+), 6 deletions(-) - rename tests/cputestdata/{x86_64-baseline-6-migratable.xml => x86_64-baseline-Westmere+Nehalem-migratable.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-6-result.xml => x86_64-baseline-Westmere+Nehalem-result.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-6.xml => x86_64-baseline-Westmere+Nehalem.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-4-expanded.xml => x86_64-baseline-features-expanded.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-4-result.xml => x86_64-baseline-features-result.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-4.xml => x86_64-baseline-features.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-3-expanded.xml => x86_64-baseline-simple-expanded.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-3-result.xml => x86_64-baseline-simple-result.xml} (100%) - rename tests/cputestdata/{x86_64-baseline-3.xml => x86_64-baseline-simple.xml} (100%) - -diff --git a/tests/cputest.c b/tests/cputest.c -index 20d56836be..b939e20718 100644 ---- a/tests/cputest.c -+++ b/tests/cputest.c -@@ -1051,12 +1051,12 @@ mymain(void) - DO_TEST_BASELINE(VIR_ARCH_X86_64, "incompatible-vendors", 0, -1); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "no-vendor", 0, 0); - DO_TEST_BASELINE(VIR_ARCH_X86_64, "some-vendors", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", 0, 0); -- DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0); -+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "simple", 0, 0); -+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "simple", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); -+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "features", 0, 0); -+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "features", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0); -+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "Westmere+Nehalem", 0, 0); -+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "Westmere+Nehalem", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0); - - DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-vendors", 0, -1); - DO_TEST_BASELINE(VIR_ARCH_PPC64, "no-vendor", 0, 0); -diff --git a/tests/cputestdata/x86_64-baseline-6-migratable.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-6-migratable.xml -rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml -diff --git a/tests/cputestdata/x86_64-baseline-6-result.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-6-result.xml -rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml -diff --git a/tests/cputestdata/x86_64-baseline-6.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-6.xml -rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem.xml -diff --git a/tests/cputestdata/x86_64-baseline-4-expanded.xml b/tests/cputestdata/x86_64-baseline-features-expanded.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-4-expanded.xml -rename to tests/cputestdata/x86_64-baseline-features-expanded.xml -diff --git a/tests/cputestdata/x86_64-baseline-4-result.xml b/tests/cputestdata/x86_64-baseline-features-result.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-4-result.xml -rename to tests/cputestdata/x86_64-baseline-features-result.xml -diff --git a/tests/cputestdata/x86_64-baseline-4.xml b/tests/cputestdata/x86_64-baseline-features.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-4.xml -rename to tests/cputestdata/x86_64-baseline-features.xml -diff --git a/tests/cputestdata/x86_64-baseline-3-expanded.xml b/tests/cputestdata/x86_64-baseline-simple-expanded.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-3-expanded.xml -rename to tests/cputestdata/x86_64-baseline-simple-expanded.xml -diff --git a/tests/cputestdata/x86_64-baseline-3-result.xml b/tests/cputestdata/x86_64-baseline-simple-result.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-3-result.xml -rename to tests/cputestdata/x86_64-baseline-simple-result.xml -diff --git a/tests/cputestdata/x86_64-baseline-3.xml b/tests/cputestdata/x86_64-baseline-simple.xml -similarity index 100% -rename from tests/cputestdata/x86_64-baseline-3.xml -rename to tests/cputestdata/x86_64-baseline-simple.xml --- -2.35.1 - diff --git a/SOURCES/libvirt-domain_validate-Split-out-validation-of-disk-startup-policy.patch b/SOURCES/libvirt-domain_validate-Split-out-validation-of-disk-startup-policy.patch deleted file mode 100644 index f9c61bb..0000000 --- a/SOURCES/libvirt-domain_validate-Split-out-validation-of-disk-startup-policy.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 296343c5a950668d790f9cd5ebd7b466e8156d03 Mon Sep 17 00:00:00 2001 -Message-Id: <296343c5a950668d790f9cd5ebd7b466e8156d03@dist-git> -From: Peter Krempa -Date: Tue, 14 Jun 2022 13:23:29 +0200 -Subject: [PATCH] domain_validate: Split out validation of disk startup policy -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Move the code into 'virDomainDiskDefValidateStartupPolicy' which will be -later reused in the qemu driver. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit 3603a18bcec18842cedecbd8329723062b87795c) -https://bugzilla.redhat.com/show_bug.cgi?id=2095758 ---- - src/conf/domain_validate.c | 45 ++++++++++++++++++++++++-------------- - src/conf/domain_validate.h | 2 ++ - src/libvirt_private.syms | 1 + - 3 files changed, 31 insertions(+), 17 deletions(-) - -diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c -index 452742e67c..bfff7339ef 100644 ---- a/src/conf/domain_validate.c -+++ b/src/conf/domain_validate.c -@@ -598,6 +598,32 @@ virDomainDiskDefSourceLUNValidate(const virStorageSource *src) - } - - -+int -+virDomainDiskDefValidateStartupPolicy(const virDomainDiskDef *disk) -+{ -+ if (disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_DEFAULT) -+ return 0; -+ -+ if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) { -+ virReportError(VIR_ERR_XML_ERROR, -+ _("disk startupPolicy '%s' is not allowed for disk of '%s' type"), -+ virDomainStartupPolicyTypeToString(disk->startupPolicy), -+ virStorageTypeToString(disk->src->type)); -+ return -1; -+ } -+ -+ if (disk->device != VIR_DOMAIN_DISK_DEVICE_CDROM && -+ disk->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY && -+ disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_REQUISITE) { -+ virReportError(VIR_ERR_XML_ERROR, "%s", -+ _("disk startupPolicy 'requisite' is allowed only for cdrom or floppy")); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+ - static int - virDomainDiskDefValidate(const virDomainDef *def, - const virDomainDiskDef *disk) -@@ -775,23 +801,8 @@ virDomainDiskDefValidate(const virDomainDef *def, - return -1; - } - -- if (disk->startupPolicy != VIR_DOMAIN_STARTUP_POLICY_DEFAULT) { -- if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) { -- virReportError(VIR_ERR_XML_ERROR, -- _("disk startupPolicy '%s' is not allowed for disk of '%s' type"), -- virDomainStartupPolicyTypeToString(disk->startupPolicy), -- virStorageTypeToString(disk->src->type)); -- return -1; -- } -- -- if (disk->device != VIR_DOMAIN_DISK_DEVICE_CDROM && -- disk->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY && -- disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_REQUISITE) { -- virReportError(VIR_ERR_XML_ERROR, "%s", -- _("disk startupPolicy 'requisite' is allowed only for cdrom or floppy")); -- return -1; -- } -- } -+ if (virDomainDiskDefValidateStartupPolicy(disk) < 0) -+ return -1; - - if (disk->wwn && !virValidateWWN(disk->wwn)) - return -1; -diff --git a/src/conf/domain_validate.h b/src/conf/domain_validate.h -index 430d61fd3c..07b99195e3 100644 ---- a/src/conf/domain_validate.h -+++ b/src/conf/domain_validate.h -@@ -41,4 +41,6 @@ int virDomainDeviceDefValidate(const virDomainDeviceDef *dev, - - int virDomainDiskDefValidateSource(const virStorageSource *src); - -+int virDomainDiskDefValidateStartupPolicy(const virDomainDiskDef *disk); -+ - int virDomainDiskDefSourceLUNValidate(const virStorageSource *src); -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 2c42e2a5e8..5b7a056151 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -777,6 +777,7 @@ virDomainActualNetDefValidate; - virDomainDefValidate; - virDomainDeviceValidateAliasForHotplug; - virDomainDiskDefSourceLUNValidate; -+virDomainDiskDefValidateStartupPolicy; - - - # conf/interface_conf.h --- -2.35.1 - diff --git a/SOURCES/libvirt-lib-Set-up-cpuset-controller-for-restrictive-numatune.patch b/SOURCES/libvirt-lib-Set-up-cpuset-controller-for-restrictive-numatune.patch deleted file mode 100644 index e9e7bc6..0000000 --- a/SOURCES/libvirt-lib-Set-up-cpuset-controller-for-restrictive-numatune.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 08ddc711a2e6d94a0fce55fec8e012a434655d2c Mon Sep 17 00:00:00 2001 -Message-ID: <08ddc711a2e6d94a0fce55fec8e012a434655d2c.1690812875.git.jdenemar@redhat.com> -From: Michal Privoznik -Date: Fri, 1 Apr 2022 14:30:05 +0200 -Subject: [PATCH] lib: Set up cpuset controller for restrictive numatune -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The aim of 'restrictive' numatune mode is to rely solely on -CGroups to have QEMU running on configured NUMA nodes. However, -we were never setting the cpuset controller when a domain was -starting up. We are doing so only when -virDomainSetNumaParameters() is called (aka live pinning). - -This is obviously wrong. Fortunately, fix is simple as -'restrictive' is similar to 'strict' - every location where -VIR_DOMAIN_NUMATUNE_MEM_STRICT occurs can be audited and -VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE case can be added. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2070380 -Signed-off-by: Michal Privoznik -Reviewed-by: Ján Tomko -(cherry picked from commit 629282d8845407c1aff9a26f5dc026e15121f8cd) - -Conflicts: -- src/ch/ch_process.c: The CH driver diverged because it's - unsupported downstream. Just drop the conflicting hunk from - there. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2223464 -Signed-off-by: Michal Privoznik ---- - src/lxc/lxc_controller.c | 3 ++- - src/qemu/qemu_process.c | 6 ++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c -index 3c930eaacd..6fd8373256 100644 ---- a/src/lxc/lxc_controller.c -+++ b/src/lxc/lxc_controller.c -@@ -812,7 +812,8 @@ static int virLXCControllerSetupResourceLimits(virLXCController *ctrl) - virDomainNumatuneMemMode mode; - - if (virDomainNumatuneGetMode(ctrl->def->numa, -1, &mode) == 0) { -- if (mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT && -+ if ((mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT || -+ mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) && - virCgroupControllerAvailable(VIR_CGROUP_CONTROLLER_CPUSET)) { - /* Use virNuma* API iff necessary. Once set and child is exec()-ed, - * there's no way for us to change it. Rely on cgroups (if available -diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c -index 0fb665bc82..73d54f01cd 100644 ---- a/src/qemu/qemu_process.c -+++ b/src/qemu/qemu_process.c -@@ -2645,7 +2645,8 @@ qemuProcessSetupPid(virDomainObj *vm, - virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)) { - - if (virDomainNumatuneGetMode(vm->def->numa, -1, &mem_mode) == 0 && -- mem_mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT && -+ (mem_mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT || -+ mem_mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) && - virDomainNumatuneMaybeFormatNodeset(vm->def->numa, - priv->autoNodeset, - &mem_mask, -1) < 0) -@@ -3162,7 +3163,8 @@ static int qemuProcessHook(void *data) - goto cleanup; - - if (virDomainNumatuneGetMode(h->vm->def->numa, -1, &mode) == 0) { -- if (mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT && -+ if ((mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT || -+ mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) && - h->cfg->cgroupControllers & (1 << VIR_CGROUP_CONTROLLER_CPUSET) && - virCgroupControllerAvailable(VIR_CGROUP_CONTROLLER_CPUSET)) { - /* Use virNuma* API iff necessary. Once set and child is exec()-ed, --- -2.41.0 diff --git a/SOURCES/libvirt-node_device-Rework-udevKludgeStorageType.patch b/SOURCES/libvirt-node_device-Rework-udevKludgeStorageType.patch deleted file mode 100644 index 0635fd0..0000000 --- a/SOURCES/libvirt-node_device-Rework-udevKludgeStorageType.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 71a79a215d278d83f3cd3da330e0378209983b6b Mon Sep 17 00:00:00 2001 -Message-Id: <71a79a215d278d83f3cd3da330e0378209983b6b@dist-git> -From: Michal Privoznik -Date: Wed, 26 Jan 2022 14:00:13 +0100 -Subject: [PATCH] node_device: Rework udevKludgeStorageType() - -The udevKludgeStorageType() function looks at devlink name -(/dev/XXX) and guesses the type of the (storage) device using a -series of STRPREFIX() calls. Well those can be turn into an array -and a for() loop, especially if we are about to add a new case -(in the next commit). - -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -(cherry picked from commit ec9e2adb961f2e1a121f47e7985142e827f3347b) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2056673 -Signed-off-by: Michal Privoznik ---- - src/node_device/node_device_udev.c | 43 ++++++++++++++++-------------- - 1 file changed, 23 insertions(+), 20 deletions(-) - -diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c -index cd1722f934..dd18401e78 100644 ---- a/src/node_device/node_device_udev.c -+++ b/src/node_device/node_device_udev.c -@@ -890,32 +890,35 @@ udevProcessDASD(struct udev_device *device, - static int - udevKludgeStorageType(virNodeDeviceDef *def) - { -+ size_t i; -+ const struct { -+ const char *prefix; -+ const char *subst; -+ } fixups[] = { -+ /* virtio disk */ -+ { "/dev/vd", "disk" }, -+ -+ /* For Direct Access Storage Devices (DASDs) there are -+ * currently no identifiers in udev besides ID_PATH. Since -+ * ID_TYPE=disk does not exist on DASDs they fall through -+ * the udevProcessStorage detection logic. */ -+ { "/dev/dasd", "dasd" }, -+ }; -+ - VIR_DEBUG("Could not find definitive storage type for device " - "with sysfs path '%s', trying to guess it", - def->sysfs_path); - -- /* virtio disk */ -- if (STRPREFIX(def->caps->data.storage.block, "/dev/vd")) { -- def->caps->data.storage.drive_type = g_strdup("disk"); -- VIR_DEBUG("Found storage type '%s' for device " -- "with sysfs path '%s'", -- def->caps->data.storage.drive_type, -- def->sysfs_path); -- return 0; -+ for (i = 0; i < G_N_ELEMENTS(fixups); i++) { -+ if (STRPREFIX(def->caps->data.storage.block, fixups[i].prefix)) { -+ def->caps->data.storage.drive_type = g_strdup(fixups[i].subst); -+ VIR_DEBUG("Found storage type '%s' for device with sysfs path '%s'", -+ def->caps->data.storage.drive_type, -+ def->sysfs_path); -+ return 0; -+ } - } - -- /* For Direct Access Storage Devices (DASDs) there are -- * currently no identifiers in udev besides ID_PATH. Since -- * ID_TYPE=disk does not exist on DASDs they fall through -- * the udevProcessStorage detection logic. */ -- if (STRPREFIX(def->caps->data.storage.block, "/dev/dasd")) { -- def->caps->data.storage.drive_type = g_strdup("dasd"); -- VIR_DEBUG("Found storage type '%s' for device " -- "with sysfs path '%s'", -- def->caps->data.storage.drive_type, -- def->sysfs_path); -- return 0; -- } - VIR_DEBUG("Could not determine storage type " - "for device with sysfs path '%s'", def->sysfs_path); - return -1; --- -2.35.1 - diff --git a/SOURCES/libvirt-node_device-Treat-NVMe-disks-as-regular-disks.patch b/SOURCES/libvirt-node_device-Treat-NVMe-disks-as-regular-disks.patch deleted file mode 100644 index 259e8d2..0000000 --- a/SOURCES/libvirt-node_device-Treat-NVMe-disks-as-regular-disks.patch +++ /dev/null @@ -1,39 +0,0 @@ -From c04c7a986bd3514730e4169bf1a70bbec1fda006 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Wed, 26 Jan 2022 13:47:33 +0100 -Subject: [PATCH] node_device: Treat NVMe disks as regular disks - -Unfortunately, udev doesn't set ID_TYPE attribute for NVMe disks, -therefore we have to add another case into udevKludgeStorageType() -to treat /dev/nvme* devlinks as any other disk. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2045953 -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -(cherry picked from commit f103976ff34a52298df1810d82ececa3e7da4291) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2056673 -Signed-off-by: Michal Privoznik ---- - src/node_device/node_device_udev.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c -index dd18401e78..a9e8bf10da 100644 ---- a/src/node_device/node_device_udev.c -+++ b/src/node_device/node_device_udev.c -@@ -903,6 +903,11 @@ udevKludgeStorageType(virNodeDeviceDef *def) - * ID_TYPE=disk does not exist on DASDs they fall through - * the udevProcessStorage detection logic. */ - { "/dev/dasd", "dasd" }, -+ -+ /* NVMe disk. While strictly speaking /dev/nvme is a -+ * controller not a disk, this function is called if and -+ * only if @def is of VIR_NODE_DEV_CAP_STORAGE type. */ -+ { "/dev/nvme", "disk" }, - }; - - VIR_DEBUG("Could not find definitive storage type for device " --- -2.35.1 - diff --git a/SOURCES/libvirt-node_device_conf-Avoid-memleak-in-virNodeDeviceGetPCIVPDDynamicCap.patch b/SOURCES/libvirt-node_device_conf-Avoid-memleak-in-virNodeDeviceGetPCIVPDDynamicCap.patch deleted file mode 100644 index 628809a..0000000 --- a/SOURCES/libvirt-node_device_conf-Avoid-memleak-in-virNodeDeviceGetPCIVPDDynamicCap.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 989a569c9c9da0fbf89aab7f292669366b2503f1 Mon Sep 17 00:00:00 2001 -Message-Id: <989a569c9c9da0fbf89aab7f292669366b2503f1@dist-git> -From: Michal Privoznik -Date: Wed, 30 Nov 2022 14:53:21 +0100 -Subject: [PATCH] node_device_conf: Avoid memleak in - virNodeDeviceGetPCIVPDDynamicCap() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The virNodeDeviceGetPCIVPDDynamicCap() function is called from -virNodeDeviceGetPCIDynamicCaps() and therefore has to be a wee -bit more clever about adding VPD capability. Namely, it has to -remove the old one before adding a new one. This is how other -functions called from virNodeDeviceGetPCIDynamicCaps() behave -as well. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143235 -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -(cherry picked from commit 64d32118540aca3d42bc5ee21c8b780cafe04bfa) -https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2023-2700 -Signed-off-by: Ján Tomko ---- - src/conf/node_device_conf.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c -index 16b9497faf..eee94a3900 100644 ---- a/src/conf/node_device_conf.c -+++ b/src/conf/node_device_conf.c -@@ -3100,6 +3100,9 @@ virNodeDeviceGetPCIVPDDynamicCap(virNodeDevCapPCIDev *devCapPCIDev) - virPCIDeviceAddress devAddr; - g_autoptr(virPCIVPDResource) res = NULL; - -+ g_clear_pointer(&devCapPCIDev->vpd, virPCIVPDResourceFree); -+ devCapPCIDev->flags &= ~VIR_NODE_DEV_CAP_FLAG_PCI_VPD; -+ - devAddr.domain = devCapPCIDev->domain; - devAddr.bus = devCapPCIDev->bus; - devAddr.slot = devCapPCIDev->slot; -@@ -3113,8 +3116,6 @@ virNodeDeviceGetPCIVPDDynamicCap(virNodeDevCapPCIDev *devCapPCIDev) - if ((res = virPCIDeviceGetVPD(pciDev))) { - devCapPCIDev->flags |= VIR_NODE_DEV_CAP_FLAG_PCI_VPD; - devCapPCIDev->vpd = g_steal_pointer(&res); -- } else { -- virPCIVPDResourceFree(g_steal_pointer(&devCapPCIDev->vpd)); - } - } - return 0; --- -2.40.1 diff --git a/SOURCES/libvirt-nodedev-add-optional-device-address-of-channel-device-to-css-device.patch b/SOURCES/libvirt-nodedev-add-optional-device-address-of-channel-device-to-css-device.patch deleted file mode 100644 index b867ca3..0000000 --- a/SOURCES/libvirt-nodedev-add-optional-device-address-of-channel-device-to-css-device.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 5921eeddf0a284ccbec04896901c9bd4177de6dd Mon Sep 17 00:00:00 2001 -Message-Id: <5921eeddf0a284ccbec04896901c9bd4177de6dd@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:15 +0200 -Subject: [PATCH] nodedev: add optional device address of channel device to css - device - -Add the new introduced sysfs attribute dev_busid which provides the address -of the device in the subchannel independent from the bound device driver. -It is added if available in the sysfs as optional channel_dev_addr element into -the css device capabilty providing the ccw deivce address attributes cssid, -ssid and devno. - -Signed-off-by: Boris Fiuczynski -Signed-off-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit 122b975e4004c83b6fc442ec6cdfd71eb5b55cc4) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - docs/schemas/nodedev.rng | 5 +++++ - src/conf/node_device_conf.c | 28 ++++++++++++++++++++++++++++ - src/conf/node_device_conf.h | 2 ++ - src/node_device/node_device_udev.c | 8 ++++++++ - 4 files changed, 43 insertions(+) - -diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng -index 29515d2d7e..43f1abc247 100644 ---- a/docs/schemas/nodedev.rng -+++ b/docs/schemas/nodedev.rng -@@ -677,6 +677,11 @@ - css - - -+ -+ -+ -+ -+ - - - -diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c -index fcb5be24e1..16b9497faf 100644 ---- a/src/conf/node_device_conf.c -+++ b/src/conf/node_device_conf.c -@@ -643,6 +643,17 @@ virNodeDeviceCapCSSDefFormat(virBuffer *buf, - - virNodeDeviceCapCCWDefFormat(buf, data); - -+ if (ccw_dev.channel_dev_addr) { -+ virCCWDeviceAddress *ccw = ccw_dev.channel_dev_addr; -+ virBufferAddLit(buf, "\n"); -+ virBufferAdjustIndent(buf, 2); -+ virBufferAsprintf(buf, "0x%x\n", ccw->cssid); -+ virBufferAsprintf(buf, "0x%x\n", ccw->ssid); -+ virBufferAsprintf(buf, "0x%04x\n", ccw->devno); -+ virBufferAdjustIndent(buf, -2); -+ virBufferAddLit(buf, "\n"); -+ } -+ - if (ccw_dev.flags & VIR_NODE_DEV_CAP_FLAG_CSS_MDEV) - virNodeDeviceCapMdevTypesFormat(buf, - ccw_dev.mdev_types, -@@ -1255,6 +1266,7 @@ virNodeDevCapCSSParseXML(xmlXPathContextPtr ctxt, - g_autofree xmlNodePtr *nodes = NULL; - int n = 0; - size_t i = 0; -+ xmlNodePtr channel_ddno = NULL; - - ctxt->node = node; - -@@ -1269,6 +1281,21 @@ virNodeDevCapCSSParseXML(xmlXPathContextPtr ctxt, - return -1; - } - -+ /* channel_dev_addr is optional */ -+ if ((channel_ddno = virXPathNode("./channel_dev_addr[1]", ctxt))) { -+ g_autofree virCCWDeviceAddress *channel_dev = NULL; -+ -+ channel_dev = g_new0(virCCWDeviceAddress, 1); -+ -+ if (virNodeDevCCWDeviceAddressParseXML(ctxt, -+ channel_ddno, -+ def->name, -+ channel_dev) < 0) -+ return -1; -+ -+ ccw_dev->channel_dev_addr = g_steal_pointer(&channel_dev); -+ } -+ - return 0; - } - -@@ -2637,6 +2664,7 @@ virNodeDevCapsDefFree(virNodeDevCapsDef *caps) - for (i = 0; i < data->ccw_dev.nmdev_types; i++) - virMediatedDeviceTypeFree(data->ccw_dev.mdev_types[i]); - g_free(data->ccw_dev.mdev_types); -+ g_free(data->ccw_dev.channel_dev_addr); - break; - case VIR_NODE_DEV_CAP_AP_MATRIX: - g_free(data->ap_matrix.addr); -diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h -index e4d1f67d53..d1751ed874 100644 ---- a/src/conf/node_device_conf.h -+++ b/src/conf/node_device_conf.h -@@ -24,6 +24,7 @@ - - #include "internal.h" - #include "virbitmap.h" -+#include "virccw.h" - #include "virpcivpd.h" - #include "virscsihost.h" - #include "virpci.h" -@@ -279,6 +280,7 @@ struct _virNodeDevCapCCW { - unsigned int flags; /* enum virNodeDevCCWCapFlags */ - virMediatedDeviceType **mdev_types; - size_t nmdev_types; -+ virCCWDeviceAddress *channel_dev_addr; - }; - - typedef struct _virNodeDevCapVDPA virNodeDevCapVDPA; -diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c -index ffcb3e8640..611a2592ca 100644 ---- a/src/node_device/node_device_udev.c -+++ b/src/node_device/node_device_udev.c -@@ -1128,6 +1128,8 @@ static int - udevProcessCSS(struct udev_device *device, - virNodeDeviceDef *def) - { -+ g_autofree char *dev_busid = NULL; -+ - /* only process IO subchannel and vfio-ccw devices to keep the list sane */ - if (!def->driver || - (STRNEQ(def->driver, "io_subchannel") && -@@ -1139,6 +1141,12 @@ udevProcessCSS(struct udev_device *device, - - udevGenerateDeviceName(device, def, NULL); - -+ /* process optional channel devices information */ -+ udevGetStringSysfsAttr(device, "dev_busid", &dev_busid); -+ -+ if (dev_busid != NULL) -+ def->caps->data.ccw_dev.channel_dev_addr = virCCWDeviceAddressFromString(dev_busid); -+ - if (virNodeDeviceGetCSSDynamicCaps(def->sysfs_path, &def->caps->data.ccw_dev) < 0) - return -1; - --- -2.39.1 - diff --git a/SOURCES/libvirt-nodedev-add-tests-for-optional-device-address-to-css-device.patch b/SOURCES/libvirt-nodedev-add-tests-for-optional-device-address-to-css-device.patch deleted file mode 100644 index 2ee8544..0000000 --- a/SOURCES/libvirt-nodedev-add-tests-for-optional-device-address-to-css-device.patch +++ /dev/null @@ -1,149 +0,0 @@ -From ea4976de7bccfe8016950d040629a6818a58db4e Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:16 +0200 -Subject: [PATCH] nodedev: add tests for optional device address to css device - -Add nodedev schema parsing and format tests for the optional new device -address on the css devices. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 127fda5e84790af2c5a16b61a87e339391cccb3b) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - .../css_0_0_10000-invalid.xml | 10 +++++++++ - ...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 22 +++++++++++++++++++ - .../css_0_0_ffff_channel_dev_addr-invalid.xml | 15 +++++++++++++ - .../css_0_0_ffff_channel_dev_addr.xml | 15 +++++++++++++ - ...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 1 + - .../css_0_0_ffff_channel_dev_addr.xml | 1 + - tests/nodedevxml2xmltest.c | 2 ++ - 7 files changed, 66 insertions(+) - create mode 100644 tests/nodedevschemadata/css_0_0_10000-invalid.xml - create mode 100644 tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml - create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml - create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml - create mode 120000 tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml - create mode 120000 tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml - -diff --git a/tests/nodedevschemadata/css_0_0_10000-invalid.xml b/tests/nodedevschemadata/css_0_0_10000-invalid.xml -new file mode 100644 -index 0000000000..740bb489a7 ---- /dev/null -+++ b/tests/nodedevschemadata/css_0_0_10000-invalid.xml -@@ -0,0 +1,10 @@ -+ -+ css_0_0_10000 -+ /sys/devices/css0/0.0.10000 -+ computer -+ -+ 0x0 -+ 0x0 -+ 0x10000 -+ -+ -diff --git a/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml b/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml -new file mode 100644 -index 0000000000..198dcb0cb0 ---- /dev/null -+++ b/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml -@@ -0,0 +1,22 @@ -+ -+ css_0_0_fffe -+ /sys/devices/css0/0.0.fffe -+ computer -+ -+ 0x0 -+ 0x0 -+ 0xfffe -+ -+ 0x0 -+ 0x0 -+ 0x0815 -+ -+ -+ -+ I/O subchannel (Non-QDIO) -+ vfio-ccw -+ 1 -+ -+ -+ -+ -diff --git a/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml -new file mode 100644 -index 0000000000..3f2c5558c7 ---- /dev/null -+++ b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml -@@ -0,0 +1,15 @@ -+ -+ css_0_0_ffff -+ /sys/devices/css0/0.0.ffff -+ computer -+ -+ 0x0 -+ 0x0 -+ 0xffff -+ -+ 0x0 -+ 0x0 -+ 0x10000 -+ -+ -+ -diff --git a/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml -new file mode 100644 -index 0000000000..17a77cb282 ---- /dev/null -+++ b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml -@@ -0,0 +1,15 @@ -+ -+ css_0_0_ffff -+ /sys/devices/css0/0.0.ffff -+ computer -+ -+ 0x0 -+ 0x0 -+ 0xffff -+ -+ 0x0 -+ 0x0 -+ 0x0815 -+ -+ -+ -diff --git a/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml b/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml -new file mode 120000 -index 0000000000..65ab582ee8 ---- /dev/null -+++ b/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml -@@ -0,0 +1 @@ -+../nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml -\ No newline at end of file -diff --git a/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml b/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml -new file mode 120000 -index 0000000000..cbfe719777 ---- /dev/null -+++ b/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml -@@ -0,0 +1 @@ -+../nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml -\ No newline at end of file -diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c -index 557347fb07..ad9562cc82 100644 ---- a/tests/nodedevxml2xmltest.c -+++ b/tests/nodedevxml2xmltest.c -@@ -125,7 +125,9 @@ mymain(void) - DO_TEST("mdev_3627463d_b7f0_4fea_b468_f1da537d301b"); - DO_TEST("ccw_0_0_ffff"); - DO_TEST("css_0_0_ffff"); -+ DO_TEST("css_0_0_ffff_channel_dev_addr"); - DO_TEST("css_0_0_fffe_mdev_types"); -+ DO_TEST("css_0_0_fffe_mdev_types_channel_dev_addr"); - DO_TEST("ap_card07"); - DO_TEST("ap_07_0038"); - DO_TEST("ap_matrix"); --- -2.39.1 - diff --git a/SOURCES/libvirt-nodedev-fix-reported-error-msg-in-css-cap-XML-parsing.patch b/SOURCES/libvirt-nodedev-fix-reported-error-msg-in-css-cap-XML-parsing.patch deleted file mode 100644 index 952dd3f..0000000 --- a/SOURCES/libvirt-nodedev-fix-reported-error-msg-in-css-cap-XML-parsing.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d82e4473a66da27d2c6f41f8ecadacbd00f44430 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:00 +0200 -Subject: [PATCH] nodedev: fix reported error msg in css cap XML parsing - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Marc Hartmayer -Reviewed-by: Michal Privoznik -(cherry picked from commit 78094a4bd1562fec73ae99c67ddcbedd83953d5c) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/node_device_conf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c -index 0bac0fde8d..a6ebf4b66f 100644 ---- a/src/conf/node_device_conf.c -+++ b/src/conf/node_device_conf.c -@@ -1193,7 +1193,7 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt, - if (virStrToLong_uip(ssid, NULL, 0, &ccw_dev->ssid) < 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid ssid value '%s' for '%s'"), -- cssid, def->name); -+ ssid, def->name); - return -1; - } - --- -2.39.1 - diff --git a/SOURCES/libvirt-nodedev-prevent-internal-error-on-dev_busid-parse.patch b/SOURCES/libvirt-nodedev-prevent-internal-error-on-dev_busid-parse.patch deleted file mode 100644 index 144e29c..0000000 --- a/SOURCES/libvirt-nodedev-prevent-internal-error-on-dev_busid-parse.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7c60078d7a6442dc8cb5a711876d28f70d892bff Mon Sep 17 00:00:00 2001 -Message-Id: <7c60078d7a6442dc8cb5a711876d28f70d892bff@dist-git> -From: Boris Fiuczynski -Date: Mon, 23 May 2022 17:56:21 +0200 -Subject: [PATCH] nodedev: prevent internal error on dev_busid parse - -As "none" is a legal value represented in the sysfs attribute dev_busid -this patch prevents libvirt from incorrectly reporting an internal error. - -Signed-off-by: Boris Fiuczynski -Suggested-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit e37c39747be0792d03c450e56ddb3c78d08cbf3e) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/node_device/node_device_udev.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c -index 611a2592ca..b76e3de681 100644 ---- a/src/node_device/node_device_udev.c -+++ b/src/node_device/node_device_udev.c -@@ -1144,7 +1144,7 @@ udevProcessCSS(struct udev_device *device, - /* process optional channel devices information */ - udevGetStringSysfsAttr(device, "dev_busid", &dev_busid); - -- if (dev_busid != NULL) -+ if (dev_busid != NULL && STRNEQ(dev_busid, "none")) - def->caps->data.ccw_dev.channel_dev_addr = virCCWDeviceAddressFromString(dev_busid); - - if (virNodeDeviceGetCSSDynamicCaps(def->sysfs_path, &def->caps->data.ccw_dev) < 0) --- -2.39.1 - diff --git a/SOURCES/libvirt-nodedev-refactor-ccw-device-address-parsing-from-XML.patch b/SOURCES/libvirt-nodedev-refactor-ccw-device-address-parsing-from-XML.patch deleted file mode 100644 index ae4eba5..0000000 --- a/SOURCES/libvirt-nodedev-refactor-ccw-device-address-parsing-from-XML.patch +++ /dev/null @@ -1,140 +0,0 @@ -From ef8c30a091b5b0f08f9405878b49c21c5525dd0a Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:12 +0200 -Subject: [PATCH] nodedev: refactor ccw device address parsing from XML - -Move ccw device address XML parsing into new method for later reuse. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 4402295d371a62ab8632d23002283b8a7721e6a7) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/node_device_conf.c | 96 ++++++++++++++++++++++--------------- - 1 file changed, 58 insertions(+), 38 deletions(-) - -diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c -index 1e00f65717..8982368465 100644 ---- a/src/conf/node_device_conf.c -+++ b/src/conf/node_device_conf.c -@@ -1141,6 +1141,58 @@ virNodeDevAPMatrixCapabilityParseXML(xmlXPathContextPtr ctxt, - } - - -+static int -+virNodeDevCCWDeviceAddressParseXML(xmlXPathContextPtr ctxt, -+ xmlNodePtr node, -+ const char *dev_name, -+ virCCWDeviceAddress *ccw_addr) -+{ -+ VIR_XPATH_NODE_AUTORESTORE(ctxt) -+ g_autofree char *cssid = NULL; -+ g_autofree char *ssid = NULL; -+ g_autofree char *devno = NULL; -+ -+ ctxt->node = node; -+ -+ if (!(cssid = virXPathString("string(./cssid[1])", ctxt))) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ _("missing cssid value for '%s'"), dev_name); -+ return -1; -+ } -+ if (virStrToLong_uip(cssid, NULL, 0, &ccw_addr->cssid) < 0) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ _("invalid cssid value '%s' for '%s'"), -+ cssid, dev_name); -+ return -1; -+ } -+ -+ if (!(ssid = virXPathString("string(./ssid[1])", ctxt))) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ _("missing ssid value for '%s'"), dev_name); -+ return -1; -+ } -+ if (virStrToLong_uip(ssid, NULL, 0, &ccw_addr->ssid) < 0) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ _("invalid ssid value '%s' for '%s'"), -+ ssid, dev_name); -+ return -1; -+ } -+ -+ if (!(devno = virXPathString("string(./devno[1])", ctxt))) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ _("missing devno value for '%s'"), dev_name); -+ return -1; -+ } -+ if (virStrToLong_uip(devno, NULL, 16, &ccw_addr->devno) < 0) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -+ _("invalid devno value '%s' for '%s'"), -+ devno, dev_name); -+ return -1; -+ } -+ -+ return 0; -+} -+ - static int - virNodeDevCSSCapabilityParseXML(xmlXPathContextPtr ctxt, - xmlNodePtr node, -@@ -1178,50 +1230,18 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt, - g_autofree xmlNodePtr *nodes = NULL; - int n = 0; - size_t i = 0; -- g_autofree char *cssid = NULL; -- g_autofree char *ssid = NULL; -- g_autofree char *devno = NULL; -+ g_autofree virCCWDeviceAddress *ccw_addr = NULL; - - ctxt->node = node; - -- if (!(cssid = virXPathString("string(./cssid[1])", ctxt))) { -- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- _("missing cssid value for '%s'"), def->name); -- return -1; -- } -- -- if (virStrToLong_uip(cssid, NULL, 0, &ccw_dev->cssid) < 0) { -- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- _("invalid cssid value '%s' for '%s'"), -- cssid, def->name); -- return -1; -- } -- -- if (!(ssid = virXPathString("string(./ssid[1])", ctxt))) { -- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- _("missing ssid value for '%s'"), def->name); -- return -1; -- } -+ ccw_addr = g_new0(virCCWDeviceAddress, 1); - -- if (virStrToLong_uip(ssid, NULL, 0, &ccw_dev->ssid) < 0) { -- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- _("invalid ssid value '%s' for '%s'"), -- ssid, def->name); -+ if (virNodeDevCCWDeviceAddressParseXML(ctxt, node, def->name, ccw_addr) < 0) - return -1; -- } - -- if (!(devno = virXPathString("string(./devno[1])", ctxt))) { -- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- _("missing devno value for '%s'"), def->name); -- return -1; -- } -- -- if (virStrToLong_uip(devno, NULL, 16, &ccw_dev->devno) < 0) { -- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- _("invalid devno value '%s' for '%s'"), -- devno, def->name); -- return -1; -- } -+ ccw_dev->cssid = ccw_addr->cssid; -+ ccw_dev->ssid = ccw_addr->ssid; -+ ccw_dev->devno = ccw_addr->devno; - - if ((n = virXPathNodeSet("./capability", ctxt, &nodes)) < 0) - return -1; --- -2.39.1 - diff --git a/SOURCES/libvirt-nodedev-refactor-css-XML-parsing-from-ccw-XML-parsing.patch b/SOURCES/libvirt-nodedev-refactor-css-XML-parsing-from-ccw-XML-parsing.patch deleted file mode 100644 index 209f414..0000000 --- a/SOURCES/libvirt-nodedev-refactor-css-XML-parsing-from-ccw-XML-parsing.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 286c821eee3b682d6aa4aeaa13aad92382708803 Mon Sep 17 00:00:00 2001 -Message-Id: <286c821eee3b682d6aa4aeaa13aad92382708803@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:13 +0200 -Subject: [PATCH] nodedev: refactor css XML parsing from ccw XML parsing - -In preparation for easier extension later. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 245ff2d6634b3afb0dbf0d295051e458095bfc80) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/node_device_conf.c | 40 +++++++++++++++++++++++++++---------- - 1 file changed, 30 insertions(+), 10 deletions(-) - -diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c -index 8982368465..fcb5be24e1 100644 ---- a/src/conf/node_device_conf.c -+++ b/src/conf/node_device_conf.c -@@ -1193,6 +1193,31 @@ virNodeDevCCWDeviceAddressParseXML(xmlXPathContextPtr ctxt, - return 0; - } - -+ -+static int -+virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt, -+ virNodeDeviceDef *def, -+ xmlNodePtr node, -+ virNodeDevCapCCW *ccw_dev) -+{ -+ VIR_XPATH_NODE_AUTORESTORE(ctxt) -+ g_autofree virCCWDeviceAddress *ccw_addr = NULL; -+ -+ ctxt->node = node; -+ -+ ccw_addr = g_new0(virCCWDeviceAddress, 1); -+ -+ if (virNodeDevCCWDeviceAddressParseXML(ctxt, node, def->name, ccw_addr) < 0) -+ return -1; -+ -+ ccw_dev->cssid = ccw_addr->cssid; -+ ccw_dev->ssid = ccw_addr->ssid; -+ ccw_dev->devno = ccw_addr->devno; -+ -+ return 0; -+} -+ -+ - static int - virNodeDevCSSCapabilityParseXML(xmlXPathContextPtr ctxt, - xmlNodePtr node, -@@ -1221,7 +1246,7 @@ virNodeDevCSSCapabilityParseXML(xmlXPathContextPtr ctxt, - - - static int --virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt, -+virNodeDevCapCSSParseXML(xmlXPathContextPtr ctxt, - virNodeDeviceDef *def, - xmlNodePtr node, - virNodeDevCapCCW *ccw_dev) -@@ -1230,19 +1255,12 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt, - g_autofree xmlNodePtr *nodes = NULL; - int n = 0; - size_t i = 0; -- g_autofree virCCWDeviceAddress *ccw_addr = NULL; - - ctxt->node = node; - -- ccw_addr = g_new0(virCCWDeviceAddress, 1); -- -- if (virNodeDevCCWDeviceAddressParseXML(ctxt, node, def->name, ccw_addr) < 0) -+ if (virNodeDevCapCCWParseXML(ctxt, def, node, ccw_dev) < 0) - return -1; - -- ccw_dev->cssid = ccw_addr->cssid; -- ccw_dev->ssid = ccw_addr->ssid; -- ccw_dev->devno = ccw_addr->devno; -- - if ((n = virXPathNodeSet("./capability", ctxt, &nodes)) < 0) - return -1; - -@@ -2282,9 +2300,11 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, - ret = virNodeDevCapMdevParseXML(ctxt, def, node, &caps->data.mdev); - break; - case VIR_NODE_DEV_CAP_CCW_DEV: -- case VIR_NODE_DEV_CAP_CSS_DEV: - ret = virNodeDevCapCCWParseXML(ctxt, def, node, &caps->data.ccw_dev); - break; -+ case VIR_NODE_DEV_CAP_CSS_DEV: -+ ret = virNodeDevCapCSSParseXML(ctxt, def, node, &caps->data.ccw_dev); -+ break; - case VIR_NODE_DEV_CAP_AP_CARD: - ret = virNodeDevCapAPCardParseXML(ctxt, def, node, - &caps->data.ap_card); --- -2.39.1 - diff --git a/SOURCES/libvirt-nodedev-refactor-css-format-from-ccw-format-method.patch b/SOURCES/libvirt-nodedev-refactor-css-format-from-ccw-format-method.patch deleted file mode 100644 index ff7dfc1..0000000 --- a/SOURCES/libvirt-nodedev-refactor-css-format-from-ccw-format-method.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d370e2e984b4501060ea0d7a10629db0bfe51ef2 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:11 +0200 -Subject: [PATCH] nodedev: refactor css format from ccw format method - -In preparation for easier extension later. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit c5864885060b136214b4bcef25d604cc3d147014) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/node_device_conf.c | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c -index a6ebf4b66f..1e00f65717 100644 ---- a/src/conf/node_device_conf.c -+++ b/src/conf/node_device_conf.c -@@ -632,10 +632,21 @@ virNodeDeviceCapCCWDefFormat(virBuffer *buf, - data->ccw_dev.ssid); - virBufferAsprintf(buf, "0x%04x\n", - data->ccw_dev.devno); -- if (data->ccw_dev.flags & VIR_NODE_DEV_CAP_FLAG_CSS_MDEV) -+} -+ -+ -+static void -+virNodeDeviceCapCSSDefFormat(virBuffer *buf, -+ const virNodeDevCapData *data) -+{ -+ virNodeDevCapCCW ccw_dev = data->ccw_dev; -+ -+ virNodeDeviceCapCCWDefFormat(buf, data); -+ -+ if (ccw_dev.flags & VIR_NODE_DEV_CAP_FLAG_CSS_MDEV) - virNodeDeviceCapMdevTypesFormat(buf, -- data->ccw_dev.mdev_types, -- data->ccw_dev.nmdev_types); -+ ccw_dev.mdev_types, -+ ccw_dev.nmdev_types); - } - - -@@ -724,9 +735,11 @@ virNodeDeviceDefFormat(const virNodeDeviceDef *def) - virNodeDeviceCapMdevDefFormat(&buf, data); - break; - case VIR_NODE_DEV_CAP_CCW_DEV: -- case VIR_NODE_DEV_CAP_CSS_DEV: - virNodeDeviceCapCCWDefFormat(&buf, data); - break; -+ case VIR_NODE_DEV_CAP_CSS_DEV: -+ virNodeDeviceCapCSSDefFormat(&buf, data); -+ break; - case VIR_NODE_DEV_CAP_VDPA: - virNodeDeviceCapVDPADefFormat(&buf, data); - break; --- -2.39.1 - diff --git a/SOURCES/libvirt-nodedev-update-transient-mdevs.patch b/SOURCES/libvirt-nodedev-update-transient-mdevs.patch deleted file mode 100644 index f32e5a5..0000000 --- a/SOURCES/libvirt-nodedev-update-transient-mdevs.patch +++ /dev/null @@ -1,79 +0,0 @@ -From aebcc09c7060f6eace93821c6a782031cf107d85 Mon Sep 17 00:00:00 2001 -Message-ID: -From: Boris Fiuczynski -Date: Mon, 8 May 2023 19:10:46 +0200 -Subject: [PATCH] nodedev: update transient mdevs - -Instead of updating defined mdevs only add another update for active -devices as well to cover transient mdev devices as well. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143158 -Signed-off-by: Boris Fiuczynski -Reviewed-by: Jonathon Jongsma - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2143160 - -(cherry picked from commit 44a0f2f0c8ff5e78c238013ed297b8fce223ac5a) -Signed-off-by: Jonathon Jongsma ---- - src/node_device/node_device_driver.c | 31 ++++++++++++++++++++++++++++ - 1 file changed, 31 insertions(+) - -diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c -index e6ab4bb94c..943f6121a0 100644 ---- a/src/node_device/node_device_driver.c -+++ b/src/node_device/node_device_driver.c -@@ -1651,6 +1651,24 @@ virMdevctlListDefined(virNodeDeviceDef ***devs, char **errmsg) - } - - -+static int -+virMdevctlListActive(virNodeDeviceDef ***devs, char **errmsg) -+{ -+ int status; -+ g_autofree char *output = NULL; -+ g_autoptr(virCommand) cmd = nodeDeviceGetMdevctlListCommand(false, &output, errmsg); -+ -+ if (virCommandRun(cmd, &status) < 0 || status != 0) { -+ return -1; -+ } -+ -+ if (!output) -+ return -1; -+ -+ return nodeDeviceParseMdevctlJSON(output, devs); -+} -+ -+ - typedef struct _virMdevctlForEachData virMdevctlForEachData; - struct _virMdevctlForEachData { - int ndefs; -@@ -1712,6 +1730,8 @@ int - nodeDeviceUpdateMediatedDevices(void) - { - g_autofree virNodeDeviceDef **defs = NULL; -+ g_autofree virNodeDeviceDef **act_defs = NULL; -+ int act_ndefs = 0; - g_autofree char *errmsg = NULL; - g_autofree char *mdevctl = NULL; - virMdevctlForEachData data = { 0, }; -@@ -1738,6 +1758,17 @@ nodeDeviceUpdateMediatedDevices(void) - if (nodeDeviceUpdateMediatedDevice(defs[i]) < 0) - return -1; - -+ /* Update active/transient mdev devices */ -+ if ((act_ndefs = virMdevctlListActive(&act_defs, &errmsg)) < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ _("failed to query mdevs from mdevctl: %1$s"), errmsg); -+ return -1; -+ } -+ -+ for (i = 0; i < act_ndefs; i++) -+ if (nodeDeviceUpdateMediatedDevice(act_defs[i]) < 0) -+ return -1; -+ - return 0; - } - --- -2.41.0 diff --git a/SOURCES/libvirt-nwfilter-fix-crash-when-counting-number-of-network-filters.patch b/SOURCES/libvirt-nwfilter-fix-crash-when-counting-number-of-network-filters.patch deleted file mode 100644 index 3e5c4f3..0000000 --- a/SOURCES/libvirt-nwfilter-fix-crash-when-counting-number-of-network-filters.patch +++ /dev/null @@ -1,55 +0,0 @@ -From dc6ab8b51ff53ba22abfb84f24641aa87320038a Mon Sep 17 00:00:00 2001 -Message-Id: -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Tue, 8 Mar 2022 17:28:38 +0000 -Subject: [PATCH] nwfilter: fix crash when counting number of network filters -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The virNWFilterObjListNumOfNWFilters method iterates over the -driver->nwfilters, accessing virNWFilterObj instances. As such -it needs to be protected against concurrent modification of -the driver->nwfilters object. - -This API allows unprivileged users to connect, so users with -read-only access to libvirt can cause a denial of service -crash if they are able to race with a call of virNWFilterUndefine. -Since network filters are usually statically defined, this is -considered a low severity problem. - -This is assigned CVE-2022-0897. - -Reviewed-by: Eric Blake -Signed-off-by: Daniel P. Berrangé -(cherry picked from commit a4947e8f63c3e6b7b067b444f3d6cf674c0d7f36) -https://bugzilla.redhat.com/show_bug.cgi?id=2063902 ---- - src/nwfilter/nwfilter_driver.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c -index 200451d6b1..956aca6421 100644 ---- a/src/nwfilter/nwfilter_driver.c -+++ b/src/nwfilter/nwfilter_driver.c -@@ -478,11 +478,15 @@ nwfilterLookupByName(virConnectPtr conn, - static int - nwfilterConnectNumOfNWFilters(virConnectPtr conn) - { -+ int ret; - if (virConnectNumOfNWFiltersEnsureACL(conn) < 0) - return -1; - -- return virNWFilterObjListNumOfNWFilters(driver->nwfilters, conn, -- virConnectNumOfNWFiltersCheckACL); -+ nwfilterDriverLock(); -+ ret = virNWFilterObjListNumOfNWFilters(driver->nwfilters, conn, -+ virConnectNumOfNWFiltersCheckACL); -+ nwfilterDriverUnlock(); -+ return ret; - } - - --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu-Add-qemuDomainSetMaxMemLock-helper.patch b/SOURCES/libvirt-qemu-Add-qemuDomainSetMaxMemLock-helper.patch deleted file mode 100644 index 1bb549c..0000000 --- a/SOURCES/libvirt-qemu-Add-qemuDomainSetMaxMemLock-helper.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 2595c7716b19214b2729b41b86656f96a2cd18bc Mon Sep 17 00:00:00 2001 -Message-Id: <2595c7716b19214b2729b41b86656f96a2cd18bc@dist-git> -From: Jiri Denemark -Date: Wed, 22 Jun 2022 15:21:30 +0200 -Subject: [PATCH] qemu: Add qemuDomainSetMaxMemLock helper -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -qemuDomainAdjustMaxMemLock combined computing the desired limit with -applying it. This patch separates the code to apply a memory locking -limit to a new qemuDomainSetMaxMemLock helper for better reusability. - -Signed-off-by: Jiri Denemark -Reviewed-by: Ján Tomko -(cherry picked from commit dff51c7f5760ded8235076f55d082fe4363f2f78) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_domain.c | 95 ++++++++++++++++++++++++++---------------- - src/qemu/qemu_domain.h | 3 ++ - 2 files changed, 61 insertions(+), 37 deletions(-) - -diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c -index ee7d310903..a81789f194 100644 ---- a/src/qemu/qemu_domain.c -+++ b/src/qemu/qemu_domain.c -@@ -9261,6 +9261,61 @@ qemuDomainGetMemLockLimitBytes(virDomainDef *def, - } - - -+/** -+ * qemuDomainSetMaxMemLock: -+ * @vm: domain -+ * @limit: the desired memory locking limit -+ * @origPtr: where to store (or load from) the original value of the limit -+ * -+ * Set the memory locking limit for @vm unless it's already big enough. If -+ * @origPtr is non-NULL, the original value of the limit will be store there -+ * and can be restored by calling this function with @limit == 0. -+ * -+ * Returns: 0 on success, -1 otherwise. -+ */ -+int -+qemuDomainSetMaxMemLock(virDomainObj *vm, -+ unsigned long long limit, -+ unsigned long long *origPtr) -+{ -+ unsigned long long current = 0; -+ -+ if (virProcessGetMaxMemLock(vm->pid, ¤t) < 0) -+ return -1; -+ -+ if (limit > 0) { -+ VIR_DEBUG("Requested memory lock limit: %llu", limit); -+ /* If the limit is already high enough, we can assume -+ * that some external process is taking care of managing -+ * process limits and we shouldn't do anything ourselves: -+ * we're probably running in a containerized environment -+ * where we don't have enough privilege anyway */ -+ if (current >= limit) { -+ VIR_DEBUG("Current limit %llu is big enough", current); -+ return 0; -+ } -+ -+ /* If this is the first time adjusting the limit, save the current -+ * value so that we can restore it once memory locking is no longer -+ * required */ -+ if (origPtr && *origPtr == 0) -+ *origPtr = current; -+ } else { -+ /* Once memory locking is no longer required, we can restore the -+ * original, usually very low, limit. But only if we actually stored -+ * the original limit before. */ -+ if (!origPtr || *origPtr == 0) -+ return 0; -+ -+ limit = *origPtr; -+ *origPtr = 0; -+ VIR_DEBUG("Resetting memory lock limit back to %llu", limit); -+ } -+ -+ return virProcessSetMaxMemLock(vm->pid, limit); -+} -+ -+ - /** - * qemuDomainAdjustMaxMemLock: - * @vm: domain -@@ -9282,43 +9337,9 @@ int - qemuDomainAdjustMaxMemLock(virDomainObj *vm, - bool forceVFIO) - { -- qemuDomainObjPrivate *priv = vm->privateData; -- unsigned long long currentMemLock = 0; -- unsigned long long desiredMemLock = 0; -- -- desiredMemLock = qemuDomainGetMemLockLimitBytes(vm->def, forceVFIO); -- if (virProcessGetMaxMemLock(vm->pid, ¤tMemLock) < 0) -- return -1; -- -- if (desiredMemLock > 0) { -- if (currentMemLock < desiredMemLock) { -- /* If this is the first time adjusting the limit, save the current -- * value so that we can restore it once memory locking is no longer -- * required */ -- if (priv->originalMemlock == 0) { -- priv->originalMemlock = currentMemLock; -- } -- } else { -- /* If the limit is already high enough, we can assume -- * that some external process is taking care of managing -- * process limits and we shouldn't do anything ourselves: -- * we're probably running in a containerized environment -- * where we don't have enough privilege anyway */ -- desiredMemLock = 0; -- } -- } else { -- /* Once memory locking is no longer required, we can restore the -- * original, usually very low, limit */ -- desiredMemLock = priv->originalMemlock; -- priv->originalMemlock = 0; -- } -- -- if (desiredMemLock > 0 && -- virProcessSetMaxMemLock(vm->pid, desiredMemLock) < 0) { -- return -1; -- } -- -- return 0; -+ return qemuDomainSetMaxMemLock(vm, -+ qemuDomainGetMemLockLimitBytes(vm->def, forceVFIO), -+ &QEMU_DOMAIN_PRIVATE(vm)->originalMemlock); - } - - -diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h -index e9497d20de..6d1d23439a 100644 ---- a/src/qemu/qemu_domain.h -+++ b/src/qemu/qemu_domain.h -@@ -789,6 +789,9 @@ int qemuDomainAdjustMaxMemLock(virDomainObj *vm, - bool forceVFIO); - int qemuDomainAdjustMaxMemLockHostdev(virDomainObj *vm, - virDomainHostdevDef *hostdev); -+int qemuDomainSetMaxMemLock(virDomainObj *vm, -+ unsigned long long limit, -+ unsigned long long *origPtr); - - int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def, - const virDomainMemoryDef *mem); --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu-Ignore-missing-vm.unprivileged_userfaultfd-sysctl.patch b/SOURCES/libvirt-qemu-Ignore-missing-vm.unprivileged_userfaultfd-sysctl.patch deleted file mode 100644 index 0113c82..0000000 --- a/SOURCES/libvirt-qemu-Ignore-missing-vm.unprivileged_userfaultfd-sysctl.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 08fef741d85ecfb3493c47f5f1334f91c30e3233 Mon Sep 17 00:00:00 2001 -Message-Id: <08fef741d85ecfb3493c47f5f1334f91c30e3233@dist-git> -From: Jiri Denemark -Date: Wed, 9 Feb 2022 11:08:42 +0100 -Subject: [PATCH] qemu: Ignore missing vm.unprivileged_userfaultfd sysctl -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Older kernels did not support this sysctl, but they did not restrict -userfaultfd in any way so everything worked as if -vm.unprivileged_userfaultfd was set to 1. Thus we can safely ignore -errors when setting the value. - -Signed-off-by: Jiri Denemark -Reviewed-by: Ján Tomko -(cherry picked from commit 558f00397a0d46ad22bf53a22a40ed6fc4fdb5eb) - -https://bugzilla.redhat.com/show_bug.cgi?id=2148578 - -Signed-off-by: Jiri Denemark ---- - src/qemu/postcopy-migration.sysctl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qemu/postcopy-migration.sysctl b/src/qemu/postcopy-migration.sysctl -index aa8f015ae0..db3f11e49f 100644 ---- a/src/qemu/postcopy-migration.sysctl -+++ b/src/qemu/postcopy-migration.sysctl -@@ -3,4 +3,4 @@ - # privileged processes. - # It can be safely overridden by a file in /etc/sysctl.d/ in case post-copy - # migration is not used on the host. --vm.unprivileged_userfaultfd = 1 -+-vm.unprivileged_userfaultfd = 1 --- -2.39.0 - diff --git a/SOURCES/libvirt-qemu-Make-struct-_qemuMonitorMessage-private.patch b/SOURCES/libvirt-qemu-Make-struct-_qemuMonitorMessage-private.patch deleted file mode 100644 index ffd8ae6..0000000 --- a/SOURCES/libvirt-qemu-Make-struct-_qemuMonitorMessage-private.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 85b7d8295d72214b08f0fff93c473baaa88a569b Mon Sep 17 00:00:00 2001 -Message-Id: <85b7d8295d72214b08f0fff93c473baaa88a569b@dist-git> -From: Peter Krempa -Date: Mon, 14 Feb 2022 15:57:21 +0100 -Subject: [PATCH] qemu: Make 'struct _qemuMonitorMessage' private -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Move the declaration of the struct into 'qemu_monitor_priv.h' as other -code has no business in peeking into the monitor messages. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit f9ae469a6ebb17e0990096e826f049c1c46cd760) -https://bugzilla.redhat.com/show_bug.cgi?id=2170472 ---- - src/qemu/qemu_monitor.h | 14 -------------- - src/qemu/qemu_monitor_json.c | 3 +++ - src/qemu/qemu_monitor_priv.h | 16 ++++++++++++++++ - tests/qemucapsprobemock.c | 3 +++ - 4 files changed, 22 insertions(+), 14 deletions(-) - -diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h -index a4a4edf5a6..d00967d84f 100644 ---- a/src/qemu/qemu_monitor.h -+++ b/src/qemu/qemu_monitor.h -@@ -34,21 +34,7 @@ - #include "virenum.h" - - typedef struct _qemuMonitor qemuMonitor; -- - typedef struct _qemuMonitorMessage qemuMonitorMessage; --struct _qemuMonitorMessage { -- int txFD; -- -- const char *txBuffer; -- int txOffset; -- int txLength; -- -- /* Used by the JSON monitor to hold reply / error */ -- void *rxObject; -- -- /* True if rxObject is ready, or a fatal error occurred on the monitor channel */ -- bool finished; --}; - - typedef enum { - QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_NONE = 0, -diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c -index 34a46b9b41..7d8755246f 100644 ---- a/src/qemu/qemu_monitor_json.c -+++ b/src/qemu/qemu_monitor_json.c -@@ -44,6 +44,9 @@ - # include "libvirt_qemu_probes.h" - #endif - -+#define LIBVIRT_QEMU_MONITOR_PRIV_H_ALLOW -+#include "qemu_monitor_priv.h" -+ - #define VIR_FROM_THIS VIR_FROM_QEMU - - VIR_LOG_INIT("qemu.qemu_monitor_json"); -diff --git a/src/qemu/qemu_monitor_priv.h b/src/qemu/qemu_monitor_priv.h -index 31bb3526b9..6115f830de 100644 ---- a/src/qemu/qemu_monitor_priv.h -+++ b/src/qemu/qemu_monitor_priv.h -@@ -24,5 +24,21 @@ - - #include "qemu_monitor.h" - -+ -+struct _qemuMonitorMessage { -+ int txFD; -+ -+ const char *txBuffer; -+ int txOffset; -+ int txLength; -+ -+ /* Used by the JSON monitor to hold reply / error */ -+ void *rxObject; -+ -+ /* True if rxObject is ready, or a fatal error occurred on the monitor channel */ -+ bool finished; -+}; -+ -+ - void - qemuMonitorResetCommandID(qemuMonitor *mon); -diff --git a/tests/qemucapsprobemock.c b/tests/qemucapsprobemock.c -index 915036d178..2717ed5d84 100644 ---- a/tests/qemucapsprobemock.c -+++ b/tests/qemucapsprobemock.c -@@ -25,6 +25,9 @@ - #include "qemu/qemu_monitor.h" - #include "qemu/qemu_monitor_json.h" - -+#define LIBVIRT_QEMU_MONITOR_PRIV_H_ALLOW -+#include "qemu/qemu_monitor_priv.h" -+ - #define REAL_SYM(realFunc) \ - do { \ - if (!realFunc && !(realFunc = dlsym(RTLD_NEXT, __FUNCTION__))) { \ --- -2.40.1 diff --git a/SOURCES/libvirt-qemu-Validate-domain-definition-even-on-migration.patch b/SOURCES/libvirt-qemu-Validate-domain-definition-even-on-migration.patch deleted file mode 100644 index 33d2f4d..0000000 --- a/SOURCES/libvirt-qemu-Validate-domain-definition-even-on-migration.patch +++ /dev/null @@ -1,72 +0,0 @@ -From fa7cff4e684ededd184976d4fdf217cc155825b8 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Mon, 31 Jan 2022 12:55:47 +0100 -Subject: [PATCH] qemu: Validate domain definition even on migration - -When we are about to spawn QEMU, we validate the domain -definition against qemuCaps. Except when domain is/was already -running before (i.e. on incoming migration, snapshots, resume -from a file). However, especially on incoming migration it may -happen that the destination QEMU is different to the source -QEMU, e.g. the destination QEMU may have some devices disabled. - -And we have a function that validates devices/features requested -in domain XML against the desired QEMU capabilities (aka -qemuCaps) - it's virDomainDefValidate() which calls -qemuValidateDomainDef() and qemuValidateDomainDeviceDef() -subsequently. - -But the problem here is that the validation function is -explicitly skipped over in specific scenarios (like incoming -migration, restore from a snapshot or previously saved file). - -This in turn means that we may spawn QEMU and request -device/features it doesn't support. When that happens QEMU fails -to load migration stream: - - qemu-kvm: ... 'virtio-mem-pci' is not a valid device model name - -(NB, while the example shows one particular device, the problem -is paramount) - -This problem is easier to run into since we are slowly moving -validation from qemu_command.c into said validation functions. - -The solution is simple: do the validation in all cases. And while -it may happen that users would be unable to migrate/restore a -guest due to a bug in our validator, spawning QEMU without -validation is worse (especially when you consider that users can -supply their own XMLs for migrate/restore operations - these were -never validated). - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2048435 -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -(cherry picked from commit 517b8c12b98d7ac0bb4d582e0b491d50d776eb6d) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2050702 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_process.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c -index 5c9ca0fe4f..5c6657a876 100644 ---- a/src/qemu/qemu_process.c -+++ b/src/qemu/qemu_process.c -@@ -5411,11 +5411,7 @@ qemuProcessStartValidate(virQEMUDriver *driver, - - } - -- /* Checks below should not be executed when starting a qemu process for a -- * VM that was running before (migration, snapshots, save). It's more -- * important to start such VM than keep the configuration clean */ -- if ((flags & VIR_QEMU_PROCESS_START_NEW) && -- virDomainDefValidate(vm->def, 0, driver->xmlopt, qemuCaps) < 0) -+ if (virDomainDefValidate(vm->def, 0, driver->xmlopt, qemuCaps) < 0) - return -1; - - if (qemuProcessStartValidateGraphics(vm) < 0) --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch b/SOURCES/libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch deleted file mode 100644 index 0842445..0000000 --- a/SOURCES/libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch +++ /dev/null @@ -1,46 +0,0 @@ -From c57b31305a7fc8c2a4d11e11e7a48c4826160fa2 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Wed, 1 Mar 2023 16:51:42 +0100 -Subject: [PATCH] qemu: agent: Make fetching of 'can-offline' member from - 'guest-query-vcpus' optional - -The 'can-offline' member is optional according to agent's schema and in -fact in certain cases it's not returned. Libvirt then spams the logs -if something is polling the bulk guest stats API. - -Noticed when going through oVirt logs which appears to call the bulk -stats API repeatedly. - -Instead of requiring it we simply reply that the vCPU can't be offlined. - -Signed-off-by: Peter Krempa -Reviewed-by: Laine Stump -(cherry picked from commit 790ea58153b9ef1120a577d1a87a4ca2e988ee5c) -https://bugzilla.redhat.com/show_bug.cgi?id=2174447 ---- - src/qemu/qemu_agent.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c -index db844148a6..09b7340bc8 100644 ---- a/src/qemu/qemu_agent.c -+++ b/src/qemu/qemu_agent.c -@@ -1371,12 +1371,8 @@ qemuAgentGetVCPUs(qemuAgent *agent, - return -1; - } - -- if (virJSONValueObjectGetBoolean(entry, "can-offline", -- &in->offlinable) < 0) { -- virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -- _("'can-offline' missing in reply of guest-get-vcpus")); -- return -1; -- } -+ in->offlinable = false; -+ ignore_value(virJSONValueObjectGetBoolean(entry, "can-offline", &in->offlinable)); - } - - return ndata; --- -2.39.2 - diff --git a/SOURCES/libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch b/SOURCES/libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch deleted file mode 100644 index 920db5c..0000000 --- a/SOURCES/libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 521e9a7731ac678ca790da4b04dabe4369efb984 Mon Sep 17 00:00:00 2001 -Message-Id: <521e9a7731ac678ca790da4b04dabe4369efb984@dist-git> -From: Peter Krempa -Date: Wed, 1 Mar 2023 17:09:42 +0100 -Subject: [PATCH] qemu: domain: Fix logic when tainting domain - -Originally the code was skipping all repeated taints with the same taint -flag but a logic bug introduced in commit 30626ed15b239c424ae inverted -the condition. This caused that actually the first occurence was NOT -logged but any subsequent was. - -This was noticed when going through oVirt logs as they use custom guest -agent commands and the logs are totally spammed with this message. - -Fixes: 30626ed15b239c424ae891f096057a696eadd715 -Signed-off-by: Peter Krempa -Reviewed-by: Laine Stump -(cherry picked from commit 9134b40d0b43a5e1a9928b0a0d948205941d9807) -https://bugzilla.redhat.com/show_bug.cgi?id=2174447 ---- - 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 c24d1e4d53..c70661fc49 100644 ---- a/src/qemu/qemu_domain.c -+++ b/src/qemu/qemu_domain.c -@@ -6369,7 +6369,7 @@ void qemuDomainObjTaintMsg(virQEMUDriver *driver, - const char *extrasuffix = ""; - va_list args; - -- if (virDomainObjTaint(obj, taint)) { -+ if (!virDomainObjTaint(obj, taint)) { - /* If an extra message was given we must always - * emit the taint warning, otherwise it is a - * one-time only warning per VM --- -2.39.2 - diff --git a/SOURCES/libvirt-qemu-fix-inactive-snapshot-revert.patch b/SOURCES/libvirt-qemu-fix-inactive-snapshot-revert.patch deleted file mode 100644 index 3c03910..0000000 --- a/SOURCES/libvirt-qemu-fix-inactive-snapshot-revert.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 94bc9eaf3bbcaec47bd233378bbbb45f5f1523ca Mon Sep 17 00:00:00 2001 -Message-Id: <94bc9eaf3bbcaec47bd233378bbbb45f5f1523ca@dist-git> -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Thu, 20 Jan 2022 14:53:33 +0100 -Subject: [PATCH] qemu: fix inactive snapshot revert -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The commit splitting out the qemuSnapshotRevertInactive function -dropped the 'defined = true' line by accident and instead -returned -1, leaving the user with a cryptic error: -error: An error occurred, but the cause is unknown - -https://bugzilla.redhat.com/show_bug.cgi?id=2039136 -https://gitlab.com/libvirt/libvirt/-/issues/266 - -Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e -Signed-off-by: Ján Tomko -(cherry picked from commit 76deb656132bb8817ddae4b7f417930c4db824c9) - -https://bugzilla.redhat.com/show_bug.cgi?id=2043584 - -Signed-off-by: Ján Tomko ---- - src/qemu/qemu_snapshot.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c -index f92e00f9c0..ac7bab90f8 100644 ---- a/src/qemu/qemu_snapshot.c -+++ b/src/qemu/qemu_snapshot.c -@@ -2193,7 +2193,7 @@ qemuSnapshotRevertInactive(virDomainObj *vm, - - if (*inactiveConfig) { - virDomainObjAssignDef(vm, inactiveConfig, false, NULL); -- return -1; -+ defined = true; - } - - if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | --- -2.35.0 - diff --git a/SOURCES/libvirt-qemu-gpu-Get-pid-without-binary-validation.patch b/SOURCES/libvirt-qemu-gpu-Get-pid-without-binary-validation.patch deleted file mode 100644 index 9b31b4b..0000000 --- a/SOURCES/libvirt-qemu-gpu-Get-pid-without-binary-validation.patch +++ /dev/null @@ -1,67 +0,0 @@ -From c70b1a8d8a4bc34bcbf9ef4bccac678257b8c494 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Vasiliy Ulyanov -Date: Wed, 2 Feb 2022 17:28:17 +0100 -Subject: [PATCH] qemu: gpu: Get pid without binary validation - -The binary validation in virPidFileReadPathIfAlive may fail with EACCES -if the calling process does not have CAP_SYS_PTRACE capability. -Therefore instead do only the check that the pidfile is locked by the -correct process. - -Fixes the same issue as with swtpm. - -Signed-off-by: Vasiliy Ulyanov -Signed-off-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit e3dfa52d260da8a41a0ec35767d08e37c825824a) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152188 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_vhost_user_gpu.c | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/src/qemu/qemu_vhost_user_gpu.c b/src/qemu/qemu_vhost_user_gpu.c -index ef198a4820..f7d444e851 100644 ---- a/src/qemu/qemu_vhost_user_gpu.c -+++ b/src/qemu/qemu_vhost_user_gpu.c -@@ -54,7 +54,6 @@ qemuVhostUserGPUCreatePidFilename(const char *stateDir, - - /* - * qemuVhostUserGPUGetPid: -- * @binpath: path of executable associated with the pidfile - * @stateDir: the directory where vhost-user-gpu writes the pidfile into - * @shortName: short name of the domain - * @alias: video device alias -@@ -65,8 +64,7 @@ qemuVhostUserGPUCreatePidFilename(const char *stateDir, - * set to -1; - */ - static int --qemuVhostUserGPUGetPid(const char *binPath, -- const char *stateDir, -+qemuVhostUserGPUGetPid(const char *stateDir, - const char *shortName, - const char *alias, - pid_t *pid) -@@ -76,7 +74,7 @@ qemuVhostUserGPUGetPid(const char *binPath, - if (!(pidfile = qemuVhostUserGPUCreatePidFilename(stateDir, shortName, alias))) - return -1; - -- if (virPidFileReadPathIfAlive(pidfile, pid, binPath) < 0) -+ if (virPidFileReadPathIfLocked(pidfile, pid) < 0) - return -1; - - return 0; -@@ -253,8 +251,7 @@ qemuExtVhostUserGPUSetupCgroup(virQEMUDriver *driver, - if (!shortname) - return -1; - -- rc = qemuVhostUserGPUGetPid(video->driver->vhost_user_binary, -- cfg->stateDir, shortname, video->info.alias, &pid); -+ rc = qemuVhostUserGPUGetPid(cfg->stateDir, shortname, video->info.alias, &pid); - if (rc < 0 || (rc == 0 && pid == (pid_t)-1)) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Could not get process id of vhost-user-gpu")); --- -2.39.0 - diff --git a/SOURCES/libvirt-qemu-monitor-Drop-old-monitor-fields-from-struct-_qemuMonitorMessage.patch b/SOURCES/libvirt-qemu-monitor-Drop-old-monitor-fields-from-struct-_qemuMonitorMessage.patch deleted file mode 100644 index f436915..0000000 --- a/SOURCES/libvirt-qemu-monitor-Drop-old-monitor-fields-from-struct-_qemuMonitorMessage.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a4d8210ae9fd84740e01b96d28bfb6183f3f3270 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Mon, 14 Feb 2022 16:02:29 +0100 -Subject: [PATCH] qemu: monitor: Drop old monitor fields from 'struct - _qemuMonitorMessage' -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The fields are no longer used since we've deleted support for HMP-only -qemus. The HMP command pass-through works via a QMP command. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit c5eb99a9d9af8683789e99cc904671e343580058) -https://bugzilla.redhat.com/show_bug.cgi?id=2170472 ---- - src/qemu/qemu_monitor.h | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h -index d2037914be..a4a4edf5a6 100644 ---- a/src/qemu/qemu_monitor.h -+++ b/src/qemu/qemu_monitor.h -@@ -43,15 +43,10 @@ struct _qemuMonitorMessage { - int txOffset; - int txLength; - -- /* Used by the text monitor reply / error */ -- char *rxBuffer; -- int rxLength; - /* Used by the JSON monitor to hold reply / error */ - void *rxObject; - -- /* True if rxBuffer / rxObject are ready, or a -- * fatal error occurred on the monitor channel -- */ -+ /* True if rxObject is ready, or a fatal error occurred on the monitor channel */ - bool finished; - }; - --- -2.40.1 diff --git a/SOURCES/libvirt-qemu-monitor-Move-declaration-of-struct-_qemuMonitor-to-qemu_monitor_priv.h.patch b/SOURCES/libvirt-qemu-monitor-Move-declaration-of-struct-_qemuMonitor-to-qemu_monitor_priv.h.patch deleted file mode 100644 index 145de29..0000000 --- a/SOURCES/libvirt-qemu-monitor-Move-declaration-of-struct-_qemuMonitor-to-qemu_monitor_priv.h.patch +++ /dev/null @@ -1,157 +0,0 @@ -From c2ed5aeee7bf365877e0764699f032fb749630b0 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Mon, 14 Feb 2022 16:07:41 +0100 -Subject: [PATCH] qemu: monitor: Move declaration of struct _qemuMonitor to - qemu_monitor_priv.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In order to mock the SCM_RIGHTS sendmsg to simulate sending -filedescriptors to fake qemu in tests we need access to some fields of -'struct _qemuMonitor'. Move its declaration to the private header file. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit 7c35c483eaa78eb847e0865cbb210d5355f75d7a) -https://bugzilla.redhat.com/show_bug.cgi?id=2170472 ---- - src/qemu/qemu_monitor.c | 50 --------------------------------- - src/qemu/qemu_monitor_priv.h | 54 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 54 insertions(+), 50 deletions(-) - -diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c -index 23638d3fe8..bba92592c5 100644 ---- a/src/qemu/qemu_monitor.c -+++ b/src/qemu/qemu_monitor.c -@@ -65,56 +65,6 @@ VIR_LOG_INIT("qemu.qemu_monitor"); - */ - #define QEMU_MONITOR_MAX_RESPONSE (10 * 1024 * 1024) - --struct _qemuMonitor { -- virObjectLockable parent; -- -- virCond notify; -- -- int fd; -- -- GMainContext *context; -- GSocket *socket; -- GSource *watch; -- -- virDomainObj *vm; -- char *domainName; -- -- qemuMonitorCallbacks *cb; -- void *callbackOpaque; -- -- /* If there's a command being processed this will be -- * non-NULL */ -- qemuMonitorMessage *msg; -- -- /* Buffer incoming data ready for Text/QMP monitor -- * code to process & find message boundaries */ -- size_t bufferOffset; -- size_t bufferLength; -- char *buffer; -- -- /* If anything went wrong, this will be fed back -- * the next monitor msg */ -- virError lastError; -- -- /* Set to true when EOF is detected on the monitor */ -- bool goteof; -- -- int nextSerial; -- -- bool waitGreeting; -- -- /* If found, path to the virtio memballoon driver */ -- char *balloonpath; -- bool ballooninit; -- -- /* Log file context of the qemu process to dig for usable info */ -- qemuMonitorReportDomainLogError logFunc; -- void *logOpaque; -- virFreeCallback logDestroy; -- -- /* true if qemu no longer wants 'props' sub-object of object-add */ -- bool objectAddNoWrap; --}; - - /** - * QEMU_CHECK_MONITOR_FULL: -diff --git a/src/qemu/qemu_monitor_priv.h b/src/qemu/qemu_monitor_priv.h -index 6115f830de..606aa79fbd 100644 ---- a/src/qemu/qemu_monitor_priv.h -+++ b/src/qemu/qemu_monitor_priv.h -@@ -24,6 +24,8 @@ - - #include "qemu_monitor.h" - -+#include -+ - - struct _qemuMonitorMessage { - int txFD; -@@ -40,5 +42,57 @@ struct _qemuMonitorMessage { - }; - - -+struct _qemuMonitor { -+ virObjectLockable parent; -+ -+ virCond notify; -+ -+ int fd; -+ -+ GMainContext *context; -+ GSocket *socket; -+ GSource *watch; -+ -+ virDomainObj *vm; -+ char *domainName; -+ -+ qemuMonitorCallbacks *cb; -+ void *callbackOpaque; -+ -+ /* If there's a command being processed this will be -+ * non-NULL */ -+ qemuMonitorMessage *msg; -+ -+ /* Buffer incoming data ready for Text/QMP monitor -+ * code to process & find message boundaries */ -+ size_t bufferOffset; -+ size_t bufferLength; -+ char *buffer; -+ -+ /* If anything went wrong, this will be fed back -+ * the next monitor msg */ -+ virError lastError; -+ -+ /* Set to true when EOF is detected on the monitor */ -+ bool goteof; -+ -+ int nextSerial; -+ -+ bool waitGreeting; -+ -+ /* If found, path to the virtio memballoon driver */ -+ char *balloonpath; -+ bool ballooninit; -+ -+ /* Log file context of the qemu process to dig for usable info */ -+ qemuMonitorReportDomainLogError logFunc; -+ void *logOpaque; -+ virFreeCallback logDestroy; -+ -+ /* true if qemu no longer wants 'props' sub-object of object-add */ -+ bool objectAddNoWrap; -+}; -+ -+ - void - qemuMonitorResetCommandID(qemuMonitor *mon); --- -2.40.1 diff --git a/SOURCES/libvirt-qemu-monitor-Store-whether-query-named-block-nodes-supports-flat-parameter.patch b/SOURCES/libvirt-qemu-monitor-Store-whether-query-named-block-nodes-supports-flat-parameter.patch deleted file mode 100644 index 23ee422..0000000 --- a/SOURCES/libvirt-qemu-monitor-Store-whether-query-named-block-nodes-supports-flat-parameter.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b3ffc8876adf777c7baefb6e467d7552c0a03251 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Wed, 9 Nov 2022 10:53:49 +0100 -Subject: [PATCH] qemu: monitor: Store whether 'query-named-block-nodes' - supports 'flat' parameter -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Rather than having callers always pass this flag store it in the -qemuMonitor object. Following patches will convert the code to use this -internal flag. - -In the future this will also simplify removal when all supported qemu -versions will support the new mode. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit b0e4ad5263c73a926b8246028c76c552b07fca74) -https://bugzilla.redhat.com/show_bug.cgi?id=2170472 ---- - src/qemu/qemu_monitor.c | 4 +++- - src/qemu/qemu_monitor_priv.h | 2 ++ - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c -index bba92592c5..99667fdf2f 100644 ---- a/src/qemu/qemu_monitor.c -+++ b/src/qemu/qemu_monitor.c -@@ -610,8 +610,10 @@ qemuMonitorOpenInternal(virDomainObj *vm, - mon->cb = cb; - mon->callbackOpaque = opaque; - -- if (priv) -+ if (priv) { - mon->objectAddNoWrap = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_JSON); -+ mon->queryNamedBlockNodesFlat = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT); -+ } - - if (virSetCloseExec(mon->fd) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, -diff --git a/src/qemu/qemu_monitor_priv.h b/src/qemu/qemu_monitor_priv.h -index 606aa79fbd..e32928805f 100644 ---- a/src/qemu/qemu_monitor_priv.h -+++ b/src/qemu/qemu_monitor_priv.h -@@ -91,6 +91,8 @@ struct _qemuMonitor { - - /* true if qemu no longer wants 'props' sub-object of object-add */ - bool objectAddNoWrap; -+ /* query-named-block-nodes supports the 'flat' option */ -+ bool queryNamedBlockNodesFlat; - }; - - --- -2.40.1 diff --git a/SOURCES/libvirt-qemu-qemuBlockGetNamedNodeData-Remove-pointless-error-path.patch b/SOURCES/libvirt-qemu-qemuBlockGetNamedNodeData-Remove-pointless-error-path.patch deleted file mode 100644 index ac8b3e2..0000000 --- a/SOURCES/libvirt-qemu-qemuBlockGetNamedNodeData-Remove-pointless-error-path.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 31986239312c0e460800f5b9921f6593f1556015 Mon Sep 17 00:00:00 2001 -Message-Id: <31986239312c0e460800f5b9921f6593f1556015@dist-git> -From: Peter Krempa -Date: Wed, 9 Nov 2022 10:45:27 +0100 -Subject: [PATCH] qemu: qemuBlockGetNamedNodeData: Remove pointless error path -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We don't need automatic freeing for 'blockNamedNodeData' and we can -directly return it rather than checking it for NULL-ness first. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit 3fe74ebd9037d695df906ed137d22a8d8d77e169) - - Conflicts: - src/qemu/qemu_block.c - - - qemuDomainObjEnter/ExitMonitor still needs 'driver' - -https://bugzilla.redhat.com/show_bug.cgi?id=2170472 ---- - src/qemu/qemu_block.c | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c -index aa566d0097..c9229d1918 100644 ---- a/src/qemu/qemu_block.c -+++ b/src/qemu/qemu_block.c -@@ -3020,7 +3020,7 @@ qemuBlockGetNamedNodeData(virDomainObj *vm, - { - qemuDomainObjPrivate *priv = vm->privateData; - virQEMUDriver *driver = priv->driver; -- g_autoptr(GHashTable) blockNamedNodeData = NULL; -+ GHashTable *blockNamedNodeData = NULL; - bool supports_flat = virQEMUCapsGet(priv->qemuCaps, - QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT); - -@@ -3031,10 +3031,7 @@ qemuBlockGetNamedNodeData(virDomainObj *vm, - - qemuDomainObjExitMonitor(driver, vm); - -- if (!blockNamedNodeData) -- return NULL; -- -- return g_steal_pointer(&blockNamedNodeData); -+ return blockNamedNodeData; - } - - --- -2.40.1 diff --git a/SOURCES/libvirt-qemu-relax-shared-memory-check-for-vhostuser-daemons.patch b/SOURCES/libvirt-qemu-relax-shared-memory-check-for-vhostuser-daemons.patch deleted file mode 100644 index ae3ebae..0000000 --- a/SOURCES/libvirt-qemu-relax-shared-memory-check-for-vhostuser-daemons.patch +++ /dev/null @@ -1,65 +0,0 @@ -From e9418cec1ba24b6cf78f85bbbef8586ed612692a Mon Sep 17 00:00:00 2001 -Message-Id: -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Mon, 13 Mar 2023 13:56:47 +0100 -Subject: [PATCH] qemu: relax shared memory check for vhostuser daemons -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -For some vhostuser daemons, we validate that the guest memory is shared -with the host. - -With earlier versions of QEMU, it was only possible to mark memory -as shared by defining an explicit NUMA topology. Later, QEMU exposed -the name of the default memory backend (defaultRAMid) so we can mark -that memory as shared. - -Since libvirt commit: - commit bff2ad5d6b1f25da02802273934d2a519159fec7 - qemu: Relax validation for mem->access if guest has no NUMA -we already check for the case when user requests shared memory, -but QEMU did not expose defaultRAMid. - -Drop the duplicit check from vhostuser device validation, to make -it pass on hotplug even after libvirtd restart. - -This avoids the need to store the defaultRAMid, since we don't really -need it for anything after the VM has been already started. - -https://bugzilla.redhat.com/show_bug.cgi?id=2078693 -https://bugzilla.redhat.com/show_bug.cgi?id=2177701 - -Signed-off-by: Ján Tomko -Reviewed-by: Michal Privoznik -(cherry picked from commit d5c7b7870e45575f81fffcb611c2546d0e02e778) -Signed-off-by: Ján Tomko ---- - src/qemu/qemu_validate.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c -index 7bc14293d6..4069f47c12 100644 ---- a/src/qemu/qemu_validate.c -+++ b/src/qemu/qemu_validate.c -@@ -1588,16 +1588,12 @@ qemuValidateDomainVirtioOptions(const virDomainVirtioOptions *virtio, - static int - qemuValidateDomainDefVhostUserRequireSharedMemory(const virDomainDef *def, - const char *name, -- virQEMUCaps *qemuCaps) -+ virQEMUCaps *qemuCaps G_GNUC_UNUSED) - { -- const char *defaultRAMId = virQEMUCapsGetMachineDefaultRAMid(qemuCaps, -- def->virtType, -- def->os.machine); - size_t numa_nodes = virDomainNumaGetNodeCount(def->numa); - size_t i; - -- if (numa_nodes == 0 && -- !(defaultRAMId && def->mem.access == VIR_DOMAIN_MEMORY_ACCESS_SHARED)) { -+ if (numa_nodes == 0 && def->mem.access != VIR_DOMAIN_MEMORY_ACCESS_SHARED) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' requires shared memory"), name); - return -1; --- -2.40.1 diff --git a/SOURCES/libvirt-qemu-tpm-Get-swtpm-pid-without-binary-validation.patch b/SOURCES/libvirt-qemu-tpm-Get-swtpm-pid-without-binary-validation.patch deleted file mode 100644 index 35c8459..0000000 --- a/SOURCES/libvirt-qemu-tpm-Get-swtpm-pid-without-binary-validation.patch +++ /dev/null @@ -1,219 +0,0 @@ -From e3487aab5319df05c5a06a83e4d3e4a87c1e51a9 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Vasiliy Ulyanov -Date: Wed, 2 Feb 2022 17:28:16 +0100 -Subject: [PATCH] qemu: tpm: Get swtpm pid without binary validation - -Access to /proc/[pid]/exe may be restricted in certain environments (e.g. -in containers) and any attempt to stat(2) or readlink(2) the file will -result in 'permission denied' error if the calling process does not have -CAP_SYS_PTRACE capability. According to proc(5) manpage: - -Permission to dereference or read (readlink(2)) this symbolic link is -governed by a ptrace access mode PTRACE_MODE_READ_FSCREDS check; see -ptrace(2). - -The binary validation in virPidFileReadPathIfAlive may fail with EACCES. -Therefore instead do only the check that the pidfile is locked by the -correct process. To ensure this is always the case the daemonization and -pidfile handling of the swtpm command is now controlled by libvirt. - -Signed-off-by: Vasiliy Ulyanov -Signed-off-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit a9c500d2b50c5c041a1bb6ae9724402cf1cec8fe) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152188 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_tpm.c | 94 ++++++++++++++++++++++++++------------------- - 1 file changed, 54 insertions(+), 40 deletions(-) - -diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c -index 7e7b01768e..9c5d1ffed4 100644 ---- a/src/qemu/qemu_tpm.c -+++ b/src/qemu/qemu_tpm.c -@@ -44,6 +44,7 @@ - #include "qemu_tpm.h" - #include "virtpm.h" - #include "virsecret.h" -+#include "virtime.h" - - #define VIR_FROM_THIS VIR_FROM_NONE - -@@ -258,13 +259,13 @@ qemuTPMEmulatorGetPid(const char *swtpmStateDir, - const char *shortName, - pid_t *pid) - { -- g_autofree char *swtpm = virTPMGetSwtpm(); - g_autofree char *pidfile = qemuTPMEmulatorCreatePidFilename(swtpmStateDir, - shortName); -+ - if (!pidfile) - return -1; - -- if (virPidFileReadPathIfAlive(pidfile, pid, swtpm) < 0) -+ if (virPidFileReadPathIfLocked(pidfile, pid) < 0) - return -1; - - return 0; -@@ -660,9 +661,6 @@ qemuTPMEmulatorReconfigure(const char *storagepath, - * @privileged: whether we are running in privileged mode - * @swtpm_user: The uid for the swtpm to run as (drop privileges to from root) - * @swtpm_group: The gid for the swtpm to run as -- * @swtpmStateDir: the directory where swtpm writes the pid file and creates the -- * Unix socket -- * @shortName: the short name of the VM - * @incomingMigration: whether we have an incoming migration - * - * Create the virCommand use for starting the emulator -@@ -676,13 +674,10 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, - bool privileged, - uid_t swtpm_user, - gid_t swtpm_group, -- const char *swtpmStateDir, -- const char *shortName, - bool incomingMigration) - { - g_autoptr(virCommand) cmd = NULL; - bool created = false; -- g_autofree char *pidfile = NULL; - g_autofree char *swtpm = virTPMGetSwtpm(); - int pwdfile_fd = -1; - int migpwdfile_fd = -1; -@@ -721,7 +716,7 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, - - virCommandClearCaps(cmd); - -- virCommandAddArgList(cmd, "socket", "--daemon", "--ctrl", NULL); -+ virCommandAddArgList(cmd, "socket", "--ctrl", NULL); - virCommandAddArgFormat(cmd, "type=unixio,path=%s,mode=0600", - tpm->data.emulator.source->data.nix.path); - -@@ -748,12 +743,6 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, - break; - } - -- if (!(pidfile = qemuTPMEmulatorCreatePidFilename(swtpmStateDir, shortName))) -- goto error; -- -- virCommandAddArg(cmd, "--pid"); -- virCommandAddArgFormat(cmd, "file=%s", pidfile); -- - if (tpm->data.emulator.hassecretuuid) { - if (!virTPMSwtpmCapsGet(VIR_TPM_SWTPM_FEATURE_CMDARG_PWD_FD)) { - virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, -@@ -904,12 +893,14 @@ qemuExtTPMStartEmulator(virQEMUDriver *driver, - bool incomingMigration) - { - g_autoptr(virCommand) cmd = NULL; -- int exitstatus = 0; -- g_autofree char *errbuf = NULL; -+ VIR_AUTOCLOSE errfd = -1; - g_autoptr(virQEMUDriverConfig) cfg = NULL; - g_autofree char *shortName = virDomainDefGetShortName(vm->def); -- int cmdret = 0, timeout, rc; -- pid_t pid; -+ g_autofree char *pidfile = NULL; -+ virTimeBackOffVar timebackoff; -+ const unsigned long long timeout = 1000; /* ms */ -+ int cmdret = 0; -+ pid_t pid = -1; - - if (!shortName) - return -1; -@@ -923,48 +914,71 @@ qemuExtTPMStartEmulator(virQEMUDriver *driver, - driver->privileged, - cfg->swtpm_user, - cfg->swtpm_group, -- cfg->swtpmStateDir, shortName, - incomingMigration))) - return -1; - - if (qemuExtDeviceLogCommand(driver, vm, cmd, "TPM Emulator") < 0) - return -1; - -- virCommandSetErrorBuffer(cmd, &errbuf); -+ if (!(pidfile = qemuTPMEmulatorCreatePidFilename(cfg->swtpmStateDir, shortName))) -+ return -1; -+ -+ virCommandDaemonize(cmd); -+ virCommandSetPidFile(cmd, pidfile); -+ virCommandSetErrorFD(cmd, &errfd); - - if (qemuSecurityStartTPMEmulator(driver, vm, cmd, - cfg->swtpm_user, cfg->swtpm_group, -- &exitstatus, &cmdret) < 0) -+ NULL, &cmdret) < 0) - return -1; - -- if (cmdret < 0 || exitstatus != 0) { -- virReportError(VIR_ERR_INTERNAL_ERROR, -- _("Could not start 'swtpm'. exitstatus: %d, " -- "error: %s"), exitstatus, errbuf); -- return -1; -+ if (cmdret < 0) { -+ /* virCommandRun() hidden in qemuSecurityStartTPMEmulator() -+ * already reported error. */ -+ goto error; - } - -- /* check that the swtpm has written its pid into the file */ -- timeout = 1000; /* ms */ -- while (timeout > 0) { -- rc = qemuTPMEmulatorGetPid(cfg->swtpmStateDir, shortName, &pid); -- if (rc < 0) { -- timeout -= 50; -- g_usleep(50 * 1000); -+ if (virPidFileReadPath(pidfile, &pid) < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -+ _("swtpm didn't show up")); -+ goto error; -+ } -+ -+ if (virTimeBackOffStart(&timebackoff, 1, timeout) < 0) -+ goto error; -+ while (virTimeBackOffWait(&timebackoff)) { -+ char errbuf[1024] = { 0 }; -+ -+ if (virFileExists(tpm->data.emulator.source->data.nix.path)) -+ break; -+ -+ if (virProcessKill(pid, 0) == 0) - continue; -+ -+ if (saferead(errfd, errbuf, sizeof(errbuf) - 1) < 0) { -+ virReportSystemError(errno, "%s", -+ _("swtpm died unexpectedly")); -+ } else { -+ virReportError(VIR_ERR_OPERATION_FAILED, -+ _("swtpm died and reported: %s"), errbuf); - } -- if (rc == 0 && pid == (pid_t)-1) -- goto error; -- break; -+ goto error; - } -- if (timeout <= 0) -+ -+ if (!virFileExists(tpm->data.emulator.source->data.nix.path)) { -+ virReportError(VIR_ERR_OPERATION_TIMEOUT, "%s", -+ _("swtpm socket did not show up")); - goto error; -+ } - - return 0; - - error: -- virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -- _("swtpm failed to start")); -+ virCommandAbort(cmd); -+ if (pid >= 0) -+ virProcessKillPainfully(pid, true); -+ if (pidfile) -+ unlink(pidfile); - return -1; - } - --- -2.39.0 - diff --git a/SOURCES/libvirt-qemu-virtiofs-format-thread-pool-size.patch b/SOURCES/libvirt-qemu-virtiofs-format-thread-pool-size.patch deleted file mode 100644 index afda4b8..0000000 --- a/SOURCES/libvirt-qemu-virtiofs-format-thread-pool-size.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 44f83782ba882f9eb037a54fb75231c305d98712 Mon Sep 17 00:00:00 2001 -Message-Id: <44f83782ba882f9eb037a54fb75231c305d98712@dist-git> -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Fri, 10 Jun 2022 15:25:00 +0200 -Subject: [PATCH] qemu: virtiofs: format --thread-pool-size -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -https://bugzilla.redhat.com/show_bug.cgi?id=2079582 - -Signed-off-by: Ján Tomko -Reviewed-by: Michal Privoznik -(cherry picked from commit 2753eba20ce76d3d8785b23a6e940574ca12fe3c) -Signed-off-by: Ján Tomko ---- - src/qemu/qemu_virtiofs.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c -index 1b853a5a59..1ee3781286 100644 ---- a/src/qemu/qemu_virtiofs.c -+++ b/src/qemu/qemu_virtiofs.c -@@ -163,6 +163,10 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg, - virBufferAddLit(&opts, ",no_posix_lock"); - - virCommandAddArgBuffer(cmd, &opts); -+ -+ if (fs->thread_pool_size >= 0) -+ virCommandAddArgFormat(cmd, "--thread-pool-size=%i", fs->thread_pool_size); -+ - if (cfg->virtiofsdDebug) - virCommandAddArg(cmd, "-d"); - --- -2.35.1 - diff --git a/SOURCES/libvirt-qemuAgentGetDisks-Don-t-use-virJSONValueObjectGetStringArray-for-optional-data.patch b/SOURCES/libvirt-qemuAgentGetDisks-Don-t-use-virJSONValueObjectGetStringArray-for-optional-data.patch deleted file mode 100644 index 2ed40d8..0000000 --- a/SOURCES/libvirt-qemuAgentGetDisks-Don-t-use-virJSONValueObjectGetStringArray-for-optional-data.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 1ad707f19e570b76c1f6517194d9cc86b084014d Mon Sep 17 00:00:00 2001 -Message-Id: <1ad707f19e570b76c1f6517194d9cc86b084014d@dist-git> -From: Peter Krempa -Date: Thu, 1 Dec 2022 17:02:42 +0100 -Subject: [PATCH] qemuAgentGetDisks: Don't use virJSONValueObjectGetStringArray - for optional data - -The 'dependencies' field in the return data may be missing in some -cases. Historically 'virJSONValueObjectGetStringArray' didn't report -error in such case, but later refactor (commit 043b50b948ef3c2 ) added -an error in order to use it in other places too. - -Unfortunately this results in the error log being spammed with an -irrelevant error in case when qemuAgentGetDisks is invoked on a VM -running windows. - -Replace the use of virJSONValueObjectGetStringArray by fetching the -array first and calling virJSONValueArrayToStringList only when we have -an array. - -Fixes: 043b50b948ef3c2a4adf5fa32a93ec2589851ac6 -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2149752 -Signed-off-by: Peter Krempa -Reviewed-by: Michal Privoznik -(cherry picked from commit 3b576601dfb924bb518870a01de5d1a421cbb467) ---- - src/qemu/qemu_agent.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c -index f33cd47078..8a55044c9e 100644 ---- a/src/qemu/qemu_agent.c -+++ b/src/qemu/qemu_agent.c -@@ -2550,6 +2550,7 @@ int qemuAgentGetDisks(qemuAgent *agent, - for (i = 0; i < ndata; i++) { - virJSONValue *addr; - virJSONValue *entry = virJSONValueArrayGet(data, i); -+ virJSONValue *dependencies; - qemuAgentDiskInfo *disk; - - if (!entry) { -@@ -2575,7 +2576,11 @@ int qemuAgentGetDisks(qemuAgent *agent, - goto error; - } - -- disk->dependencies = virJSONValueObjectGetStringArray(entry, "dependencies"); -+ if ((dependencies = virJSONValueObjectGetArray(entry, "dependencies"))) { -+ if (!(disk->dependencies = virJSONValueArrayToStringList(dependencies))) -+ goto error; -+ } -+ - disk->alias = g_strdup(virJSONValueObjectGetString(entry, "alias")); - addr = virJSONValueObjectGetObject(entry, "address"); - if (addr) { --- -2.39.0 - diff --git a/SOURCES/libvirt-qemuDomainSetupDisk-Initialize-targetPaths.patch b/SOURCES/libvirt-qemuDomainSetupDisk-Initialize-targetPaths.patch deleted file mode 100644 index c57e027..0000000 --- a/SOURCES/libvirt-qemuDomainSetupDisk-Initialize-targetPaths.patch +++ /dev/null @@ -1,41 +0,0 @@ -From ab4488be3282dd5d0b9582e6a5d1dafbe7b90489 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Tue, 25 Jan 2022 17:49:00 +0100 -Subject: [PATCH] qemuDomainSetupDisk: Initialize 'targetPaths' - -Compiler isn't able to see that 'virDevMapperGetTargets' in cases e.g. -when the devmapper isn't available may not initialize the value in the -pointer passed as the second argument. - -The usage 'qemuDomainSetupDisk' lead to an accidental infinite loop as -previous calls apparently doctored the stack to a point where -'g_slist_concat' would end up in an infinite loop trying to find the end -of the list. - -Fixes: 6c49c2ee9fcb88de02cdc333f666a8e95d60a3b0 -Closes: https://gitlab.com/libvirt/libvirt/-/issues/268 -Signed-off-by: Peter Krempa -Reviewed-by: Andrea Bolognani -(cherry picked from commit ddb2384f0c78a91c40d95afdbc7fe325e95ef2bc) -https://bugzilla.redhat.com/show_bug.cgi?id=2046172 ---- - src/qemu/qemu_namespace.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c -index 23b1160c5e..94453033f5 100644 ---- a/src/qemu/qemu_namespace.c -+++ b/src/qemu/qemu_namespace.c -@@ -251,7 +251,7 @@ qemuDomainSetupDisk(virStorageSource *src, - if (!(tmpPath = virPCIDeviceAddressGetIOMMUGroupDev(&next->nvme->pciAddr))) - return -1; - } else { -- GSList *targetPaths; -+ GSList *targetPaths = NULL; - - if (virStorageSourceIsEmpty(next) || - !virStorageSourceIsLocalStorage(next)) { --- -2.35.1 - diff --git a/SOURCES/libvirt-qemuMonitorJSONBlockStatsUpdateCapacityBlockdev-Use-flat-mode-of-query-named-block-nodes.patch b/SOURCES/libvirt-qemuMonitorJSONBlockStatsUpdateCapacityBlockdev-Use-flat-mode-of-query-named-block-nodes.patch deleted file mode 100644 index a143d04..0000000 --- a/SOURCES/libvirt-qemuMonitorJSONBlockStatsUpdateCapacityBlockdev-Use-flat-mode-of-query-named-block-nodes.patch +++ /dev/null @@ -1,41 +0,0 @@ -From f20062e1fe1e7bca8b97d2383f9e8a06f0f4111a Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Wed, 9 Nov 2022 11:06:25 +0100 -Subject: [PATCH] qemuMonitorJSONBlockStatsUpdateCapacityBlockdev: Use 'flat' - mode of query-named-block-nodes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -'query-named-block-nodes' in non-flat mode returns redundantly nested -data under the 'backing-image' field. Fortunately we don't need it when -updating the capacity stats. - -This function was unfortunately not fixed originally when the support -for flat mode was added. Use the flat cached in the monitor object to -force flat mode if available. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit bbd4d4899391b3bd1906cce61a3634f42f4b1bdf) -https://bugzilla.redhat.com/show_bug.cgi?id=2170472 ---- - src/qemu/qemu_monitor_json.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c -index 7d8755246f..789554e225 100644 ---- a/src/qemu/qemu_monitor_json.c -+++ b/src/qemu/qemu_monitor_json.c -@@ -2679,7 +2679,7 @@ qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - { - g_autoptr(virJSONValue) nodes = NULL; - -- if (!(nodes = qemuMonitorJSONQueryNamedBlockNodes(mon, false))) -+ if (!(nodes = qemuMonitorJSONQueryNamedBlockNodes(mon, mon->queryNamedBlockNodesFlat))) - return -1; - - if (virJSONValueArrayForeachSteal(nodes, --- -2.40.1 diff --git a/SOURCES/libvirt-qemuProcessReconnect-Don-t-build-memory-paths.patch b/SOURCES/libvirt-qemuProcessReconnect-Don-t-build-memory-paths.patch deleted file mode 100644 index 8185b76..0000000 --- a/SOURCES/libvirt-qemuProcessReconnect-Don-t-build-memory-paths.patch +++ /dev/null @@ -1,57 +0,0 @@ -From c5c8bb4aafc8f247e6da146a6683174038611600 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Wed, 28 Sep 2022 10:12:36 +0200 -Subject: [PATCH] qemuProcessReconnect: Don't build memory paths -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Let me take you on a short trip to history. A long time ago, -libvirt would configure all QEMUs to use $hugetlbfs/libvirt/qemu -for their hugepages setup. This was problematic, because it did -not allow enough separation between guests. Therefore in -v3.0.0-rc1~367 the path changed to a per-domain basis: - - $hugetlbfs/libvirt/qemu/$domainShortName - -And to help with migration on daemon restart a call to -qemuProcessBuildDestroyMemoryPaths() was added to -qemuProcessReconnect() (well, it was named -qemuProcessBuildDestroyHugepagesPath() back then, see -v3.10.0-rc1~174). This was desirable then, because the memory -hotplug code did not call the function, it simply assumes -per-domain paths to exist. But this changed in v3.5.0-rc1~92 -after which the per-domain paths are created on memory hotplug -too. - -Therefore, it's no longer necessary to create these paths in -qemuProcessReconnect(). They are created exactly when needed -(domain startup and memory hotplug). - -Signed-off-by: Michal Privoznik -Reviewed-by: Ján Tomko -(cherry picked from commit 3478cca80ea7382cfdbff836d5d0b92aa014297b) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_process.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c -index 1164340aa9..0fb665bc82 100644 ---- a/src/qemu/qemu_process.c -+++ b/src/qemu/qemu_process.c -@@ -8869,9 +8869,6 @@ qemuProcessReconnect(void *opaque) - goto cleanup; - } - -- if (qemuProcessBuildDestroyMemoryPaths(driver, obj, NULL, true) < 0) -- goto error; -- - if ((qemuDomainAssignAddresses(obj->def, priv->qemuCaps, - driver, obj, false)) < 0) { - goto error; --- -2.38.0 - diff --git a/SOURCES/libvirt-qemu_capabilities-Detect-memory-backend-.prealloc-threads-property.patch b/SOURCES/libvirt-qemu_capabilities-Detect-memory-backend-.prealloc-threads-property.patch deleted file mode 100644 index 4916fd9..0000000 --- a/SOURCES/libvirt-qemu_capabilities-Detect-memory-backend-.prealloc-threads-property.patch +++ /dev/null @@ -1,314 +0,0 @@ -From c387e7680c07d7dbb934dbe972e99ab78cebad28 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Mon, 21 Mar 2022 16:55:05 +0100 -Subject: [PATCH] qemu_capabilities: Detect memory-backend-*.prealloc-threads - property - -The prealloc-threads is property of memory-backend class which is -parent to the other three classes memory-backend-{ram,file,memfd}. -Therefore the property is present for all, or none if QEMU is -older than v5.0.0-rc0~75^2~1^2~3 which introduced the property. - -Anyway, the .reserve property is the same story, and we chose -memory-backend-file to detect it, so stick with our earlier -decision and use the same backend to detect this new property. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit a30dac15dcdb7a6c7a3e9b6cfc5cd77bae185081) - -Conflicts: -src/qemu/qemu_capabilities.c: Context -src/qemu/qemu_capabilities.h -tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml -tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml -tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml -tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml -tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml -tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml -tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml -tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml -tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml -tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml -tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml -tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml -tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml -tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2067126 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_capabilities.c | 2 ++ - src/qemu/qemu_capabilities.h | 1 + - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 + - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 + - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 + - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 + - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 + - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 + - tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 + - 20 files changed, 21 insertions(+) - -diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c -index 8ae80ef8d7..c4f7db55c8 100644 ---- a/src/qemu/qemu_capabilities.c -+++ b/src/qemu/qemu_capabilities.c -@@ -657,6 +657,7 @@ VIR_ENUM_IMPL(virQEMUCaps, - - /* 420 */ - "blockdev-reopen.__com.redhat_rhel-av-8_2_0-api", /* QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API */ -+ "memory-backend-file.prealloc-threads", /* QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS */ - ); - - -@@ -1713,6 +1714,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = - * released qemu versions. */ - { "x-use-canonical-path-for-ramblock-id", QEMU_CAPS_X_USE_CANONICAL_PATH_FOR_RAMBLOCK_ID }, - { "reserve", QEMU_CAPS_MEMORY_BACKEND_RESERVE }, -+ { "prealloc-threads", QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS }, - }; - - static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[] = { -diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h -index cde6c18b4c..8e65635e0d 100644 ---- a/src/qemu/qemu_capabilities.h -+++ b/src/qemu/qemu_capabilities.h -@@ -636,6 +636,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ - - /* 420 */ - QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API, /* downstream support for blockdev reopen in rhel-av-8.2.0 */ -+ QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS, /* -object memory-backend-*.prealloc-threads */ - - QEMU_CAPS_LAST /* this must always be the last item */ - } virQEMUCapsFlags; -diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml -index bb6a7d5ee7..3b18f160db 100644 ---- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml -@@ -179,6 +179,7 @@ - - - -+ - 5000000 - 0 - 61700241 -diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml -index f8317c1117..c90f2be296 100644 ---- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml -@@ -187,6 +187,7 @@ - - - -+ - 5000000 - 0 - 42900241 -diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml -index 58c7eb6651..8fbe8f114f 100644 ---- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml -@@ -171,6 +171,7 @@ - - - -+ - 5000000 - 0 - 0 -diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml -index 69f49020e7..b76c4346a4 100644 ---- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml -@@ -221,6 +221,7 @@ - - - -+ - 5000000 - 0 - 43100241 -diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml -index 58af90b29f..7de7c291f5 100644 ---- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml -+++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml -@@ -90,6 +90,7 @@ - - - -+ - 5001000 - 0 - 0 -diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml -index 578e16e8b0..9b5cb3cd7a 100644 ---- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml -@@ -224,6 +224,7 @@ - - - -+ - 5001000 - 0 - 43100242 -diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml -index b943eaedaf..020c04c1c4 100644 ---- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml -@@ -184,6 +184,7 @@ - - - -+ - 5002000 - 0 - 61700243 -diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml -index ec64e1cacf..5346b1552c 100644 ---- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml -@@ -190,6 +190,7 @@ - - - -+ - 5002000 - 0 - 42900243 -diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml -index a11d15f91a..9f6974f85d 100644 ---- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml -@@ -174,6 +174,7 @@ - - - -+ - 5002000 - 0 - 0 -diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml -index 552e1d43c9..44753b64c3 100644 ---- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml -+++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml -@@ -141,6 +141,7 @@ - - - -+ - 5002000 - 0 - 39100243 -diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml -index bcc262551a..db11c99739 100644 ---- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml -+++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml -@@ -227,6 +227,7 @@ - - - -+ - 5002000 - 0 - 43100243 -diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml -index 0fefe64537..5f9a97df43 100644 ---- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml -+++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml -@@ -192,6 +192,7 @@ - - - -+ - 6000000 - 0 - 61700242 -diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml -index 61685066b8..46bd1d3d2d 100644 ---- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml -+++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml -@@ -149,6 +149,7 @@ - - - -+ - 6000000 - 0 - 39100242 -diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml -index 0d6763e9a3..99bbb6e237 100644 ---- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml -+++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml -@@ -236,6 +236,7 @@ - - - -+ - 6000000 - 0 - 43100242 -diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml -index 228f397c67..ff0715e605 100644 ---- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml -+++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml -@@ -240,6 +240,7 @@ - - - -+ - 6001000 - 0 - 43100243 -diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml -index 6bf9933bc5..dd6f0e6919 100644 ---- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml -+++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml -@@ -203,6 +203,7 @@ - - - -+ - 6001050 - 0 - 61700244 -diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml -index 06cd7fb396..2646cdf88f 100644 ---- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml -+++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml -@@ -199,6 +199,7 @@ - - - -+ - 6001050 - 0 - 42900244 -diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml -index 75aaeed03c..f25ec1b84a 100644 ---- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml -+++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml -@@ -241,6 +241,7 @@ - - - -+ - 6002000 - 0 - 43100244 --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu_command-Generate-memory-only-after-controllers.patch b/SOURCES/libvirt-qemu_command-Generate-memory-only-after-controllers.patch deleted file mode 100644 index 492113e..0000000 --- a/SOURCES/libvirt-qemu_command-Generate-memory-only-after-controllers.patch +++ /dev/null @@ -1,663 +0,0 @@ -From e4e8b74f2cf090c8b29efcd3ceac4e4c4d07b929 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Thu, 27 Jan 2022 11:13:53 +0100 -Subject: [PATCH] qemu_command: Generate memory only after controllers - -Currently, memory device (def->mems) part of cmd line is -generated before any controller. In majority of cases it doesn't -matter because neither of memory devices live on a bus that's -created by an exposed controller (e.g. there's no DIMM -controller, at least not exposed). Except for virtio-mem and -virtio-pmem, which do have a PCI address. And if it so happens -that the device goes onto non-default bus (pci.0) starting such -guest fails, because the controller that creates the desired bus -wasn't processed yet. QEMU processes arguments in order. - -For instance, if virtio-mem has address with bus='0x01' QEMU -refuses to start with the following message: - - Bus 'pci.1' not found - -Similarly for virtio-pmem. I've successfully tested migration and -changing the order does not affect migration stream. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2047271 -Signed-off-by: Michal Privoznik -Reviewed-by: Andrea Bolognani -(cherry picked from commit af23241cfed712f69450e82135d7c7b4899736de) - -Conflicts: -tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args: -tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args: -tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args: - These happened because downstream we don't use JSON for -device, - but upstream we do (as of 1a691fe1c84090da80a652c4c80ac00a6134a69b). - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2050697 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_command.c | 6 +++--- - tests/qemuxml2argvdata/hugepages-memaccess.args | 4 ++-- - tests/qemuxml2argvdata/hugepages-memaccess2.args | 4 ++-- - tests/qemuxml2argvdata/hugepages-numa-default-dimm.args | 4 ++-- - .../qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args | 4 ++-- - .../qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args | 4 ++-- - tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args | 8 ++++---- - tests/qemuxml2argvdata/memory-hotplug-dimm.args | 8 ++++---- - .../memory-hotplug-nvdimm-access.x86_64-latest.args | 4 ++-- - .../memory-hotplug-nvdimm-align.x86_64-5.2.0.args | 4 ++-- - .../memory-hotplug-nvdimm-align.x86_64-latest.args | 4 ++-- - .../memory-hotplug-nvdimm-label.x86_64-5.2.0.args | 4 ++-- - .../memory-hotplug-nvdimm-label.x86_64-latest.args | 4 ++-- - .../memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args | 4 ++-- - .../memory-hotplug-nvdimm-pmem.x86_64-latest.args | 4 ++-- - .../memory-hotplug-nvdimm-ppc64-abi-update.args | 4 ++-- - tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args | 4 ++-- - .../memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args | 4 ++-- - .../memory-hotplug-nvdimm-readonly.x86_64-latest.args | 4 ++-- - .../memory-hotplug-nvdimm.x86_64-latest.args | 4 ++-- - .../memory-hotplug-ppc64-nonuma-abi-update.args | 8 ++++---- - tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args | 8 ++++---- - .../memory-hotplug-virtio-mem.x86_64-latest.args | 8 ++++---- - .../memory-hotplug-virtio-pmem.x86_64-5.2.0.args | 4 ++-- - .../memory-hotplug-virtio-pmem.x86_64-latest.args | 4 ++-- - tests/qemuxml2argvdata/pages-dimm-discard.args | 8 ++++---- - 26 files changed, 65 insertions(+), 65 deletions(-) - -diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c -index 6b4647a711..2acdcca2ff 100644 ---- a/src/qemu/qemu_command.c -+++ b/src/qemu/qemu_command.c -@@ -10565,9 +10565,6 @@ qemuBuildCommandLine(virQEMUDriver *driver, - qemuBuildNumaCommandLine(cfg, def, cmd, priv) < 0) - return NULL; - -- if (qemuBuildMemoryDeviceCommandLine(cmd, cfg, def, priv) < 0) -- return NULL; -- - virUUIDFormat(def->uuid, uuid); - virCommandAddArgList(cmd, "-uuid", uuid, NULL); - -@@ -10617,6 +10614,9 @@ qemuBuildCommandLine(virQEMUDriver *driver, - if (qemuBuildControllersCommandLine(cmd, def, qemuCaps) < 0) - return NULL; - -+ if (qemuBuildMemoryDeviceCommandLine(cmd, cfg, def, priv) < 0) -+ return NULL; -+ - if (qemuBuildHubCommandLine(cmd, def, qemuCaps) < 0) - return NULL; - -diff --git a/tests/qemuxml2argvdata/hugepages-memaccess.args b/tests/qemuxml2argvdata/hugepages-memaccess.args -index b89f791697..a369c7f6da 100644 ---- a/tests/qemuxml2argvdata/hugepages-memaccess.args -+++ b/tests/qemuxml2argvdata/hugepages-memaccess.args -@@ -24,8 +24,6 @@ QEMU_AUDIO_DRV=none \ - -numa node,nodeid=2,cpus=2,memdev=ram-node2 \ - -object memory-backend-file,id=ram-node3,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,share=off,prealloc=on,size=1073741824,host-nodes=3,policy=bind \ - -numa node,nodeid=3,cpus=3,memdev=ram-node3 \ ---object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \ ---device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -37,6 +35,8 @@ QEMU_AUDIO_DRV=none \ - -no-acpi \ - -boot strict=on \ - -usb \ -+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \ -+-device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ - -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ - -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ - -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -diff --git a/tests/qemuxml2argvdata/hugepages-memaccess2.args b/tests/qemuxml2argvdata/hugepages-memaccess2.args -index 0c296797e9..434ebdaa62 100644 ---- a/tests/qemuxml2argvdata/hugepages-memaccess2.args -+++ b/tests/qemuxml2argvdata/hugepages-memaccess2.args -@@ -24,8 +24,6 @@ QEMU_AUDIO_DRV=none \ - -numa node,nodeid=2,cpus=2,memdev=ram-node2 \ - -object memory-backend-file,id=ram-node3,mem-path=/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node3,share=off,size=1073741824,host-nodes=3,policy=bind \ - -numa node,nodeid=3,cpus=3,memdev=ram-node3 \ ---object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \ ---device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -37,6 +35,8 @@ QEMU_AUDIO_DRV=none \ - -no-acpi \ - -boot strict=on \ - -usb \ -+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \ -+-device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ - -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ - -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ - -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args -index f560cabf8e..57bb70346d 100644 ---- a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args -+++ b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args -@@ -19,8 +19,6 @@ QEMU_AUDIO_DRV=none \ - -mem-prealloc \ - -mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \ - -numa node,nodeid=0,cpus=0-1,mem=1024 \ ---object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,host-nodes=1-3,policy=bind \ ---device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ - -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ - -display none \ - -no-user-config \ -@@ -32,4 +30,6 @@ QEMU_AUDIO_DRV=none \ - -no-acpi \ - -boot strict=on \ - -usb \ -+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,host-nodes=1-3,policy=bind \ -+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ - -msg timestamp=on -diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args -index 8b5665f86e..7d9dcfb4df 100644 ---- a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":1073741824}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912}' \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912}' \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -audiodev '{"id":"audio1","driver":"none"}' \ - -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ - -msg timestamp=on -diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args -index 8a40e2d79c..04a320d469 100644 ---- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \ - -smp 8,sockets=1,dies=1,cores=8,threads=1 \ - -object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"size":15032385536,"host-nodes":[3],"policy":"preferred"}' \ - -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -audiodev '{"id":"audio1","driver":"none"}' \ - -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ - -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args -index 907072d55d..b36117f1e8 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args -@@ -17,10 +17,6 @@ QEMU_AUDIO_DRV=none \ - -realtime mlock=off \ - -smp 2,sockets=2,cores=1,threads=1 \ - -numa node,nodeid=0,cpus=0-1,mem=214 \ ---object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \ ---device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ ---object memory-backend-ram,id=memdimm2,size=536870912 \ ---device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -32,6 +28,10 @@ QEMU_AUDIO_DRV=none \ - -no-acpi \ - -boot strict=on \ - -usb \ -+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \ -+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ -+-object memory-backend-ram,id=memdimm2,size=536870912 \ -+-device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2 \ - -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ - -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ - -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-dimm.args b/tests/qemuxml2argvdata/memory-hotplug-dimm.args -index 5d87f4a3ef..72c2803c5e 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-dimm.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm.args -@@ -17,10 +17,6 @@ QEMU_AUDIO_DRV=none \ - -realtime mlock=off \ - -smp 2,sockets=2,cores=1,threads=1 \ - -numa node,nodeid=0,cpus=0-1,mem=214 \ ---object memory-backend-ram,id=memdimm0,size=536870912 \ ---device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ ---object memory-backend-file,id=memdimm1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \ ---device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -32,6 +28,10 @@ QEMU_AUDIO_DRV=none \ - -no-acpi \ - -boot strict=on \ - -usb \ -+-object memory-backend-ram,id=memdimm0,size=536870912 \ -+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ -+-object memory-backend-file,id=memdimm1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \ -+-device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ - -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ - -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ - -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args -index 3664150c51..94aeadabce 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args -index 6c28c86004..0b29a6fded 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object memory-backend-ram,id=ram-node0,size=224395264 \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912,align=2097152 \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912,align=2097152 \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args -index aa77849079..5045cc8318 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912,"align":2097152}' \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912,"align":2097152}' \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args -index c45b401af5..7c67161b78 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object memory-backend-ram,id=ram-node0,size=224395264 \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \ ---device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \ -+-device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args -index 07863ba87c..9466877699 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ ---device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ -+-device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args -index 3f35d4dca2..c4dae0cfd1 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object memory-backend-ram,id=ram-node0,size=224395264 \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,size=536870912,pmem=on \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,size=536870912,pmem=on \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args -index 4ed86feb01..9324535ac3 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"size":536870912,"pmem":true}' \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"size":536870912,"pmem":true}' \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args -index ebdb0429d0..55b16c9dc2 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args -@@ -17,8 +17,6 @@ QEMU_AUDIO_DRV=none \ - -realtime mlock=off \ - -smp 2,sockets=2,cores=1,threads=1 \ - -numa node,nodeid=0,cpus=0-1,mem=1024 \ ---object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \ ---device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -28,4 +26,6 @@ QEMU_AUDIO_DRV=none \ - -rtc base=utc \ - -no-shutdown \ - -boot strict=on \ -+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \ -+-device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -msg timestamp=on -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args -index ebdb0429d0..55b16c9dc2 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args -@@ -17,8 +17,6 @@ QEMU_AUDIO_DRV=none \ - -realtime mlock=off \ - -smp 2,sockets=2,cores=1,threads=1 \ - -numa node,nodeid=0,cpus=0-1,mem=1024 \ ---object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \ ---device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -28,4 +26,6 @@ QEMU_AUDIO_DRV=none \ - -rtc base=utc \ - -no-shutdown \ - -boot strict=on \ -+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \ -+-device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -msg timestamp=on -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args -index bca2f286ba..b1873c100f 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object memory-backend-ram,id=ram-node0,size=224395264 \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \ ---device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \ -+-device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args -index 8be7f35cec..4f11d22e00 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ ---device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \ -+-device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args -index 307698749e..434a0f91cf 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","prealloc":true,"size":536870912}' \ ---device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","prealloc":true,"size":536870912}' \ -+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args -index 5380c9e805..e8a6451841 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args -@@ -16,10 +16,6 @@ QEMU_AUDIO_DRV=none \ - -m size=1048576k,slots=16,maxmem=4194304k \ - -realtime mlock=off \ - -smp 1,sockets=1,cores=1,threads=1 \ ---object memory-backend-ram,id=memdimm0,size=536870912 \ ---device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \ ---object memory-backend-ram,id=memdimm1,size=536870912 \ ---device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \ - -uuid 49545eb3-75e1-2d0a-acdd-f0294406c99e \ - -display none \ - -no-user-config \ -@@ -29,4 +25,8 @@ QEMU_AUDIO_DRV=none \ - -rtc base=utc \ - -no-shutdown \ - -boot strict=on \ -+-object memory-backend-ram,id=memdimm0,size=536870912 \ -+-device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \ -+-object memory-backend-ram,id=memdimm1,size=536870912 \ -+-device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \ - -msg timestamp=on -diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args -index acff36eb78..181409cde0 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args -@@ -16,10 +16,6 @@ QEMU_AUDIO_DRV=none \ - -m size=1310720k,slots=16,maxmem=4194304k \ - -realtime mlock=off \ - -smp 1,sockets=1,cores=1,threads=1 \ ---object memory-backend-ram,id=memdimm0,size=536870912 \ ---device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \ ---object memory-backend-ram,id=memdimm1,size=536870912 \ ---device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \ - -uuid 49545eb3-75e1-2d0a-acdd-f0294406c99e \ - -display none \ - -no-user-config \ -@@ -29,4 +25,8 @@ QEMU_AUDIO_DRV=none \ - -rtc base=utc \ - -no-shutdown \ - -boot strict=on \ -+-object memory-backend-ram,id=memdimm0,size=536870912 \ -+-device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \ -+-object memory-backend-ram,id=memdimm1,size=536870912 \ -+-device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \ - -msg timestamp=on -diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args -index 8747b249da..30b635d365 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args -@@ -18,10 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":false,"size":1073741824}' \ ---device virtio-mem-pci,node=0,block-size=2097152,requested-size=536870912,memdev=memvirtiomem0,id=virtiomem0,bus=pci.0,addr=0x2 \ ---object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \ ---device virtio-mem-pci,node=0,block-size=2097152,requested-size=1073741824,memdev=memvirtiomem1,id=virtiomem1,bus=pci.0,addr=0x3 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -33,6 +29,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":false,"size":1073741824}' \ -+-device virtio-mem-pci,node=0,block-size=2097152,requested-size=536870912,memdev=memvirtiomem0,id=virtiomem0,bus=pci.0,addr=0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \ -+-device virtio-mem-pci,node=0,block-size=2097152,requested-size=1073741824,memdev=memvirtiomem1,id=virtiomem1,bus=pci.0,addr=0x3 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args -index 17fd98fb88..8fa678c209 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object memory-backend-ram,id=ram-node0,size=2145386496 \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object memory-backend-file,id=memvirtiopmem0,mem-path=/tmp/virtio_pmem,share=on,size=536870912 \ ---device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object memory-backend-file,id=memvirtiopmem0,mem-path=/tmp/virtio_pmem,share=on,size=536870912 \ -+-device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args -index e5a91b6d33..95ff490cef 100644 ---- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args -@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -smp 2,sockets=2,dies=1,cores=1,threads=1 \ - -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \ - -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ ---object '{"qom-type":"memory-backend-file","id":"memvirtiopmem0","mem-path":"/tmp/virtio_pmem","share":true,"size":536870912}' \ ---device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \ - -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ - -display none \ - -no-user-config \ -@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -+-object '{"qom-type":"memory-backend-file","id":"memvirtiopmem0","mem-path":"/tmp/virtio_pmem","share":true,"size":536870912}' \ -+-device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \ - -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ - -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ - -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -diff --git a/tests/qemuxml2argvdata/pages-dimm-discard.args b/tests/qemuxml2argvdata/pages-dimm-discard.args -index 2ebe9c1350..e63c908549 100644 ---- a/tests/qemuxml2argvdata/pages-dimm-discard.args -+++ b/tests/qemuxml2argvdata/pages-dimm-discard.args -@@ -17,10 +17,6 @@ QEMU_AUDIO_DRV=none \ - -realtime mlock=off \ - -smp 2,sockets=2,cores=1,threads=1 \ - -numa node,nodeid=0,cpus=0-1,mem=1024 \ ---object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,prealloc=on,size=1073741824,host-nodes=1-3,policy=bind \ ---device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ ---object memory-backend-file,id=memdimm1,mem-path=/var/lib/libvirt/qemu/ram/-1-fedora/dimm1,discard-data=on,share=off,size=536870912 \ ---device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ - -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ - -display none \ - -no-user-config \ -@@ -32,4 +28,8 @@ QEMU_AUDIO_DRV=none \ - -no-acpi \ - -boot strict=on \ - -usb \ -+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,prealloc=on,size=1073741824,host-nodes=1-3,policy=bind \ -+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ -+-object memory-backend-file,id=memdimm1,mem-path=/var/lib/libvirt/qemu/ram/-1-fedora/dimm1,discard-data=on,share=off,size=536870912 \ -+-device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ - -msg timestamp=on --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu_command-Generate-prealloc-threads-property.patch b/SOURCES/libvirt-qemu_command-Generate-prealloc-threads-property.patch deleted file mode 100644 index 0a7bc32..0000000 --- a/SOURCES/libvirt-qemu_command-Generate-prealloc-threads-property.patch +++ /dev/null @@ -1,66 +0,0 @@ -From e52b12a986de8ac469b98135b2c1d2a8a63b9052 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Mon, 21 Mar 2022 17:10:15 +0100 -Subject: [PATCH] qemu_command: Generate prealloc-threads property - -Let's generate prealloc-threads property onto the cmd line if -domain configuration requests so. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit b8d6ecc70c8a8e9c90bab48b6829b42d8b77c748) - -Conflicts: -tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args: -Upstream has moved some cmd line arguments -(v8.0.0-260-gaf23241cfe) but that is not backported. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2067126 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_command.c | 5 ++++- - tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args | 4 ++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c -index 2acdcca2ff..d23af97e0c 100644 ---- a/src/qemu/qemu_command.c -+++ b/src/qemu/qemu_command.c -@@ -3856,7 +3856,10 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, - return -1; - } else { - if (!priv->memPrealloc && -- virJSONValueObjectAdd(&props, "B:prealloc", prealloc, NULL) < 0) -+ virJSONValueObjectAdd(&props, -+ "B:prealloc", prealloc, -+ "p:prealloc-threads", def->mem.allocation_threads, -+ NULL) < 0) - return -1; - } - -diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args -index 04a320d469..9b2e6086c3 100644 ---- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args -+++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args -@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \ - -m size=14680064k,slots=16,maxmem=1099511627776k \ - -overcommit mem-lock=off \ - -smp 8,sockets=1,dies=1,cores=8,threads=1 \ ---object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"size":15032385536,"host-nodes":[3],"policy":"preferred"}' \ -+-object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"prealloc-threads":8,"size":15032385536,"host-nodes":[3],"policy":"preferred"}' \ - -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \ - -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ - -display none \ -@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \ - -no-acpi \ - -boot strict=on \ - -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ ---object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \ -+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"prealloc-threads":8,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \ - -device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \ - -audiodev '{"id":"audio1","driver":"none"}' \ - -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu_domain-Format-qemuDomainObjPrivate-originalMemlock.patch b/SOURCES/libvirt-qemu_domain-Format-qemuDomainObjPrivate-originalMemlock.patch deleted file mode 100644 index d35edd1..0000000 --- a/SOURCES/libvirt-qemu_domain-Format-qemuDomainObjPrivate-originalMemlock.patch +++ /dev/null @@ -1,55 +0,0 @@ -From b221b3ab6d881efedc544e0e0ed9c507e21fd178 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Wed, 11 May 2022 16:37:27 +0200 -Subject: [PATCH] qemu_domain: Format qemuDomainObjPrivate::originalMemlock - -Now that qemuDomainObjPrivate struct gained new member format it -into XML and parse it so that the value is preserved across -daemon restarts. - -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -(cherry picked from commit 21aec91790ae14d24512856b20cff49764ede637) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_domain.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c -index 86d673dafa..ee7d310903 100644 ---- a/src/qemu/qemu_domain.c -+++ b/src/qemu/qemu_domain.c -@@ -2383,6 +2383,12 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf, - if (qemuDomainObjPrivateXMLFormatBackups(buf, vm) < 0) - return -1; - -+ if (priv->originalMemlock > 0) { -+ virBufferAsprintf(buf, -+ "%llu\n", -+ priv->originalMemlock); -+ } -+ - return 0; - } - -@@ -3104,6 +3110,13 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, - - priv->memPrealloc = virXPathBoolean("boolean(./memPrealloc)", ctxt) == 1; - -+ if (virXPathULongLong("string(./originalMemlock)", -+ ctxt, &priv->originalMemlock) == -2) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -+ _("failed to parse original memlock size")); -+ goto error; -+ } -+ - return 0; - - error: --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu_migration-Implement-VIR_MIGRATE_ZEROCOPY-flag.patch b/SOURCES/libvirt-qemu_migration-Implement-VIR_MIGRATE_ZEROCOPY-flag.patch deleted file mode 100644 index 0f91c7d..0000000 --- a/SOURCES/libvirt-qemu_migration-Implement-VIR_MIGRATE_ZEROCOPY-flag.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 35f06623b82d99dd380340eef465394975dd1c80 Mon Sep 17 00:00:00 2001 -Message-Id: <35f06623b82d99dd380340eef465394975dd1c80@dist-git> -From: Jiri Denemark -Date: Wed, 22 Jun 2022 16:37:31 +0200 -Subject: [PATCH] qemu_migration: Implement VIR_MIGRATE_ZEROCOPY flag -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Resolves: https://gitlab.com/libvirt/libvirt/-/issues/306 - -Signed-off-by: Jiri Denemark -Reviewed-by: Ján Tomko -(cherry picked from commit d375993ab314a41bca7ef6c846e07afc18c37774) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Conflicts: - src/qemu/qemu_migration.c - src/qemu/qemu_migration.h - - post-copy recovery not bacported - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_migration.c | 21 +++++++++++++++++++++ - src/qemu/qemu_migration.h | 1 + - src/qemu/qemu_migration_params.c | 6 ++++++ - src/qemu/qemu_migration_params.h | 1 + - 4 files changed, 29 insertions(+) - -diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c -index 35ad201580..db5163e993 100644 ---- a/src/qemu/qemu_migration.c -+++ b/src/qemu/qemu_migration.c -@@ -2366,6 +2366,12 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, - return NULL; - } - -+ if (flags & VIR_MIGRATE_ZEROCOPY && !(flags & VIR_MIGRATE_PARALLEL)) { -+ virReportError(VIR_ERR_OPERATION_INVALID, "%s", -+ _("zero-copy is only available for parallel migration")); -+ return NULL; -+ } -+ - if (flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)) { - if (flags & VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES && - !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) { -@@ -4137,6 +4143,21 @@ qemuMigrationSrcRun(virQEMUDriver *driver, - migParams) < 0) - goto error; - -+ if (flags & VIR_MIGRATE_ZEROCOPY) { -+ /* Zero-copy requires pages in transfer to be locked in host memory. -+ * Unfortunately, we have no reliable way of computing how many pages -+ * will need to be locked at the same time. Thus we set the limit to -+ * the whole guest memory and reset it back once migration is done. */ -+ unsigned long long limit; -+ -+ if (virMemoryLimitIsSet(vm->def->mem.hard_limit)) -+ limit = vm->def->mem.hard_limit; -+ else -+ limit = virDomainDefGetMemoryTotal(vm->def); -+ -+ if (qemuDomainSetMaxMemLock(vm, limit << 10, &priv->preMigrationMemlock) < 0) -+ goto error; -+ } - - if (storageMigration) { - if (mig->nbd) { -diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h -index b233358a51..6f737f7b4c 100644 ---- a/src/qemu/qemu_migration.h -+++ b/src/qemu/qemu_migration.h -@@ -60,6 +60,7 @@ - VIR_MIGRATE_TLS | \ - VIR_MIGRATE_PARALLEL | \ - VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES | \ -+ VIR_MIGRATE_ZEROCOPY | \ - 0) - - /* All supported migration parameters and their types. */ -diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c -index 7b225fdf4b..c985583861 100644 ---- a/src/qemu/qemu_migration_params.c -+++ b/src/qemu/qemu_migration_params.c -@@ -96,6 +96,7 @@ VIR_ENUM_IMPL(qemuMigrationCapability, - "multifd", - "dirty-bitmaps", - "return-path", -+ "zero-copy-send", - ); - - -@@ -177,6 +178,11 @@ static const qemuMigrationParamsFlagMapItem qemuMigrationParamsFlagMap[] = { - VIR_MIGRATE_TUNNELLED, - QEMU_MIGRATION_CAP_RETURN_PATH, - QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION}, -+ -+ {QEMU_MIGRATION_FLAG_REQUIRED, -+ VIR_MIGRATE_ZEROCOPY, -+ QEMU_MIGRATION_CAP_ZERO_COPY_SEND, -+ QEMU_MIGRATION_SOURCE}, - }; - - /* Translation from VIR_MIGRATE_PARAM_* typed parameters to -diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h -index b4de8dda7b..caa5e47f0f 100644 ---- a/src/qemu/qemu_migration_params.h -+++ b/src/qemu/qemu_migration_params.h -@@ -41,6 +41,7 @@ typedef enum { - QEMU_MIGRATION_CAP_MULTIFD, - QEMU_MIGRATION_CAP_BLOCK_DIRTY_BITMAPS, - QEMU_MIGRATION_CAP_RETURN_PATH, -+ QEMU_MIGRATION_CAP_ZERO_COPY_SEND, - - QEMU_MIGRATION_CAP_LAST - } qemuMigrationCapability; --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu_migration-Restore-original-memory-locking-limit.patch b/SOURCES/libvirt-qemu_migration-Restore-original-memory-locking-limit.patch deleted file mode 100644 index c8afc02..0000000 --- a/SOURCES/libvirt-qemu_migration-Restore-original-memory-locking-limit.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 8cccd9634ecd91a5b7343eddc037e0fa7de2f9f6 Mon Sep 17 00:00:00 2001 -Message-Id: <8cccd9634ecd91a5b7343eddc037e0fa7de2f9f6@dist-git> -From: Jiri Denemark -Date: Wed, 22 Jun 2022 16:12:02 +0200 -Subject: [PATCH] qemu_migration: Restore original memory locking limit -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -For RDMA migration we update memory locking limit, but never set it back -once migration finishes (on the destination host) or aborts (on the -source host). - -Signed-off-by: Jiri Denemark -Reviewed-by: Ján Tomko -(cherry picked from commit d4d3bb813031275c2c7cf72724b83c97ce82ab7a) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Conflicts: - src/qemu/qemu_migration.c - - post-copy resovery not backported - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_domain.c | 12 ++++++++++++ - src/qemu/qemu_domain.h | 3 +++ - src/qemu/qemu_migration.c | 10 ++++++++-- - 3 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c -index a81789f194..c24d1e4d53 100644 ---- a/src/qemu/qemu_domain.c -+++ b/src/qemu/qemu_domain.c -@@ -2389,6 +2389,11 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf, - priv->originalMemlock); - } - -+ if (priv->preMigrationMemlock > 0) { -+ virBufferAsprintf(buf, "%llu\n", -+ priv->preMigrationMemlock); -+ } -+ - return 0; - } - -@@ -3117,6 +3122,13 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, - goto error; - } - -+ if (virXPathULongLong("string(./preMigrationMemlock)", ctxt, -+ &priv->preMigrationMemlock) == -2) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -+ _("failed to parse pre-migration memlock limit")); -+ return -1; -+ } -+ - return 0; - - error: -diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h -index 6d1d23439a..d6e8a7a0fb 100644 ---- a/src/qemu/qemu_domain.h -+++ b/src/qemu/qemu_domain.h -@@ -146,6 +146,9 @@ struct _qemuDomainObjPrivate { - int nbdPort; /* Port used for migration with NBD */ - unsigned short migrationPort; - int preMigrationState; -+ unsigned long long preMigrationMemlock; /* Original RLIMIT_MEMLOCK in case -+ it was changed for the current -+ migration job. */ - - virChrdevs *devs; - -diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c -index 10338f8e87..35ad201580 100644 ---- a/src/qemu/qemu_migration.c -+++ b/src/qemu/qemu_migration.c -@@ -2974,7 +2974,8 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver, - - if (STREQ_NULLABLE(protocol, "rdma") && - vm->def->mem.hard_limit > 0 && -- qemuDomainSetMaxMemLock(vm, vm->def->mem.hard_limit << 10, NULL) < 0) { -+ qemuDomainSetMaxMemLock(vm, vm->def->mem.hard_limit << 10, -+ &priv->preMigrationMemlock) < 0) { - goto stopjob; - } - -@@ -3451,6 +3452,7 @@ qemuMigrationSrcConfirmPhase(virQEMUDriver *driver, - VIR_DOMAIN_EVENT_STOPPED_MIGRATED); - virObjectEventStateQueue(driver->domainEventState, event); - qemuDomainEventEmitJobCompleted(driver, vm); -+ priv->preMigrationMemlock = 0; - } else { - virErrorPtr orig_err; - int reason; -@@ -3471,6 +3473,7 @@ qemuMigrationSrcConfirmPhase(virQEMUDriver *driver, - - qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT, - jobPriv->migParams, priv->job.apiFlags); -+ qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock); - - qemuDomainSaveStatus(vm); - } -@@ -4224,7 +4227,8 @@ qemuMigrationSrcRun(virQEMUDriver *driver, - case MIGRATION_DEST_HOST: - if (STREQ(spec->dest.host.protocol, "rdma") && - vm->def->mem.hard_limit > 0 && -- qemuDomainSetMaxMemLock(vm, vm->def->mem.hard_limit << 10, NULL) < 0) { -+ qemuDomainSetMaxMemLock(vm, vm->def->mem.hard_limit << 10, -+ &priv->preMigrationMemlock) < 0) { - goto exit_monitor; - } - rc = qemuMonitorMigrateToHost(priv->mon, migrate_flags, -@@ -5408,6 +5412,7 @@ qemuMigrationSrcPerformPhase(virQEMUDriver *driver, - if (ret < 0) { - qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT, - jobPriv->migParams, priv->job.apiFlags); -+ qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock); - qemuMigrationJobFinish(driver, vm); - } else { - qemuMigrationJobContinue(vm); -@@ -5881,6 +5886,7 @@ qemuMigrationDstFinish(virQEMUDriver *driver, - cleanup: - g_clear_pointer(&jobInfo, qemuDomainJobInfoFree); - virPortAllocatorRelease(port); -+ qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock); - if (priv->mon) - qemuMonitorSetDomainLog(priv->mon, NULL, NULL, NULL); - VIR_FREE(priv->origname); --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu_migration-Use-qemuDomainSetMaxMemLock.patch b/SOURCES/libvirt-qemu_migration-Use-qemuDomainSetMaxMemLock.patch deleted file mode 100644 index 88a871b..0000000 --- a/SOURCES/libvirt-qemu_migration-Use-qemuDomainSetMaxMemLock.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 8354fa1d2e471699331961272bc38f5e4cfe7cb8 Mon Sep 17 00:00:00 2001 -Message-Id: <8354fa1d2e471699331961272bc38f5e4cfe7cb8@dist-git> -From: Jiri Denemark -Date: Wed, 22 Jun 2022 09:04:04 +0200 -Subject: [PATCH] qemu_migration: Use qemuDomainSetMaxMemLock -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This helper will not try to set the limit if it is already big enough, -which may be useful when libvirt daemon is running in a containerized -environment and is not allowed to change memory locking limit. - -Signed-off-by: Jiri Denemark -Reviewed-by: Ján Tomko -(cherry picked from commit 22ee8cbf090c45f999b76e3f8dc7a45065fc9edf) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Conflicts: - src/qemu/qemu_migration.c - - refactoring for post-copy recovery not backported - -Signed-off-by: Jiri Denemark ---- - src/qemu/qemu_migration.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c -index 2635ef1162..10338f8e87 100644 ---- a/src/qemu/qemu_migration.c -+++ b/src/qemu/qemu_migration.c -@@ -2974,7 +2974,7 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver, - - if (STREQ_NULLABLE(protocol, "rdma") && - vm->def->mem.hard_limit > 0 && -- virProcessSetMaxMemLock(vm->pid, vm->def->mem.hard_limit << 10) < 0) { -+ qemuDomainSetMaxMemLock(vm, vm->def->mem.hard_limit << 10, NULL) < 0) { - goto stopjob; - } - -@@ -4224,7 +4224,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, - case MIGRATION_DEST_HOST: - if (STREQ(spec->dest.host.protocol, "rdma") && - vm->def->mem.hard_limit > 0 && -- virProcessSetMaxMemLock(vm->pid, vm->def->mem.hard_limit << 10) < 0) { -+ qemuDomainSetMaxMemLock(vm, vm->def->mem.hard_limit << 10, NULL) < 0) { - goto exit_monitor; - } - rc = qemuMonitorMigrateToHost(priv->mon, migrate_flags, --- -2.35.1 - diff --git a/SOURCES/libvirt-qemu_namespace-Don-t-leak-memory-in-qemuDomainGetPreservedMounts.patch b/SOURCES/libvirt-qemu_namespace-Don-t-leak-memory-in-qemuDomainGetPreservedMounts.patch deleted file mode 100644 index 10419d6..0000000 --- a/SOURCES/libvirt-qemu_namespace-Don-t-leak-memory-in-qemuDomainGetPreservedMounts.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 77b0485ba92fe5f0520321385af8a7581c286df1 Mon Sep 17 00:00:00 2001 -Message-Id: <77b0485ba92fe5f0520321385af8a7581c286df1@dist-git> -From: Michal Privoznik -Date: Mon, 31 Oct 2022 15:38:13 +0100 -Subject: [PATCH] qemu_namespace: Don't leak memory in - qemuDomainGetPreservedMounts() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The aim of qemuDomainGetPreservedMounts() is to get a list of -filesystems mounted under /dev and optionally generate a path for -each one where they are moved temporarily when building the -namespace. And the function tries to be a bit clever about it. -For instance, if /dev/shm mount point exists, there's no need to -consider /dev/shm/a nor /dev/shm/b as preserving just 'top level' -/dev/shm gives the same result. To achieve this, the function -iterates over the list of filesystem as returned by -virFileGetMountSubtree() and removes the nested ones. However, it -does so in a bit clumsy way: plain VIR_DELETE_ELEMENT() is used -without freeing the string itself. Therefore, if all three -aforementioned example paths appeared on the list, /dev/shm/a and -/dev/shm/b strings would be leaked. - -And when I think about it more, there's no real need to shrink -the array down (realloc()). It's going to be free()-d when -returning from the function. Switch to -VIR_DELETE_ELEMENT_INPLACE() then. - -Fixes: cdd9205dfffa3aaed935446a41f0d2dd1357c268 -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit bca7a53333ead7c1afd178728de74c2977cd4b5e) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2166573 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_namespace.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c -index 74ffd6fb90..2f50087c1d 100644 ---- a/src/qemu/qemu_namespace.c -+++ b/src/qemu/qemu_namespace.c -@@ -160,7 +160,8 @@ qemuDomainGetPreservedMounts(virQEMUDriverConfig *cfg, - - if (c && (*c == '/' || *c == '\0')) { - VIR_DEBUG("Dropping path %s because of %s", mounts[j], mounts[i]); -- VIR_DELETE_ELEMENT(mounts, j, nmounts); -+ VIR_FREE(mounts[j]); -+ VIR_DELETE_ELEMENT_INPLACE(mounts, j, nmounts); - } else { - j++; - } --- -2.39.1 - diff --git a/SOURCES/libvirt-qemu_namespace-Fix-a-corner-case-in-qemuDomainGetPreservedMounts.patch b/SOURCES/libvirt-qemu_namespace-Fix-a-corner-case-in-qemuDomainGetPreservedMounts.patch deleted file mode 100644 index 3df3a96..0000000 --- a/SOURCES/libvirt-qemu_namespace-Fix-a-corner-case-in-qemuDomainGetPreservedMounts.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 215adedb16aa082d052f84705338de0d77721fe0 Mon Sep 17 00:00:00 2001 -Message-Id: <215adedb16aa082d052f84705338de0d77721fe0@dist-git> -From: Michal Privoznik -Date: Tue, 6 Sep 2022 13:43:22 +0200 -Subject: [PATCH] qemu_namespace: Fix a corner case in - qemuDomainGetPreservedMounts() - -When setting up namespace for QEMU we look at mount points under -/dev (like /dev/pts, /dev/mqueue/, etc.) because we want to -preserve those (which is done by moving them to a temp location, -unshare(), and then moving them back). We have a convenience -helper - qemuDomainGetPreservedMounts() - that processes the -mount table and (optionally) moves the other filesystems too. -This helper is also used when attempting to create a path in NS, -because the path, while starting with "/dev/" prefix, may -actually lead to one of those filesystems that we preserved. - -And here comes the corner case: while we require the parent mount -table to be in shared mode (equivalent of `mount --make-rshared /'), -these mount events propagate iff the target path exist inside the -slave mount table (= QEMU's private namespace). And since we -create only a subset of /dev nodes, well, that assumption is not -always the case. - -For instance, assume that a domain is already running, no -hugepages were configured for it nor any hugetlbfs is mounted. -Now, when a hugetlbfs is mounted into '/dev/hugepages', this is -propagated into the QEMU's namespace, but since the target dir -does not exist in the private /dev, the FS is not mounted in the -namespace. - -Fortunately, this difference between namespaces is visible when -comparing /proc/mounts and /proc/$PID/mounts (where PID is the -QEMU's PID). Therefore, if possible we should look at the latter. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit 46b03819ae8d833b11c2aaccb2c2a0361727f51b) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_namespace.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c -index 4bff325a2c..fc286ab0be 100644 ---- a/src/qemu/qemu_namespace.c -+++ b/src/qemu/qemu_namespace.c -@@ -110,6 +110,8 @@ qemuDomainGetPreservedMountPath(virQEMUDriverConfig *cfg, - * b) generate backup path for all the entries in a) - * - * Any of the return pointers can be NULL. Both arrays are NULL-terminated. -+ * Get the mount table either from @vm's PID (if running), or from the -+ * namespace we're in (if @vm's not running). - * - * Returns 0 on success, -1 otherwise (with error reported) - */ -@@ -124,12 +126,18 @@ qemuDomainGetPreservedMounts(virQEMUDriverConfig *cfg, - size_t nmounts = 0; - g_auto(GStrv) paths = NULL; - g_auto(GStrv) savePaths = NULL; -+ g_autofree char *mountsPath = NULL; - size_t i; - - if (ndevPath) - *ndevPath = 0; - -- if (virFileGetMountSubtree(QEMU_PROC_MOUNTS, "/dev", &mounts, &nmounts) < 0) -+ if (vm->pid > 0) -+ mountsPath = g_strdup_printf("/proc/%lld/mounts", (long long) vm->pid); -+ else -+ mountsPath = g_strdup(QEMU_PROC_MOUNTS); -+ -+ if (virFileGetMountSubtree(mountsPath, "/dev", &mounts, &nmounts) < 0) - return -1; - - if (nmounts == 0) --- -2.38.0 - diff --git a/SOURCES/libvirt-qemu_namespace-Introduce-qemuDomainNamespaceSetupPath.patch b/SOURCES/libvirt-qemu_namespace-Introduce-qemuDomainNamespaceSetupPath.patch deleted file mode 100644 index bb83813..0000000 --- a/SOURCES/libvirt-qemu_namespace-Introduce-qemuDomainNamespaceSetupPath.patch +++ /dev/null @@ -1,68 +0,0 @@ -From d515c964d740274d01bb8de1e5b0351490d6b9d3 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Tue, 6 Sep 2022 13:43:58 +0200 -Subject: [PATCH] qemu_namespace: Introduce qemuDomainNamespaceSetupPath() - -Sometimes it may come handy to just bind mount a directory/file -into domain's namespace. Implement a thin wrapper over -qemuNamespaceMknodPaths() which has all the logic we need. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit 5853d707189005a4ea5b2215e80853867b822fd9) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_namespace.c | 19 +++++++++++++++++++ - src/qemu/qemu_namespace.h | 4 ++++ - 2 files changed, 23 insertions(+) - -diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c -index fc286ab0be..74ffd6fb90 100644 ---- a/src/qemu/qemu_namespace.c -+++ b/src/qemu/qemu_namespace.c -@@ -1398,6 +1398,25 @@ qemuNamespaceUnlinkPaths(virDomainObj *vm, - } - - -+int -+qemuDomainNamespaceSetupPath(virDomainObj *vm, -+ const char *path, -+ bool *created) -+{ -+ g_autoptr(virGSListString) paths = NULL; -+ -+ if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT)) -+ return 0; -+ -+ paths = g_slist_prepend(paths, g_strdup(path)); -+ -+ if (qemuNamespaceMknodPaths(vm, paths, created) < 0) -+ return -1; -+ -+ return 0; -+} -+ -+ - int - qemuDomainNamespaceSetupDisk(virDomainObj *vm, - virStorageSource *src, -diff --git a/src/qemu/qemu_namespace.h b/src/qemu/qemu_namespace.h -index 020aca13d8..1ab9322061 100644 ---- a/src/qemu/qemu_namespace.h -+++ b/src/qemu/qemu_namespace.h -@@ -49,6 +49,10 @@ void qemuDomainDestroyNamespace(virQEMUDriver *driver, - - bool qemuDomainNamespaceAvailable(qemuDomainNamespace ns); - -+int qemuDomainNamespaceSetupPath(virDomainObj *vm, -+ const char *path, -+ bool *created); -+ - int qemuDomainNamespaceSetupDisk(virDomainObj *vm, - virStorageSource *src, - bool *created); --- -2.38.0 - diff --git a/SOURCES/libvirt-qemu_namespace-Tolerate-missing-ACLs-when-creating-a-path-in-namespace.patch b/SOURCES/libvirt-qemu_namespace-Tolerate-missing-ACLs-when-creating-a-path-in-namespace.patch deleted file mode 100644 index ceccc0b..0000000 --- a/SOURCES/libvirt-qemu_namespace-Tolerate-missing-ACLs-when-creating-a-path-in-namespace.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7c7ec6e6c20675a99abe8685c715dc95e7e8dbff Mon Sep 17 00:00:00 2001 -Message-Id: <7c7ec6e6c20675a99abe8685c715dc95e7e8dbff@dist-git> -From: Michal Privoznik -Date: Tue, 6 Sep 2022 13:37:23 +0200 -Subject: [PATCH] qemu_namespace: Tolerate missing ACLs when creating a path in - namespace - -When creating a path in a domain's mount namespace we try to set -ACLs on it, so that it's a verbatim copy of the path in parent's -namespace. The ACLs are queried upfront (by -qemuNamespaceMknodItemInit()) but this is fault tolerant so the -pointer to ACLs might be NULL (meaning no ACLs were queried, for -instance because the underlying filesystem does not support -them). But then we take this NULL and pass it to virFileSetACLs() -which immediately returns an error because NULL is invalid value. - -Mimic what we do with SELinux label - only set ACLs if they are -non-NULL which includes symlinks. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit 687374959e160dc566bd4b6d43c7bf1beb470c59) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_namespace.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c -index 94453033f5..4bff325a2c 100644 ---- a/src/qemu/qemu_namespace.c -+++ b/src/qemu/qemu_namespace.c -@@ -1023,8 +1023,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) - goto cleanup; - } - -- /* Symlinks don't have ACLs. */ -- if (!isLink && -+ if (data->acl && - virFileSetACLs(data->file, data->acl) < 0 && - errno != ENOTSUP) { - virReportSystemError(errno, --- -2.38.0 - diff --git a/SOURCES/libvirt-qemu_process-Don-t-require-a-hugetlbfs-mount-for-memfd.patch b/SOURCES/libvirt-qemu_process-Don-t-require-a-hugetlbfs-mount-for-memfd.patch deleted file mode 100644 index 5552bf4..0000000 --- a/SOURCES/libvirt-qemu_process-Don-t-require-a-hugetlbfs-mount-for-memfd.patch +++ /dev/null @@ -1,50 +0,0 @@ -From f745b9ae2d12df0c0f2253c295f3d411a8a4165d Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Mon, 5 Sep 2022 10:34:44 +0200 -Subject: [PATCH] qemu_process: Don't require a hugetlbfs mount for memfd - -The aim of qemuProcessNeedHugepagesPath() is to determine whether -a hugetlbfs mount point is required for given domain (as in -whether qemuBuildMemoryBackendProps() picks up -memory-backend-file pointing to a hugetlbfs mount point). Well, -when domain is configured to use memfd backend then that -condition can never be true. Therefore, skip creating domain's -private path under hugetlbfs mount points. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit f14f8dff9330ed51d817f190a2ee9ac76dfac00b) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_process.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c -index 5c6657a876..540eee9ff0 100644 ---- a/src/qemu/qemu_process.c -+++ b/src/qemu/qemu_process.c -@@ -3810,8 +3810,18 @@ qemuProcessNeedHugepagesPath(virDomainDef *def, - const long system_pagesize = virGetSystemPageSizeKB(); - size_t i; - -- if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) -+ switch ((virDomainMemorySource)def->mem.source) { -+ case VIR_DOMAIN_MEMORY_SOURCE_FILE: -+ /* This needs a hugetlbfs mount. */ - return true; -+ case VIR_DOMAIN_MEMORY_SOURCE_MEMFD: -+ /* memfd works without a hugetlbfs mount */ -+ return false; -+ case VIR_DOMAIN_MEMORY_SOURCE_NONE: -+ case VIR_DOMAIN_MEMORY_SOURCE_ANONYMOUS: -+ case VIR_DOMAIN_MEMORY_SOURCE_LAST: -+ break; -+ } - - for (i = 0; i < def->mem.nhugepages; i++) { - if (def->mem.hugepages[i].size != system_pagesize) --- -2.38.0 - diff --git a/SOURCES/libvirt-qemu_process.c-Propagate-hugetlbfs-mounts-on-reconnect.patch b/SOURCES/libvirt-qemu_process.c-Propagate-hugetlbfs-mounts-on-reconnect.patch deleted file mode 100644 index be102cd..0000000 --- a/SOURCES/libvirt-qemu_process.c-Propagate-hugetlbfs-mounts-on-reconnect.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 2aeb222d9d61868ef40932b4349af84696415e11 Mon Sep 17 00:00:00 2001 -Message-Id: <2aeb222d9d61868ef40932b4349af84696415e11@dist-git> -From: Michal Privoznik -Date: Tue, 6 Sep 2022 13:45:51 +0200 -Subject: [PATCH] qemu_process.c: Propagate hugetlbfs mounts on reconnect - -When reconnecting to a running QEMU process, we construct the -per-domain path in all hugetlbfs mounts. This is a relict from -the past (v3.4.0-100-g5b24d25062) where we switched to a -per-domain path and we want to create those paths when libvirtd -restarts on upgrade. - -And with namespaces enabled there is one corner case where the -path is not created. In fact an error is reported and the -reconnect fails. Ideally, all mount events are propagated into -the QEMU's namespace. And they probably are, except when the -target path does not exist inside the namespace. Now, it's pretty -common for users to mount hugetlbfs under /dev (e.g. -/dev/hugepages), but if domain is started without hugepages (or -more specifically - private hugetlbfs path wasn't created on -domain startup), then the reconnect code tries to create it. -But it fails to do so, well, it fails to set seclabels on the -path because, because the path does not exist in the private -namespace. And it doesn't exist because we specifically create -only a subset of all possible /dev nodes. Therefore, the mount -event, whilst propagated, is not successful and hence the -filesystem is not mounted. We have to do it ourselves. - -If hugetlbfs is mount anywhere else there's no problem and this -is effectively a dead code. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196 -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit 0377177c7856bb87a9d8aa1324b54f5fbe9f1e5b) - -Conflicts: -- docs/kbase/qemu-passthrough-security.rst: Well, v8.8.0-rc1~32 - isn't backported, thus we can't remove a paragraph that the - backported commit did. It's a documentation after all, so no - harm. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_process.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c -index 540eee9ff0..1164340aa9 100644 ---- a/src/qemu/qemu_process.c -+++ b/src/qemu/qemu_process.c -@@ -3906,6 +3906,9 @@ qemuProcessBuildDestroyMemoryPathsImpl(virQEMUDriver *driver, - return -1; - } - -+ if (qemuDomainNamespaceSetupPath(vm, path, NULL) < 0) -+ return -1; -+ - if (qemuSecurityDomainSetPathLabel(driver, vm, path, true) < 0) - return -1; - } else { --- -2.38.0 - diff --git a/SOURCES/libvirt-qemu_tpm-Do-async-IO-when-starting-swtpm-emulator.patch b/SOURCES/libvirt-qemu_tpm-Do-async-IO-when-starting-swtpm-emulator.patch deleted file mode 100644 index 6ee2c59..0000000 --- a/SOURCES/libvirt-qemu_tpm-Do-async-IO-when-starting-swtpm-emulator.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 87b0f241db1eba0e9db1fd233c5ab8a8d0115979 Mon Sep 17 00:00:00 2001 -Message-Id: <87b0f241db1eba0e9db1fd233c5ab8a8d0115979@dist-git> -From: Michal Privoznik -Date: Mon, 21 Mar 2022 13:33:06 +0100 -Subject: [PATCH] qemu_tpm: Do async IO when starting swtpm emulator -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When vTPM is secured via virSecret libvirt passes the secret -value via an FD when swtpm is started (arguments --key and ---migration-key). The writing of the secret into the FDs is -handled via virCommand, specifically qemu_tpm calls -virCommandSetSendBuffer()) and then virCommandRunAsync() spawns a -thread to handle writing into the FD via -virCommandDoAsyncIOHelper. But the thread is not created unless -VIR_EXEC_ASYNC_IO flag is set, which it isn't. In order to fix -it, virCommandDoAsyncIO() must be called. - -The credit goes to Marc-André Lureau - who has done all the debugging and -proposed fix in the bugzilla. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2064115 -Fixes: a9c500d2b50c5c041a1bb6ae9724402cf1cec8fe -Signed-off-by: Michal Privoznik -Reviewed-by: Jiri Denemark -(cherry picked from commit 4d7bb0177a33c4e90fd001edfe27bc030354d875) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152188 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_tpm.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c -index 9c5d1ffed4..29dcb2ac0f 100644 ---- a/src/qemu/qemu_tpm.c -+++ b/src/qemu/qemu_tpm.c -@@ -923,6 +923,7 @@ qemuExtTPMStartEmulator(virQEMUDriver *driver, - if (!(pidfile = qemuTPMEmulatorCreatePidFilename(cfg->swtpmStateDir, shortName))) - return -1; - -+ virCommandDoAsyncIO(cmd); - virCommandDaemonize(cmd); - virCommandSetPidFile(cmd, pidfile); - virCommandSetErrorFD(cmd, &errfd); --- -2.39.0 - diff --git a/SOURCES/libvirt-qemu_validate-Validate-prealloc-threads-against-qemuCpas.patch b/SOURCES/libvirt-qemu_validate-Validate-prealloc-threads-against-qemuCpas.patch deleted file mode 100644 index 0f8d752..0000000 --- a/SOURCES/libvirt-qemu_validate-Validate-prealloc-threads-against-qemuCpas.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 088ba382d7a099ddbebe37e5486ce648e24266db Mon Sep 17 00:00:00 2001 -Message-Id: <088ba382d7a099ddbebe37e5486ce648e24266db@dist-git> -From: Michal Privoznik -Date: Mon, 21 Mar 2022 17:09:40 +0100 -Subject: [PATCH] qemu_validate: Validate prealloc threads against qemuCpas - -Only fairly new QEMUs are capable of user provided number of -preallocation threads. Validate this assumption. - -Signed-off-by: Michal Privoznik -Reviewed-by: Martin Kletzander -(cherry picked from commit 75a4e0165ef199809974e97b507d3953e1de01d1) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2067126 -Signed-off-by: Michal Privoznik ---- - src/qemu/qemu_validate.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c -index 3a69733f81..7bc14293d6 100644 ---- a/src/qemu/qemu_validate.c -+++ b/src/qemu/qemu_validate.c -@@ -739,6 +739,13 @@ qemuValidateDomainDefMemory(const virDomainDef *def, - return -1; - } - -+ if (mem->allocation_threads > 0 && -+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS)) { -+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", -+ _("preallocation threads are unsupported with this QEMU")); -+ return -1; -+ } -+ - if (mem->source == VIR_DOMAIN_MEMORY_SOURCE_ANONYMOUS) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("hugepages are not allowed with anonymous " --- -2.35.1 - diff --git a/SOURCES/libvirt-remote-check-for-negative-array-lengths-before-allocation.patch b/SOURCES/libvirt-remote-check-for-negative-array-lengths-before-allocation.patch deleted file mode 100644 index c292474..0000000 --- a/SOURCES/libvirt-remote-check-for-negative-array-lengths-before-allocation.patch +++ /dev/null @@ -1,218 +0,0 @@ -From cb42cd98d347deeee7c225d8d1e9f71f232cad29 Mon Sep 17 00:00:00 2001 -Message-ID: -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Fri, 15 Mar 2024 10:47:50 +0000 -Subject: [PATCH] remote: check for negative array lengths before allocation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -While the C API entry points will validate non-negative lengths -for various parameters, the RPC server de-serialization code -will need to allocate memory for arrays before entering the C -API. These allocations will thus happen before the non-negative -length check is performed. - -Passing a negative length to the g_new0 function will usually -result in a crash due to the negative length being treated as -a huge positive number. - -This was found and diagnosed by ALT Linux Team with AFLplusplus. - -CVE-2024-2494 -Reviewed-by: Michal Privoznik -Found-by: Alexandr Shashkin -Co-developed-by: Alexander Kuznetsov -Signed-off-by: Daniel P. Berrangé -(cherry picked from commit 8a3f8d957507c1f8223fdcf25a3ff885b15557f2) -Signed-off-by: Jiri Denemark ---- - src/remote/remote_daemon_dispatch.c | 65 +++++++++++++++++++++++++++++ - src/rpc/gendispatch.pl | 5 +++ - 2 files changed, 70 insertions(+) - -diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c -index 689001889e..c193227926 100644 ---- a/src/remote/remote_daemon_dispatch.c -+++ b/src/remote/remote_daemon_dispatch.c -@@ -2306,6 +2306,10 @@ remoteDispatchDomainGetSchedulerParameters(virNetServer *server G_GNUC_UNUSED, - if (!conn) - goto cleanup; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -2354,6 +2358,10 @@ remoteDispatchDomainGetSchedulerParametersFlags(virNetServer *server G_GNUC_UNUS - if (!conn) - goto cleanup; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -2512,6 +2520,10 @@ remoteDispatchDomainBlockStatsFlags(virNetServer *server G_GNUC_UNUSED, - goto cleanup; - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -2737,6 +2749,14 @@ remoteDispatchDomainGetVcpuPinInfo(virNetServer *server G_GNUC_UNUSED, - if (!(dom = get_nonnull_domain(conn, args->dom))) - goto cleanup; - -+ if (args->ncpumaps < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("ncpumaps must be non-negative")); -+ goto cleanup; -+ } -+ if (args->maplen < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maplen must be non-negative")); -+ goto cleanup; -+ } - if (args->ncpumaps > REMOTE_VCPUINFO_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("ncpumaps > REMOTE_VCPUINFO_MAX")); - goto cleanup; -@@ -2831,6 +2851,11 @@ remoteDispatchDomainGetEmulatorPinInfo(virNetServer *server G_GNUC_UNUSED, - if (!(dom = get_nonnull_domain(conn, args->dom))) - goto cleanup; - -+ if (args->maplen < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maplen must be non-negative")); -+ goto cleanup; -+ } -+ - /* Allocate buffers to take the results */ - if (args->maplen > 0) - cpumaps = g_new0(unsigned char, args->maplen); -@@ -2878,6 +2903,14 @@ remoteDispatchDomainGetVcpus(virNetServer *server G_GNUC_UNUSED, - if (!(dom = get_nonnull_domain(conn, args->dom))) - goto cleanup; - -+ if (args->maxinfo < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo must be non-negative")); -+ goto cleanup; -+ } -+ if (args->maplen < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo must be non-negative")); -+ goto cleanup; -+ } - if (args->maxinfo > REMOTE_VCPUINFO_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo > REMOTE_VCPUINFO_MAX")); - goto cleanup; -@@ -3117,6 +3150,10 @@ remoteDispatchDomainGetMemoryParameters(virNetServer *server G_GNUC_UNUSED, - - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -3177,6 +3214,10 @@ remoteDispatchDomainGetNumaParameters(virNetServer *server G_GNUC_UNUSED, - - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_NUMA_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -3237,6 +3278,10 @@ remoteDispatchDomainGetBlkioParameters(virNetServer *server G_GNUC_UNUSED, - - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -3298,6 +3343,10 @@ remoteDispatchNodeGetCPUStats(virNetServer *server G_GNUC_UNUSED, - - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_NODE_CPU_STATS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -3365,6 +3414,10 @@ remoteDispatchNodeGetMemoryStats(virNetServer *server G_GNUC_UNUSED, - - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_NODE_MEMORY_STATS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -3545,6 +3598,10 @@ remoteDispatchDomainGetBlockIoTune(virNetServer *server G_GNUC_UNUSED, - if (!conn) - goto cleanup; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -5087,6 +5144,10 @@ remoteDispatchDomainGetInterfaceParameters(virNetServer *server G_GNUC_UNUSED, - - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -@@ -5307,6 +5368,10 @@ remoteDispatchNodeGetMemoryParameters(virNetServer *server G_GNUC_UNUSED, - - flags = args->flags; - -+ if (args->nparams < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams must be non-negative")); -+ goto cleanup; -+ } - if (args->nparams > REMOTE_NODE_MEMORY_PARAMETERS_MAX) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); - goto cleanup; -diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl -index 9f5bf0e316..aacab88808 100755 ---- a/src/rpc/gendispatch.pl -+++ b/src/rpc/gendispatch.pl -@@ -1074,6 +1074,11 @@ elsif ($mode eq "server") { - print "\n"; - - if ($single_ret_as_list) { -+ print " if (args->$single_ret_list_max_var < 0) {\n"; -+ print " virReportError(VIR_ERR_RPC,\n"; -+ print " \"%s\", _(\"max$single_ret_list_name must be non-negative\"));\n"; -+ print " goto cleanup;\n"; -+ print " }\n"; - print " if (args->$single_ret_list_max_var > $single_ret_list_max_define) {\n"; - print " virReportError(VIR_ERR_RPC,\n"; - print " \"%s\", _(\"max$single_ret_list_name > $single_ret_list_max_define\"));\n"; --- -2.44.0 diff --git a/SOURCES/libvirt-rpc-Fix-memory-leak-of-fds.patch b/SOURCES/libvirt-rpc-Fix-memory-leak-of-fds.patch deleted file mode 100644 index c54e1ff..0000000 --- a/SOURCES/libvirt-rpc-Fix-memory-leak-of-fds.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0f6009e5a8ca63388772597f3e42c71b50635a02 Mon Sep 17 00:00:00 2001 -Message-Id: <0f6009e5a8ca63388772597f3e42c71b50635a02@dist-git> -From: Peng Liang -Date: Wed, 2 Mar 2022 17:22:05 +0800 -Subject: [PATCH] rpc: Fix memory leak of fds - -In virSystemdActivationClaimFDs, the memory of ent->fds has been stolen -and stored in fds, but fds is never freed, which causes a memory leak. -Fix it by declaring fds as g_autofree. - -Reported-by: Jie Tang -Signed-off-by: Peng Liang -Reviewed-by: Michal Privoznik -(cherry picked from commit 8a1915c4d6c33669dcb390d0708cb6e5d651770d) -https://bugzilla.redhat.com/show_bug.cgi?id=2165428 -Signed-off-by: Michal Privoznik ---- - src/rpc/virnetserver.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c -index ad581a36dd..d9430a2cfa 100644 ---- a/src/rpc/virnetserver.c -+++ b/src/rpc/virnetserver.c -@@ -655,7 +655,7 @@ virNetServerAddServiceActivation(virNetServer *srv, - size_t max_queued_clients, - size_t nrequests_client_max) - { -- int *fds; -+ g_autofree int *fds = NULL; - size_t nfds; - - if (act == NULL) --- -2.39.1 - diff --git a/SOURCES/libvirt-rpc-ensure-temporary-GSource-is-removed-from-client-event-loop.patch b/SOURCES/libvirt-rpc-ensure-temporary-GSource-is-removed-from-client-event-loop.patch deleted file mode 100644 index ce6135f..0000000 --- a/SOURCES/libvirt-rpc-ensure-temporary-GSource-is-removed-from-client-event-loop.patch +++ /dev/null @@ -1,101 +0,0 @@ -From b84d0a699f3976644d3090562ce62ede55335fbc Mon Sep 17 00:00:00 2001 -Message-ID: -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Tue, 30 Apr 2024 11:51:15 +0100 -Subject: [PATCH] rpc: ensure temporary GSource is removed from client event - loop -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Users are seeing periodic segfaults from libvirt client apps, -especially thread heavy ones like virt-manager. A typical -stack trace would end up in the virNetClientIOEventFD method, -with illegal access to stale stack data. eg - -==238721==ERROR: AddressSanitizer: stack-use-after-return on address 0x75cd18709788 at pc 0x75cd3111f907 bp 0x75cd181ff550 sp 0x75cd181ff548 -WRITE of size 4 at 0x75cd18709788 thread T11 - #0 0x75cd3111f906 in virNetClientIOEventFD /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/rpc/virnetclient.c:1634:15 - #1 0x75cd3210d198 (/usr/lib/libglib-2.0.so.0+0x5a198) (BuildId: 0a2311dfbbc6c215dc36f4b6bdd2b4b6fbae55a2) - #2 0x75cd3216c3be (/usr/lib/libglib-2.0.so.0+0xb93be) (BuildId: 0a2311dfbbc6c215dc36f4b6bdd2b4b6fbae55a2) - #3 0x75cd3210ddc6 in g_main_loop_run (/usr/lib/libglib-2.0.so.0+0x5adc6) (BuildId: 0a2311dfbbc6c215dc36f4b6bdd2b4b6fbae55a2) - #4 0x75cd3111a47c in virNetClientIOEventLoop /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/rpc/virnetclient.c:1722:9 - #5 0x75cd3111a47c in virNetClientIO /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/rpc/virnetclient.c:2002:10 - #6 0x75cd3111a47c in virNetClientSendInternal /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/rpc/virnetclient.c:2170:11 - #7 0x75cd311198a8 in virNetClientSendWithReply /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/rpc/virnetclient.c:2198:11 - #8 0x75cd31111653 in virNetClientProgramCall /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/rpc/virnetclientprogram.c:318:9 - #9 0x75cd31241c8f in callFull /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/remote/remote_driver.c:6054:10 - #10 0x75cd31241c8f in call /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/remote/remote_driver.c:6076:12 - #11 0x75cd31241c8f in remoteNetworkGetXMLDesc /usr/src/debug/libvirt/libvirt-10.2.0/build/src/remote/remote_client_bodies.h:5959:9 - #12 0x75cd31410ff7 in virNetworkGetXMLDesc /usr/src/debug/libvirt/libvirt-10.2.0/build/../src/libvirt-network.c:952:15 - -The root cause is a bad assumption in the virNetClientIOEventLoop -method. This method is run by whichever thread currently owns the -buck, and is responsible for handling I/O. Inside a for(;;) loop, -this method creates a temporary GSource, adds it to the event loop -and runs g_main_loop_run(). When I/O is ready, the GSource callback -(virNetClientIOEventFD) will fire and call g_main_loop_quit(), and -return G_SOURCE_REMOVE which results in the temporary GSource being -destroyed. A g_autoptr() will then remove the last reference. - -What was overlooked, is that a second thread can come along and -while it can't enter virNetClientIOEventLoop, it will register an -idle source that uses virNetClientIOWakeup to interrupt the -original thread's 'g_main_loop_run' call. When this happens the -virNetClientIOEventFD callback never runs, and so the temporary -GSource is not destroyed. The g_autoptr() will remove a reference, -but by virtue of still being attached to the event context, there -is an extra reference held causing GSource to be leaked. The -next time 'g_main_loop_run' is called, the original GSource will -trigger its callback, and access data that was allocated on the -stack by the previous thread, and likely SEGV. - -To solve this, the thread calling 'g_main_loop_run' must call -g_source_destroy, immediately upon return, to guarantee that -the temporary GSource is removed. - -CVE-2024-4418 -Reviewed-by: Ján Tomko -Reported-by: Martin Shirokov -Tested-by: Martin Shirokov -Signed-off-by: Daniel P. Berrangé -(cherry picked from commit 8074d64dc2eca846d6a61efe1a9b7428a0ce1dd1) -Signed-off-by: Jiri Denemark ---- - src/rpc/virnetclient.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c -index f526ad89ec..b9490072c3 100644 ---- a/src/rpc/virnetclient.c -+++ b/src/rpc/virnetclient.c -@@ -1664,7 +1664,7 @@ static int virNetClientIOEventLoop(virNetClient *client, - #endif /* !WIN32 */ - int timeout = -1; - virNetMessage *msg = NULL; -- g_autoptr(GSource) G_GNUC_UNUSED source = NULL; -+ g_autoptr(GSource) source = NULL; - GIOCondition ev = 0; - struct virNetClientIOEventData data = { - .client = client, -@@ -1728,6 +1728,18 @@ static int virNetClientIOEventLoop(virNetClient *client, - - g_main_loop_run(client->eventLoop); - -+ /* -+ * If virNetClientIOEventFD ran, this GSource will already be -+ * destroyed due to G_SOURCE_REMOVE. It is harmless to re-destroy -+ * it, since we still own a reference. -+ * -+ * If virNetClientIOWakeup ran, it will have interrupted the -+ * g_main_loop_run call, before virNetClientIOEventFD could -+ * run, and thus the GSource is still registered, and we need -+ * to destroy it since it is referencing stack memory for 'data' -+ */ -+ g_source_destroy(source); -+ - #ifndef WIN32 - ignore_value(pthread_sigmask(SIG_SETMASK, &oldmask, NULL)); - #endif /* !WIN32 */ --- -2.45.1 diff --git a/SOURCES/libvirt-schemas-refactor-out-nodedev-ccw-address-schema.patch b/SOURCES/libvirt-schemas-refactor-out-nodedev-ccw-address-schema.patch deleted file mode 100644 index e26ca09..0000000 --- a/SOURCES/libvirt-schemas-refactor-out-nodedev-ccw-address-schema.patch +++ /dev/null @@ -1,64 +0,0 @@ -From eb17cd2553366491b54c834b00fd953e94ef0bd2 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:14 +0200 -Subject: [PATCH] schemas: refactor out nodedev ccw address schema - -Refactor out nodedev ccw address schema for easy reuse later. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit e9ba2ced0b6bdcf6ed4c4b38d8f3fc63b6fa6d59) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - docs/schemas/nodedev.rng | 22 +++++++++------------- - 1 file changed, 9 insertions(+), 13 deletions(-) - -diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng -index e4733f0804..29515d2d7e 100644 ---- a/docs/schemas/nodedev.rng -+++ b/docs/schemas/nodedev.rng -@@ -653,10 +653,7 @@ - - - -- -- -- ccw -- -+ - - - -@@ -668,19 +665,18 @@ - - - -+ -+ -+ ccw -+ -+ -+ -+ - - - css - -- -- -- -- -- -- -- -- -- -+ - - - --- -2.39.1 - diff --git a/SOURCES/libvirt-security_selinux.c-Relabel-existing-mode-bind-UNIX-sockets.patch b/SOURCES/libvirt-security_selinux.c-Relabel-existing-mode-bind-UNIX-sockets.patch deleted file mode 100644 index 8332ee9..0000000 --- a/SOURCES/libvirt-security_selinux.c-Relabel-existing-mode-bind-UNIX-sockets.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 07fb786e0d17bd395333d276ebbaad42c72ee358 Mon Sep 17 00:00:00 2001 -Message-Id: <07fb786e0d17bd395333d276ebbaad42c72ee358@dist-git> -From: David Michael -Date: Tue, 28 Jun 2022 08:33:41 -0400 -Subject: [PATCH] security_selinux.c: Relabel existing mode="bind" UNIX sockets - -This supports sockets created by libvirt and passed by FD using the -same method as in security_dac.c. - -Signed-off-by: David Michael -Signed-off-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit 9f13f54a6348b54170f7de3595039c99b9da72c7) - -https://bugzilla.redhat.com/show_bug.cgi?id=2101575 - -Signed-off-by: Michal Privoznik ---- - src/security/security_selinux.c | 9 +++++++-- - tests/securityselinuxlabeldata/chardev.txt | 2 +- - 2 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c -index 0952431064..b90e819fd2 100644 ---- a/src/security/security_selinux.c -+++ b/src/security/security_selinux.c -@@ -2545,7 +2545,12 @@ virSecuritySELinuxSetChardevLabel(virSecurityManager *mgr, - break; - - case VIR_DOMAIN_CHR_TYPE_UNIX: -- if (!dev_source->data.nix.listen) { -+ if (!dev_source->data.nix.listen || -+ (dev_source->data.nix.path && -+ virFileExists(dev_source->data.nix.path))) { -+ /* Also label mode='bind' sockets if they exist, -+ * e.g. because they were created by libvirt -+ * and passed via FD */ - if (virSecuritySELinuxSetFilecon(mgr, - dev_source->data.nix.path, - imagelabel, -@@ -2622,7 +2627,7 @@ virSecuritySELinuxRestoreChardevLabel(virSecurityManager *mgr, - case VIR_DOMAIN_CHR_TYPE_UNIX: - if (!dev_source->data.nix.listen) { - if (virSecuritySELinuxRestoreFileLabel(mgr, -- dev_source->data.file.path, -+ dev_source->data.nix.path, - true) < 0) - goto done; - } -diff --git a/tests/securityselinuxlabeldata/chardev.txt b/tests/securityselinuxlabeldata/chardev.txt -index 3f4b6302b9..bdb367f7a5 100644 ---- a/tests/securityselinuxlabeldata/chardev.txt -+++ b/tests/securityselinuxlabeldata/chardev.txt -@@ -2,6 +2,6 @@ - /plain.dev;system_u:object_r:svirt_image_t:s0:c41,c264 - /plain.fifo;system_u:object_r:svirt_image_t:s0:c41,c264 - /nolabel.sock; --/plain.sock; -+/plain.sock;system_u:object_r:svirt_image_t:s0:c41,c264 - /yeslabel.sock;system_u:object_r:svirt_image_t:s0:c41,c264 - /altlabel.sock;system_u:object_r:svirt_image_custom_t:s0:c41,c264 --- -2.35.1 - diff --git a/SOURCES/libvirt-tools-Fix-install_mode-for-some-scripts.patch b/SOURCES/libvirt-tools-Fix-install_mode-for-some-scripts.patch deleted file mode 100644 index 7cea092..0000000 --- a/SOURCES/libvirt-tools-Fix-install_mode-for-some-scripts.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 48f4d21cf73e15e145258bf1d590ca279838168c Mon Sep 17 00:00:00 2001 -Message-Id: <48f4d21cf73e15e145258bf1d590ca279838168c@dist-git> -From: Michal Privoznik -Date: Thu, 8 Dec 2022 08:39:24 +0100 -Subject: [PATCH] tools: Fix install_mode for some scripts - -Scripts from the following list were installed with group write -bit set: virt-xml-validate, virt-pki-validate, -virt-sanlock-cleanup, libvirt-guests.sh. This is very unusual and -in contrast with the way other scripts/binaries are installed. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2151202 -Signed-off-by: Michal Privoznik -Reviewed-by: Peter Krempa -Reviewed-by: Jiri Denemark -(cherry picked from commit e771e32f15ff2b263ca70306d93080541a96792b) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2153688 -Signed-off-by: Michal Privoznik ---- - tools/meson.build | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tools/meson.build b/tools/meson.build -index 2d0aecb90b..7c6e527939 100644 ---- a/tools/meson.build -+++ b/tools/meson.build -@@ -247,7 +247,7 @@ configure_file( - configuration: tools_conf, - install: true, - install_dir: bindir, -- install_mode: 'rwxrwxr-x', -+ install_mode: 'rwxr-xr-x', - ) - - configure_file( -@@ -256,7 +256,7 @@ configure_file( - configuration: tools_conf, - install: true, - install_dir: bindir, -- install_mode: 'rwxrwxr-x', -+ install_mode: 'rwxr-xr-x', - ) - - executable( -@@ -293,7 +293,7 @@ if conf.has('WITH_SANLOCK') - configuration: tools_conf, - install: true, - install_dir: sbindir, -- install_mode: 'rwxrwxr-x', -+ install_mode: 'rwxr-xr-x', - ) - endif - -@@ -304,7 +304,7 @@ if conf.has('WITH_LIBVIRTD') - configuration: tools_conf, - install: true, - install_dir: libexecdir, -- install_mode: 'rwxrwxr-x', -+ install_mode: 'rwxr-xr-x', - ) - - if init_script == 'systemd' --- -2.39.0 - diff --git a/SOURCES/libvirt-util-Fix-error-return-for-virProcessKillPainfullyDelay.patch b/SOURCES/libvirt-util-Fix-error-return-for-virProcessKillPainfullyDelay.patch deleted file mode 100644 index a67483d..0000000 --- a/SOURCES/libvirt-util-Fix-error-return-for-virProcessKillPainfullyDelay.patch +++ /dev/null @@ -1,39 +0,0 @@ -From ffbae27bd15ae9475fd4f0e79b492a7e03bca93e Mon Sep 17 00:00:00 2001 -Message-ID: -From: Jonathon Jongsma -Date: Fri, 22 Sep 2023 14:23:10 -0500 -Subject: [PATCH] util: Fix error return for virProcessKillPainfullyDelay() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit 93af79fb removed a cleanup label in favor of returning error -values directly in certain cases. But the final return value was changed -from -1 to 0. If we get to the end of the function, that means that -we've waited for the process to exit but it still exists. So we should -return -1. The error message was still being set correctly, but we were -returning a success status (0). - -Signed-off-by: Jonathon Jongsma -Reviewed-by: Ján Tomko -(cherry picked from commit 51a074e74c6ef2fb95e6f53d41315e3f1e00be77) -https://issues.redhat.com/browse/RHEL-36064 ---- - src/util/virprocess.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/util/virprocess.c b/src/util/virprocess.c -index b559a4257e..f3933a2d16 100644 ---- a/src/util/virprocess.c -+++ b/src/util/virprocess.c -@@ -471,7 +471,7 @@ virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay, boo - _("Failed to terminate process %lld with SIG%s"), - (long long)pid, signame); - -- return 0; -+ return -1; - } - - --- -2.45.1 diff --git a/SOURCES/libvirt-util-add-ccw-device-address-parsing-into-virccw.patch b/SOURCES/libvirt-util-add-ccw-device-address-parsing-into-virccw.patch deleted file mode 100644 index a778644..0000000 --- a/SOURCES/libvirt-util-add-ccw-device-address-parsing-into-virccw.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 6d9fc3310cedf321f54530c0652998b67979e613 Mon Sep 17 00:00:00 2001 -Message-Id: <6d9fc3310cedf321f54530c0652998b67979e613@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:09 +0200 -Subject: [PATCH] util: add ccw device address parsing into virccw - -Add virCCWDeviceAddressParseFromString and use it in nodedev udev. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 8d52f99f0b55ddfee4e0c00e756ca6c01250107d) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/libvirt_private.syms | 1 + - src/node_device/node_device_udev.c | 8 +++++--- - src/util/virccw.c | 18 ++++++++++++++++++ - src/util/virccw.h | 5 +++++ - 4 files changed, 29 insertions(+), 3 deletions(-) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 44b551fb60..6f1292e0c4 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -1904,6 +1904,7 @@ virCCWDeviceAddressAsString; - virCCWDeviceAddressEqual; - virCCWDeviceAddressIncrement; - virCCWDeviceAddressIsValid; -+virCCWDeviceAddressParseFromString; - - - # util/vircgroup.h -diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c -index a9e8bf10da..ffcb3e8640 100644 ---- a/src/node_device/node_device_udev.c -+++ b/src/node_device/node_device_udev.c -@@ -36,6 +36,7 @@ - #include "viruuid.h" - #include "virbuffer.h" - #include "virfile.h" -+#include "virccw.h" - #include "virpci.h" - #include "virpidfile.h" - #include "virstring.h" -@@ -1090,9 +1091,10 @@ udevGetCCWAddress(const char *sysfs_path, - char *p; - - if ((p = strrchr(sysfs_path, '/')) == NULL || -- virStrToLong_ui(p + 1, &p, 16, &data->ccw_dev.cssid) < 0 || p == NULL || -- virStrToLong_ui(p + 1, &p, 16, &data->ccw_dev.ssid) < 0 || p == NULL || -- virStrToLong_ui(p + 1, &p, 16, &data->ccw_dev.devno) < 0) { -+ virCCWDeviceAddressParseFromString(p + 1, -+ &data->ccw_dev.cssid, -+ &data->ccw_dev.ssid, -+ &data->ccw_dev.devno) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the CCW address from sysfs path: '%s'"), - sysfs_path); -diff --git a/src/util/virccw.c b/src/util/virccw.c -index e2785bd9ab..33df1c2428 100644 ---- a/src/util/virccw.c -+++ b/src/util/virccw.c -@@ -20,6 +20,7 @@ - - #include - #include "virccw.h" -+#include "virstring.h" - - - bool -@@ -60,3 +61,20 @@ virCCWDeviceAddressIncrement(virCCWDeviceAddress *addr) - *addr = ccwaddr; - return 0; - } -+ -+int -+virCCWDeviceAddressParseFromString(const char *address, -+ unsigned int *cssid, -+ unsigned int *ssid, -+ unsigned int *devno) -+{ -+ char *p; -+ -+ if (address == NULL || virStrToLong_ui(address, &p, 16, cssid) < 0 || -+ p == NULL || virStrToLong_ui(p + 1, &p, 16, ssid) < 0 || -+ p == NULL || virStrToLong_ui(p + 1, &p, 16, devno) < 0) { -+ return -1; -+ } -+ -+ return 0; -+} -diff --git a/src/util/virccw.h b/src/util/virccw.h -index aebbd4ab6d..df0273bcac 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -42,3 +42,8 @@ bool virCCWDeviceAddressEqual(virCCWDeviceAddress *addr1, - char* virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - ATTRIBUTE_NONNULL(1); - int virCCWDeviceAddressIncrement(virCCWDeviceAddress *addr); -+ -+int virCCWDeviceAddressParseFromString(const char *address, -+ unsigned int *cssid, -+ unsigned int *ssid, -+ unsigned int *devno); --- -2.39.1 - diff --git a/SOURCES/libvirt-util-add-virCCWDeviceAddressFromString-to-virccw.patch b/SOURCES/libvirt-util-add-virCCWDeviceAddressFromString-to-virccw.patch deleted file mode 100644 index 5d2e729..0000000 --- a/SOURCES/libvirt-util-add-virCCWDeviceAddressFromString-to-virccw.patch +++ /dev/null @@ -1,107 +0,0 @@ -From e5e849999b1d615c6a371839aeead37275599cf0 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:10 +0200 -Subject: [PATCH] util: add virCCWDeviceAddressFromString to virccw - -Add a method to parse a ccw device address from a string. - -Signed-off-by: Boris Fiuczynski -Signed-off-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit 9453eb458a5c3ed6687188233d7e389c3e20c266) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Conflicts: - po/POTFILES (file is called POTFILES.in in downstream) -Signed-off-by: Thomas Huth ---- - po/POTFILES.in | 1 + - src/libvirt_private.syms | 1 + - src/util/virccw.c | 23 +++++++++++++++++++++++ - src/util/virccw.h | 3 +++ - 4 files changed, 28 insertions(+) - -diff --git a/po/POTFILES.in b/po/POTFILES.in -index bf0a3b3529..327e20ec11 100644 ---- a/po/POTFILES.in -+++ b/po/POTFILES.in -@@ -246,6 +246,7 @@ - @SRCDIR@src/util/virauth.c - @SRCDIR@src/util/virauthconfig.c - @SRCDIR@src/util/virbitmap.c -+@SRCDIR@src/util/virccw.c - @SRCDIR@src/util/vircgroup.c - @SRCDIR@src/util/vircgroupbackend.c - @SRCDIR@src/util/vircgroupbackend.h -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 6f1292e0c4..7c558ad364 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -1902,6 +1902,7 @@ virBufferVasprintf; - # util/virccw.h - virCCWDeviceAddressAsString; - virCCWDeviceAddressEqual; -+virCCWDeviceAddressFromString; - virCCWDeviceAddressIncrement; - virCCWDeviceAddressIsValid; - virCCWDeviceAddressParseFromString; -diff --git a/src/util/virccw.c b/src/util/virccw.c -index 33df1c2428..d741743050 100644 ---- a/src/util/virccw.c -+++ b/src/util/virccw.c -@@ -20,8 +20,11 @@ - - #include - #include "virccw.h" -+#include "virerror.h" - #include "virstring.h" - -+#define VIR_FROM_THIS VIR_FROM_NONE -+ - - bool - virCCWDeviceAddressIsValid(virCCWDeviceAddress *addr) -@@ -49,6 +52,26 @@ virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - return g_strdup_printf(VIR_CCW_DEVICE_ADDRESS_FMT, addr->cssid, addr->ssid, addr->devno); - } - -+virCCWDeviceAddress * -+virCCWDeviceAddressFromString(const char *address) -+{ -+ g_autofree virCCWDeviceAddress *ccw = NULL; -+ -+ ccw = g_new0(virCCWDeviceAddress, 1); -+ -+ if (virCCWDeviceAddressParseFromString(address, -+ &ccw->cssid, -+ &ccw->ssid, -+ &ccw->devno) < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ _("Failed to parse CCW address '%s'"), -+ address); -+ return NULL; -+ } -+ -+ return g_steal_pointer(&ccw); -+} -+ - int - virCCWDeviceAddressIncrement(virCCWDeviceAddress *addr) - { -diff --git a/src/util/virccw.h b/src/util/virccw.h -index df0273bcac..80cc716811 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -41,6 +41,9 @@ bool virCCWDeviceAddressEqual(virCCWDeviceAddress *addr1, - - char* virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - ATTRIBUTE_NONNULL(1); -+virCCWDeviceAddress *virCCWDeviceAddressFromString(const char *address) -+ ATTRIBUTE_NONNULL(1); -+ - int virCCWDeviceAddressIncrement(virCCWDeviceAddress *addr); - - int virCCWDeviceAddressParseFromString(const char *address, --- -2.39.1 - diff --git a/SOURCES/libvirt-util-json-Split-out-array-strinlist-conversion-from-virJSONValueObjectGetStringArray.patch b/SOURCES/libvirt-util-json-Split-out-array-strinlist-conversion-from-virJSONValueObjectGetStringArray.patch deleted file mode 100644 index 11146b6..0000000 --- a/SOURCES/libvirt-util-json-Split-out-array-strinlist-conversion-from-virJSONValueObjectGetStringArray.patch +++ /dev/null @@ -1,124 +0,0 @@ -From b7d9527c9d9cc782933a5b852869cbd10e370a3a Mon Sep 17 00:00:00 2001 -Message-Id: -From: Peter Krempa -Date: Thu, 1 Dec 2022 13:32:07 +0100 -Subject: [PATCH] util: json: Split out array->strinlist conversion from - virJSONValueObjectGetStringArray - -Introduce virJSONValueArrayToStringList which does only the conversion -from an array to a stringlist. - -This will allow refactoring the callers to be more careful in case when -they want to handle the existance of the member in the parent object -differently. - -Signed-off-by: Peter Krempa -Reviewed-by: Michal Privoznik -(cherry picked from commit 6765bdeaf7e9cbdb4c39d47f3b77fb28a498408a) -https://bugzilla.redhat.com/show_bug.cgi?id=2149752 ---- - src/libvirt_private.syms | 1 + - src/util/virjson.c | 43 ++++++++++++++++++++++------------------ - src/util/virjson.h | 2 ++ - 3 files changed, 27 insertions(+), 19 deletions(-) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 5b7a056151..fa734dfd33 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -2513,6 +2513,7 @@ virJSONValueArrayForeachSteal; - virJSONValueArrayGet; - virJSONValueArraySize; - virJSONValueArraySteal; -+virJSONValueArrayToStringList; - virJSONValueCopy; - virJSONValueFree; - virJSONValueFromString; -diff --git a/src/util/virjson.c b/src/util/virjson.c -index 6e13e97e15..5f1565107d 100644 ---- a/src/util/virjson.c -+++ b/src/util/virjson.c -@@ -1312,10 +1312,7 @@ virJSONValueObjectStealObject(virJSONValue *object, - char ** - virJSONValueObjectGetStringArray(virJSONValue *object, const char *key) - { -- g_auto(GStrv) ret = NULL; - virJSONValue *data; -- size_t n; -- size_t i; - - data = virJSONValueObjectGetArray(object, key); - if (!data) { -@@ -1325,32 +1322,40 @@ virJSONValueObjectGetStringArray(virJSONValue *object, const char *key) - return NULL; - } - -- n = virJSONValueArraySize(data); -- ret = g_new0(char *, n + 1); -+ return virJSONValueArrayToStringList(data); -+} -+ -+ -+/** -+ * virJSONValueArrayToStringList: -+ * @data: a JSON array containing strings to convert -+ * -+ * Converts @data a JSON array containing strings to a NULL-terminated string -+ * list. @data must be a JSON array. In case @data is doesn't contain only -+ * strings an error is reported. -+ */ -+char ** -+virJSONValueArrayToStringList(virJSONValue *data) -+{ -+ size_t n = virJSONValueArraySize(data); -+ g_auto(GStrv) ret = g_new0(char *, n + 1); -+ size_t i; -+ - for (i = 0; i < n; i++) { - virJSONValue *child = virJSONValueArrayGet(data, i); -- const char *tmp; - -- if (!child) { -- virReportError(VIR_ERR_INTERNAL_ERROR, -- _("%s array element is missing item %zu"), -- key, i); -+ if (!child || -+ !(ret[i] = g_strdup(virJSONValueGetString(child)))) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -+ _("JSON string array contains non-string element")); - return NULL; - } -- -- if (!(tmp = virJSONValueGetString(child))) { -- virReportError(VIR_ERR_INTERNAL_ERROR, -- _("%s array element does not contain a string"), -- key); -- return NULL; -- } -- -- ret[i] = g_strdup(tmp); - } - - return g_steal_pointer(&ret); - } - -+ - /** - * virJSONValueObjectForeachKeyValue: - * @object: JSON object to iterate -diff --git a/src/util/virjson.h b/src/util/virjson.h -index aced48a538..c9f83ab2bc 100644 ---- a/src/util/virjson.h -+++ b/src/util/virjson.h -@@ -172,6 +172,8 @@ virJSONValueObjectGetString(virJSONValue *object, - char ** - virJSONValueObjectGetStringArray(virJSONValue *object, - const char *key); -+char ** -+virJSONValueArrayToStringList(virJSONValue *data); - const char * - virJSONValueObjectGetStringOrNumber(virJSONValue *object, - const char *key); --- -2.39.0 - diff --git a/SOURCES/libvirt-util-make-reuse-of-ccw-device-address-format-constant.patch b/SOURCES/libvirt-util-make-reuse-of-ccw-device-address-format-constant.patch deleted file mode 100644 index 89b1ac8..0000000 --- a/SOURCES/libvirt-util-make-reuse-of-ccw-device-address-format-constant.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 94a416e1b67c72c69c19944937acc619503484b3 Mon Sep 17 00:00:00 2001 -Message-Id: <94a416e1b67c72c69c19944937acc619503484b3@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:03 +0200 -Subject: [PATCH] util: make reuse of ccw device address format constant - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit b41163005c0874b1d4809523227cd1921f4852d2) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/device_conf.h | 1 - - src/qemu/qemu_command.c | 2 +- - src/util/virccw.c | 2 +- - src/util/virccw.h | 2 ++ - 4 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h -index 60d90bbf19..950d333e2e 100644 ---- a/src/conf/device_conf.h -+++ b/src/conf/device_conf.h -@@ -202,7 +202,6 @@ int virDomainDeviceCCWAddressParseXML(xmlNodePtr node, - virCCWDeviceAddress *addr); - bool virDomainDeviceCCWAddressEqual(virCCWDeviceAddress *addr1, - virCCWDeviceAddress *addr2); --#define VIR_CCW_DEVICE_ADDRESS_FMT "%x.%x.%04x" - - int virDomainDeviceDriveAddressParseXML(xmlNodePtr node, - virDomainDeviceDriveAddress *addr); -diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c -index d23af97e0c..a7855d3370 100644 ---- a/src/qemu/qemu_command.c -+++ b/src/qemu/qemu_command.c -@@ -613,7 +613,7 @@ qemuBuildDeviceAddressProps(virJSONValue *props, - return 0; - - case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW: { -- g_autofree char *devno = g_strdup_printf("%x.%x.%04x", -+ g_autofree char *devno = g_strdup_printf(VIR_CCW_DEVICE_ADDRESS_FMT, - info->addr.ccw.cssid, - info->addr.ccw.ssid, - info->addr.ccw.devno); -diff --git a/src/util/virccw.c b/src/util/virccw.c -index 409287b380..5a19d3a112 100644 ---- a/src/util/virccw.c -+++ b/src/util/virccw.c -@@ -25,5 +25,5 @@ - char* - virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - { -- return g_strdup_printf("%x.%x.%04x", addr->cssid, addr->ssid, addr->devno); -+ return g_strdup_printf(VIR_CCW_DEVICE_ADDRESS_FMT, addr->cssid, addr->ssid, addr->devno); - } -diff --git a/src/util/virccw.h b/src/util/virccw.h -index 21a03406fa..127359c299 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -22,6 +22,8 @@ - - #include "internal.h" - -+#define VIR_CCW_DEVICE_ADDRESS_FMT "%x.%x.%04x" -+ - typedef struct _virCCWDeviceAddress virCCWDeviceAddress; - struct _virCCWDeviceAddress { - unsigned int cssid; --- -2.39.1 - diff --git a/SOURCES/libvirt-util-refactor-ccw-address-constants-into-virccw.patch b/SOURCES/libvirt-util-refactor-ccw-address-constants-into-virccw.patch deleted file mode 100644 index 6ee54f7..0000000 --- a/SOURCES/libvirt-util-refactor-ccw-address-constants-into-virccw.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 58d2890501a5a58eefa0500e1340112bc2264a70 Mon Sep 17 00:00:00 2001 -Message-Id: <58d2890501a5a58eefa0500e1340112bc2264a70@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:04 +0200 -Subject: [PATCH] util: refactor ccw address constants into virccw - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 5fe90d471a312a5c94668f8ed4bb397fdc894c58) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/device_conf.c | 6 +++--- - src/conf/device_conf.h | 4 ---- - src/conf/domain_addr.c | 2 +- - src/util/virccw.h | 3 +++ - 4 files changed, 7 insertions(+), 8 deletions(-) - -diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c -index 92b908b2e6..bdc9219f84 100644 ---- a/src/conf/device_conf.c -+++ b/src/conf/device_conf.c -@@ -261,9 +261,9 @@ virPCIDeviceAddressFormat(virBuffer *buf, - bool - virDomainDeviceCCWAddressIsValid(virCCWDeviceAddress *addr) - { -- return addr->cssid <= VIR_DOMAIN_DEVICE_CCW_MAX_CSSID && -- addr->ssid <= VIR_DOMAIN_DEVICE_CCW_MAX_SSID && -- addr->devno <= VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO; -+ return addr->cssid <= VIR_CCW_DEVICE_MAX_CSSID && -+ addr->ssid <= VIR_CCW_DEVICE_MAX_SSID && -+ addr->devno <= VIR_CCW_DEVICE_MAX_DEVNO; - } - - int -diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h -index 950d333e2e..5c4b7b2f8e 100644 ---- a/src/conf/device_conf.h -+++ b/src/conf/device_conf.h -@@ -70,10 +70,6 @@ struct _virDomainDeviceVirtioSerialAddress { - unsigned int port; - }; - --#define VIR_DOMAIN_DEVICE_CCW_MAX_CSSID 254 --#define VIR_DOMAIN_DEVICE_CCW_MAX_SSID 3 --#define VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO 65535 -- - typedef struct _virDomainDeviceCcidAddress virDomainDeviceCcidAddress; - struct _virDomainDeviceCcidAddress { - unsigned int controller; -diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c -index bf51ef5e5a..655f3cc09e 100644 ---- a/src/conf/domain_addr.c -+++ b/src/conf/domain_addr.c -@@ -1292,7 +1292,7 @@ virDomainCCWAddressIncrement(virCCWDeviceAddress *addr) - virCCWDeviceAddress ccwaddr = *addr; - - /* We are not touching subchannel sets and channel subsystems */ -- if (++ccwaddr.devno > VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO) -+ if (++ccwaddr.devno > VIR_CCW_DEVICE_MAX_DEVNO) - return -1; - - *addr = ccwaddr; -diff --git a/src/util/virccw.h b/src/util/virccw.h -index 127359c299..c3a47127f1 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -22,6 +22,9 @@ - - #include "internal.h" - -+#define VIR_CCW_DEVICE_MAX_CSSID 254 -+#define VIR_CCW_DEVICE_MAX_SSID 3 -+#define VIR_CCW_DEVICE_MAX_DEVNO 65535 - #define VIR_CCW_DEVICE_ADDRESS_FMT "%x.%x.%04x" - - typedef struct _virCCWDeviceAddress virCCWDeviceAddress; --- -2.39.1 - diff --git a/SOURCES/libvirt-util-refactor-virDomainCCWAddressAsString-into-virccw.patch b/SOURCES/libvirt-util-refactor-virDomainCCWAddressAsString-into-virccw.patch deleted file mode 100644 index 1aa7b98..0000000 --- a/SOURCES/libvirt-util-refactor-virDomainCCWAddressAsString-into-virccw.patch +++ /dev/null @@ -1,194 +0,0 @@ -From 531244b8147f8972e56b6ba2c7ecf04c072f296a Mon Sep 17 00:00:00 2001 -Message-Id: <531244b8147f8972e56b6ba2c7ecf04c072f296a@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:02 +0200 -Subject: [PATCH] util: refactor virDomainCCWAddressAsString into virccw - -Move virDomainCCWAddressAsString into virccw and rename method as -virCCWDeviceAddressAsString. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 1df0a1986978dcb7d1fc139f14adbc4f85b1851f) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/domain_addr.c | 12 +++--------- - src/conf/domain_addr.h | 3 --- - src/conf/domain_conf.c | 2 +- - src/libvirt_private.syms | 5 ++++- - src/node_device/node_device_driver.c | 2 +- - src/util/meson.build | 1 + - src/util/virccw.c | 29 ++++++++++++++++++++++++++++ - src/util/virccw.h | 3 +++ - 8 files changed, 42 insertions(+), 15 deletions(-) - create mode 100644 src/util/virccw.c - -diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c -index d584d3b8a8..bf51ef5e5a 100644 ---- a/src/conf/domain_addr.c -+++ b/src/conf/domain_addr.c -@@ -1286,12 +1286,6 @@ virDomainPCIAddressSetAllMulti(virDomainDef *def) - } - - --char* --virDomainCCWAddressAsString(virCCWDeviceAddress *addr) --{ -- return g_strdup_printf("%x.%x.%04x", addr->cssid, addr->ssid, addr->devno); --} -- - static int - virDomainCCWAddressIncrement(virCCWDeviceAddress *addr) - { -@@ -1317,7 +1311,7 @@ virDomainCCWAddressAssign(virDomainDeviceInfo *dev, - return 0; - - if (!autoassign && dev->addr.ccw.assigned) { -- if (!(addr = virDomainCCWAddressAsString(&dev->addr.ccw))) -+ if (!(addr = virCCWDeviceAddressAsString(&dev->addr.ccw))) - return -1; - - if (virHashLookup(addrs->defined, addr)) { -@@ -1327,7 +1321,7 @@ virDomainCCWAddressAssign(virDomainDeviceInfo *dev, - return -1; - } - } else if (autoassign && !dev->addr.ccw.assigned) { -- if (!(addr = virDomainCCWAddressAsString(&addrs->next))) -+ if (!(addr = virCCWDeviceAddressAsString(&addrs->next))) - return -1; - - while (virHashLookup(addrs->defined, addr)) { -@@ -1337,7 +1331,7 @@ virDomainCCWAddressAssign(virDomainDeviceInfo *dev, - return -1; - } - VIR_FREE(addr); -- if (!(addr = virDomainCCWAddressAsString(&addrs->next))) -+ if (!(addr = virCCWDeviceAddressAsString(&addrs->next))) - return -1; - } - dev->addr.ccw = addrs->next; -diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h -index c8d069e07e..a67851c327 100644 ---- a/src/conf/domain_addr.h -+++ b/src/conf/domain_addr.h -@@ -205,9 +205,6 @@ int virDomainCCWAddressAssign(virDomainDeviceInfo *dev, - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); - void virDomainCCWAddressSetFree(virDomainCCWAddressSet *addrs); - --char* virDomainCCWAddressAsString(virCCWDeviceAddress *addr) -- ATTRIBUTE_NONNULL(1); -- - virDomainCCWAddressSet * - virDomainCCWAddressSetCreateFromDomain(virDomainDef *def) - ATTRIBUTE_NONNULL(1); -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index ad3bd56da0..17383fc878 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -15793,7 +15793,7 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net) - alias = net->info.alias; - - if (CCWAddrSpecified) -- addr = virDomainCCWAddressAsString(&net->info.addr.ccw); -+ addr = virCCWDeviceAddressAsString(&net->info.addr.ccw); - else if (PCIAddrSpecified) - addr = virPCIDeviceAddressAsString(&net->info.addr.pci); - else -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 568b0f34a1..e8d3edb0fe 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -147,7 +147,6 @@ virPCIDeviceAddressParseXML; - - # conf/domain_addr.h - virDomainCCWAddressAssign; --virDomainCCWAddressAsString; - virDomainCCWAddressSetCreateFromDomain; - virDomainCCWAddressSetFree; - virDomainPCIAddressBusIsFullyReserved; -@@ -1902,6 +1901,10 @@ virBufferUse; - virBufferVasprintf; - - -+# util/virccw.h -+virCCWDeviceAddressAsString; -+ -+ - # util/vircgroup.h - virCgroupAddMachineProcess; - virCgroupAddProcess; -diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c -index b0abf59618..e6ab4bb94c 100644 ---- a/src/node_device/node_device_driver.c -+++ b/src/node_device/node_device_driver.c -@@ -682,7 +682,7 @@ nodeDeviceObjFormatAddress(virNodeDeviceObj *obj) - .devno = caps->data.ccw_dev.devno - }; - -- addr = virDomainCCWAddressAsString(&ccw_addr); -+ addr = virCCWDeviceAddressAsString(&ccw_addr); - break; - } - -diff --git a/src/util/meson.build b/src/util/meson.build -index 24350a3e67..13ed105798 100644 ---- a/src/util/meson.build -+++ b/src/util/meson.build -@@ -9,6 +9,7 @@ util_sources = [ - 'virbitmap.c', - 'virbpf.c', - 'virbuffer.c', -+ 'virccw.c', - 'vircgroup.c', - 'vircgroupbackend.c', - 'vircgroupv1.c', -diff --git a/src/util/virccw.c b/src/util/virccw.c -new file mode 100644 -index 0000000000..409287b380 ---- /dev/null -+++ b/src/util/virccw.c -@@ -0,0 +1,29 @@ -+/* -+ * virccw.c: helper APIs for managing host CCW devices -+ * -+ * Copyright (C) 2022 IBM Corporation -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library. If not, see -+ * . -+ */ -+ -+#include -+#include "virccw.h" -+ -+ -+char* -+virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) -+{ -+ return g_strdup_printf("%x.%x.%04x", addr->cssid, addr->ssid, addr->devno); -+} -diff --git a/src/util/virccw.h b/src/util/virccw.h -index 701e13284b..21a03406fa 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -29,3 +29,6 @@ struct _virCCWDeviceAddress { - unsigned int devno; - bool assigned; - }; -+ -+char* virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) -+ ATTRIBUTE_NONNULL(1); --- -2.39.1 - diff --git a/SOURCES/libvirt-util-refactor-virDomainCCWAddressIncrement-into-virccw.patch b/SOURCES/libvirt-util-refactor-virDomainCCWAddressIncrement-into-virccw.patch deleted file mode 100644 index 0af50a1..0000000 --- a/SOURCES/libvirt-util-refactor-virDomainCCWAddressIncrement-into-virccw.patch +++ /dev/null @@ -1,100 +0,0 @@ -From fcb45d357cc3b6e9ee413014e21de1ab2d20273f Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:05 +0200 -Subject: [PATCH] util: refactor virDomainCCWAddressIncrement into virccw - -Refactor virDomainCCWAddressIncrement into virccw and rename method as -virCCWDeviceAddressIncrement. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit be1e16ed1161173b07f2e8f20f2ca3294ac49406) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/domain_addr.c | 16 +--------------- - src/libvirt_private.syms | 1 + - src/util/virccw.c | 13 +++++++++++++ - src/util/virccw.h | 1 + - 4 files changed, 16 insertions(+), 15 deletions(-) - -diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c -index 655f3cc09e..b04ab0628b 100644 ---- a/src/conf/domain_addr.c -+++ b/src/conf/domain_addr.c -@@ -1286,20 +1286,6 @@ virDomainPCIAddressSetAllMulti(virDomainDef *def) - } - - --static int --virDomainCCWAddressIncrement(virCCWDeviceAddress *addr) --{ -- virCCWDeviceAddress ccwaddr = *addr; -- -- /* We are not touching subchannel sets and channel subsystems */ -- if (++ccwaddr.devno > VIR_CCW_DEVICE_MAX_DEVNO) -- return -1; -- -- *addr = ccwaddr; -- return 0; --} -- -- - int - virDomainCCWAddressAssign(virDomainDeviceInfo *dev, - virDomainCCWAddressSet *addrs, -@@ -1325,7 +1311,7 @@ virDomainCCWAddressAssign(virDomainDeviceInfo *dev, - return -1; - - while (virHashLookup(addrs->defined, addr)) { -- if (virDomainCCWAddressIncrement(&addrs->next) < 0) { -+ if (virCCWDeviceAddressIncrement(&addrs->next) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("There are no more free CCW devnos.")); - return -1; -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index e8d3edb0fe..eb56292b34 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -1903,6 +1903,7 @@ virBufferVasprintf; - - # util/virccw.h - virCCWDeviceAddressAsString; -+virCCWDeviceAddressIncrement; - - - # util/vircgroup.h -diff --git a/src/util/virccw.c b/src/util/virccw.c -index 5a19d3a112..d14d432414 100644 ---- a/src/util/virccw.c -+++ b/src/util/virccw.c -@@ -27,3 +27,16 @@ virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - { - return g_strdup_printf(VIR_CCW_DEVICE_ADDRESS_FMT, addr->cssid, addr->ssid, addr->devno); - } -+ -+int -+virCCWDeviceAddressIncrement(virCCWDeviceAddress *addr) -+{ -+ virCCWDeviceAddress ccwaddr = *addr; -+ -+ /* We are not touching subchannel sets and channel subsystems */ -+ if (++ccwaddr.devno > VIR_CCW_DEVICE_MAX_DEVNO) -+ return -1; -+ -+ *addr = ccwaddr; -+ return 0; -+} -diff --git a/src/util/virccw.h b/src/util/virccw.h -index c3a47127f1..4c48c9605e 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -37,3 +37,4 @@ struct _virCCWDeviceAddress { - - char* virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - ATTRIBUTE_NONNULL(1); -+int virCCWDeviceAddressIncrement(virCCWDeviceAddress *addr); --- -2.39.1 - diff --git a/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddress-into-virccw.h.patch b/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddress-into-virccw.h.patch deleted file mode 100644 index 03afcc6..0000000 --- a/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddress-into-virccw.h.patch +++ /dev/null @@ -1,299 +0,0 @@ -From a259f2fc77dac6fa2fd7910d4c96d231b0ea3182 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:01 +0200 -Subject: [PATCH] util: refactor virDomainDeviceCCWAddress into virccw.h - -Refactor ccw data structure virDomainDeviceCCWAddress into util virccw.h -and rename it as virCCWDeviceAddress. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 45a8e3988f7b087b3b721e74ce5e6b5658b2b424) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/device_conf.c | 8 +++---- - src/conf/device_conf.h | 19 ++++++----------- - src/conf/domain_addr.c | 6 +++--- - src/conf/domain_addr.h | 4 ++-- - src/conf/domain_conf.c | 6 +++--- - src/conf/domain_conf.h | 6 +++--- - src/node_device/node_device_driver.c | 2 +- - src/qemu/qemu_agent.c | 4 ++-- - src/qemu/qemu_agent.h | 2 +- - src/util/virccw.h | 31 ++++++++++++++++++++++++++++ - 10 files changed, 56 insertions(+), 32 deletions(-) - create mode 100644 src/util/virccw.h - -diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c -index cb523d3a0d..92b908b2e6 100644 ---- a/src/conf/device_conf.c -+++ b/src/conf/device_conf.c -@@ -259,7 +259,7 @@ virPCIDeviceAddressFormat(virBuffer *buf, - } - - bool --virDomainDeviceCCWAddressIsValid(virDomainDeviceCCWAddress *addr) -+virDomainDeviceCCWAddressIsValid(virCCWDeviceAddress *addr) - { - return addr->cssid <= VIR_DOMAIN_DEVICE_CCW_MAX_CSSID && - addr->ssid <= VIR_DOMAIN_DEVICE_CCW_MAX_SSID && -@@ -268,7 +268,7 @@ virDomainDeviceCCWAddressIsValid(virDomainDeviceCCWAddress *addr) - - int - virDomainDeviceCCWAddressParseXML(xmlNodePtr node, -- virDomainDeviceCCWAddress *addr) -+ virCCWDeviceAddress *addr) - { - int cssid; - int ssid; -@@ -307,8 +307,8 @@ virDomainDeviceCCWAddressParseXML(xmlNodePtr node, - } - - bool --virDomainDeviceCCWAddressEqual(virDomainDeviceCCWAddress *addr1, -- virDomainDeviceCCWAddress *addr2) -+virDomainDeviceCCWAddressEqual(virCCWDeviceAddress *addr1, -+ virCCWDeviceAddress *addr2) - { - if (addr1->cssid == addr2->cssid && - addr1->ssid == addr2->ssid && -diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h -index b6b710d313..60d90bbf19 100644 ---- a/src/conf/device_conf.h -+++ b/src/conf/device_conf.h -@@ -27,6 +27,7 @@ - #include "internal.h" - #include "virthread.h" - #include "virbuffer.h" -+#include "virccw.h" - #include "virpci.h" - #include "virnetdev.h" - #include "virenum.h" -@@ -73,14 +74,6 @@ struct _virDomainDeviceVirtioSerialAddress { - #define VIR_DOMAIN_DEVICE_CCW_MAX_SSID 3 - #define VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO 65535 - --typedef struct _virDomainDeviceCCWAddress virDomainDeviceCCWAddress; --struct _virDomainDeviceCCWAddress { -- unsigned int cssid; -- unsigned int ssid; -- unsigned int devno; -- bool assigned; --}; -- - typedef struct _virDomainDeviceCcidAddress virDomainDeviceCcidAddress; - struct _virDomainDeviceCcidAddress { - unsigned int controller; -@@ -136,7 +129,7 @@ struct _virDomainDeviceInfo { - virDomainDeviceCcidAddress ccid; - virDomainDeviceUSBAddress usb; - virDomainDeviceSpaprVioAddress spaprvio; -- virDomainDeviceCCWAddress ccw; -+ virCCWDeviceAddress ccw; - virDomainDeviceISAAddress isa; - virDomainDeviceDimmAddress dimm; - } addr; -@@ -204,11 +197,11 @@ void virPCIDeviceAddressFormat(virBuffer *buf, - virPCIDeviceAddress addr, - bool includeTypeInAddr); - --bool virDomainDeviceCCWAddressIsValid(virDomainDeviceCCWAddress *addr); -+bool virDomainDeviceCCWAddressIsValid(virCCWDeviceAddress *addr); - int virDomainDeviceCCWAddressParseXML(xmlNodePtr node, -- virDomainDeviceCCWAddress *addr); --bool virDomainDeviceCCWAddressEqual(virDomainDeviceCCWAddress *addr1, -- virDomainDeviceCCWAddress *addr2); -+ virCCWDeviceAddress *addr); -+bool virDomainDeviceCCWAddressEqual(virCCWDeviceAddress *addr1, -+ virCCWDeviceAddress *addr2); - #define VIR_CCW_DEVICE_ADDRESS_FMT "%x.%x.%04x" - - int virDomainDeviceDriveAddressParseXML(xmlNodePtr node, -diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c -index 49745ba881..d584d3b8a8 100644 ---- a/src/conf/domain_addr.c -+++ b/src/conf/domain_addr.c -@@ -1287,15 +1287,15 @@ virDomainPCIAddressSetAllMulti(virDomainDef *def) - - - char* --virDomainCCWAddressAsString(virDomainDeviceCCWAddress *addr) -+virDomainCCWAddressAsString(virCCWDeviceAddress *addr) - { - return g_strdup_printf("%x.%x.%04x", addr->cssid, addr->ssid, addr->devno); - } - - static int --virDomainCCWAddressIncrement(virDomainDeviceCCWAddress *addr) -+virDomainCCWAddressIncrement(virCCWDeviceAddress *addr) - { -- virDomainDeviceCCWAddress ccwaddr = *addr; -+ virCCWDeviceAddress ccwaddr = *addr; - - /* We are not touching subchannel sets and channel subsystems */ - if (++ccwaddr.devno > VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO) -diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h -index 814b556024..c8d069e07e 100644 ---- a/src/conf/domain_addr.h -+++ b/src/conf/domain_addr.h -@@ -195,7 +195,7 @@ void virDomainPCIAddressSetAllMulti(virDomainDef *def) - - struct _virDomainCCWAddressSet { - GHashTable *defined; -- virDomainDeviceCCWAddress next; -+ virCCWDeviceAddress next; - }; - typedef struct _virDomainCCWAddressSet virDomainCCWAddressSet; - -@@ -205,7 +205,7 @@ int virDomainCCWAddressAssign(virDomainDeviceInfo *dev, - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); - void virDomainCCWAddressSetFree(virDomainCCWAddressSet *addrs); - --char* virDomainCCWAddressAsString(virDomainDeviceCCWAddress *addr) -+char* virDomainCCWAddressAsString(virCCWDeviceAddress *addr) - ATTRIBUTE_NONNULL(1); - - virDomainCCWAddressSet * -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index 95afd9226e..ad3bd56da0 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -15541,7 +15541,7 @@ virDomainDiskControllerMatch(int controller_type, int disk_bus) - int - virDomainDiskIndexByAddress(virDomainDef *def, - virPCIDeviceAddress *pci_address, -- virDomainDeviceCCWAddress *ccw_addr, -+ virCCWDeviceAddress *ccw_addr, - unsigned int bus, unsigned int target, - unsigned int unit) - { -@@ -15585,7 +15585,7 @@ virDomainDiskIndexByAddress(virDomainDef *def, - virDomainDiskDef * - virDomainDiskByAddress(virDomainDef *def, - virPCIDeviceAddress *pci_address, -- virDomainDeviceCCWAddress *ccw_addr, -+ virCCWDeviceAddress *ccw_addr, - unsigned int bus, - unsigned int target, - unsigned int unit) -@@ -16184,7 +16184,7 @@ virDomainControllerFindByType(virDomainDef *def, - - int - virDomainControllerFindByCCWAddress(virDomainDef *def, -- virDomainDeviceCCWAddress *addr) -+ virCCWDeviceAddress *addr) - { - size_t i; - -diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h -index 45976beb2b..930af36868 100644 ---- a/src/conf/domain_conf.h -+++ b/src/conf/domain_conf.h -@@ -3622,12 +3622,12 @@ void virDomainRNGDefFree(virDomainRNGDef *def); - - int virDomainDiskIndexByAddress(virDomainDef *def, - virPCIDeviceAddress *pci_controller, -- virDomainDeviceCCWAddress *ccw_addr, -+ virCCWDeviceAddress *ccw_addr, - unsigned int bus, unsigned int target, - unsigned int unit); - virDomainDiskDef *virDomainDiskByAddress(virDomainDef *def, - virPCIDeviceAddress *pci_controller, -- virDomainDeviceCCWAddress *ccw_addr, -+ virCCWDeviceAddress *ccw_addr, - unsigned int bus, - unsigned int target, - unsigned int unit); -@@ -3712,7 +3712,7 @@ void virDomainControllerInsertPreAlloced(virDomainDef *def, - int virDomainControllerFind(const virDomainDef *def, int type, int idx); - int virDomainControllerFindByType(virDomainDef *def, int type); - int virDomainControllerFindByCCWAddress(virDomainDef *def, -- virDomainDeviceCCWAddress *addr); -+ virCCWDeviceAddress *addr); - int virDomainControllerFindByPCIAddress(virDomainDef *def, - virPCIDeviceAddress *addr); - int virDomainControllerFindUnusedIndex(virDomainDef const *def, int type); -diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c -index d19ed7d948..b0abf59618 100644 ---- a/src/node_device/node_device_driver.c -+++ b/src/node_device/node_device_driver.c -@@ -676,7 +676,7 @@ nodeDeviceObjFormatAddress(virNodeDeviceObj *obj) - } - - case VIR_NODE_DEV_CAP_CSS_DEV: { -- virDomainDeviceCCWAddress ccw_addr = { -+ virCCWDeviceAddress ccw_addr = { - .cssid = caps->data.ccw_dev.cssid, - .ssid = caps->data.ccw_dev.ssid, - .devno = caps->data.ccw_dev.devno -diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c -index 8a55044c9e..db844148a6 100644 ---- a/src/qemu/qemu_agent.c -+++ b/src/qemu/qemu_agent.c -@@ -1769,9 +1769,9 @@ qemuAgentGetDiskAddress(virJSONValue *json) - GET_DISK_ADDR(pci, &addr->pci_controller.function, "function"); - - if ((ccw = virJSONValueObjectGet(json, "ccw-address"))) { -- g_autofree virDomainDeviceCCWAddress *ccw_addr = NULL; -+ g_autofree virCCWDeviceAddress *ccw_addr = NULL; - -- ccw_addr = g_new0(virDomainDeviceCCWAddress, 1); -+ ccw_addr = g_new0(virCCWDeviceAddress, 1); - - GET_DISK_ADDR(ccw, &ccw_addr->cssid, "cssid"); - if (ccw_addr->cssid == 0) /* Guest CSSID 0 is 0xfe on host */ -diff --git a/src/qemu/qemu_agent.h b/src/qemu/qemu_agent.h -index 862f6b0a95..c07d8507ba 100644 ---- a/src/qemu/qemu_agent.h -+++ b/src/qemu/qemu_agent.h -@@ -72,7 +72,7 @@ struct _qemuAgentDiskAddress { - unsigned int target; - unsigned int unit; - char *devnode; -- virDomainDeviceCCWAddress *ccw_addr; -+ virCCWDeviceAddress *ccw_addr; - }; - void qemuAgentDiskAddressFree(qemuAgentDiskAddress *addr); - G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuAgentDiskAddress, qemuAgentDiskAddressFree); -diff --git a/src/util/virccw.h b/src/util/virccw.h -new file mode 100644 -index 0000000000..701e13284b ---- /dev/null -+++ b/src/util/virccw.h -@@ -0,0 +1,31 @@ -+/* -+ * virccw.h: helper APIs for managing host CCW devices -+ * -+ * Copyright (C) 2022 IBM Corporation -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library. If not, see -+ * . -+ */ -+ -+#pragma once -+ -+#include "internal.h" -+ -+typedef struct _virCCWDeviceAddress virCCWDeviceAddress; -+struct _virCCWDeviceAddress { -+ unsigned int cssid; -+ unsigned int ssid; -+ unsigned int devno; -+ bool assigned; -+}; --- -2.39.1 - diff --git a/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressEqual-into-virccw.patch b/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressEqual-into-virccw.patch deleted file mode 100644 index 4ab216e..0000000 --- a/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressEqual-into-virccw.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 71f605aed8cb1f27eef21953005b3251e41e1925 Mon Sep 17 00:00:00 2001 -Message-Id: <71f605aed8cb1f27eef21953005b3251e41e1925@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:07 +0200 -Subject: [PATCH] util: refactor virDomainDeviceCCWAddressEqual into virccw - -Refactor virDomainDeviceCCWAddressEqual into virccw and rename method as -virCCWDeviceAddressEqual. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 784b87603517bd920910ccfb69daae8980a21d8d) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/device_conf.c | 12 ------------ - src/conf/device_conf.h | 2 -- - src/conf/domain_conf.c | 8 ++++---- - src/libvirt_private.syms | 2 +- - src/util/virccw.c | 12 ++++++++++++ - src/util/virccw.h | 2 ++ - 6 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c -index 2385e81994..958e2f43cc 100644 ---- a/src/conf/device_conf.c -+++ b/src/conf/device_conf.c -@@ -298,18 +298,6 @@ virDomainDeviceCCWAddressParseXML(xmlNodePtr node, - return 0; - } - --bool --virDomainDeviceCCWAddressEqual(virCCWDeviceAddress *addr1, -- virCCWDeviceAddress *addr2) --{ -- if (addr1->cssid == addr2->cssid && -- addr1->ssid == addr2->ssid && -- addr1->devno == addr2->devno) { -- return true; -- } -- return false; --} -- - int - virDomainDeviceDriveAddressParseXML(xmlNodePtr node, - virDomainDeviceDriveAddress *addr) -diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h -index 0ed6991c23..01e2edccc9 100644 ---- a/src/conf/device_conf.h -+++ b/src/conf/device_conf.h -@@ -195,8 +195,6 @@ void virPCIDeviceAddressFormat(virBuffer *buf, - - int virDomainDeviceCCWAddressParseXML(xmlNodePtr node, - virCCWDeviceAddress *addr); --bool virDomainDeviceCCWAddressEqual(virCCWDeviceAddress *addr1, -- virCCWDeviceAddress *addr2); - - int virDomainDeviceDriveAddressParseXML(xmlNodePtr node, - virDomainDeviceDriveAddress *addr); -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index 17383fc878..1e1c7f01b1 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -15566,7 +15566,7 @@ virDomainDiskIndexByAddress(virDomainDef *def, - return i; - if (vdisk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW && - ccw_addr && -- virDomainDeviceCCWAddressEqual(&vdisk->info.addr.ccw, ccw_addr)) { -+ virCCWDeviceAddressEqual(&vdisk->info.addr.ccw, ccw_addr)) { - return i; - } - if (vdisk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) { -@@ -15755,8 +15755,8 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net) - continue; - - if (CCWAddrSpecified && -- !virDomainDeviceCCWAddressEqual(&def->nets[i]->info.addr.ccw, -- &net->info.addr.ccw)) -+ !virCCWDeviceAddressEqual(&def->nets[i]->info.addr.ccw, -+ &net->info.addr.ccw)) - continue; - - if (net->info.alias && def->nets[i]->info.alias && -@@ -16192,7 +16192,7 @@ virDomainControllerFindByCCWAddress(virDomainDef *def, - virDomainDeviceInfo *info = &def->controllers[i]->info; - - if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW && -- virDomainDeviceCCWAddressEqual(&info->addr.ccw, addr)) -+ virCCWDeviceAddressEqual(&info->addr.ccw, addr)) - return i; - } - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 9ed367d427..0d3ee4c20a 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -131,7 +131,6 @@ virDeviceInfoPCIAddressIsWanted; - virDomainDeviceAddressIsValid; - virDomainDeviceAddressTypeToString; - virDomainDeviceCcidAddressParseXML; --virDomainDeviceCCWAddressEqual; - virDomainDeviceCCWAddressParseXML; - virDomainDeviceDriveAddressParseXML; - virDomainDeviceInfoAddressIsEqual; -@@ -1902,6 +1901,7 @@ virBufferVasprintf; - - # util/virccw.h - virCCWDeviceAddressAsString; -+virCCWDeviceAddressEqual; - virCCWDeviceAddressIncrement; - virCCWDeviceAddressIsValid; - -diff --git a/src/util/virccw.c b/src/util/virccw.c -index c3dfda2613..e2785bd9ab 100644 ---- a/src/util/virccw.c -+++ b/src/util/virccw.c -@@ -30,6 +30,18 @@ virCCWDeviceAddressIsValid(virCCWDeviceAddress *addr) - addr->devno <= VIR_CCW_DEVICE_MAX_DEVNO; - } - -+bool -+virCCWDeviceAddressEqual(virCCWDeviceAddress *addr1, -+ virCCWDeviceAddress *addr2) -+{ -+ if (addr1->cssid == addr2->cssid && -+ addr1->ssid == addr2->ssid && -+ addr1->devno == addr2->devno) { -+ return true; -+ } -+ return false; -+} -+ - char* - virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - { -diff --git a/src/util/virccw.h b/src/util/virccw.h -index c4daaff7b3..aebbd4ab6d 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -36,6 +36,8 @@ struct _virCCWDeviceAddress { - }; - - bool virCCWDeviceAddressIsValid(virCCWDeviceAddress *addr); -+bool virCCWDeviceAddressEqual(virCCWDeviceAddress *addr1, -+ virCCWDeviceAddress *addr2); - - char* virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - ATTRIBUTE_NONNULL(1); --- -2.39.1 - diff --git a/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressIsValid-into-virccw.patch b/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressIsValid-into-virccw.patch deleted file mode 100644 index 5529038..0000000 --- a/SOURCES/libvirt-util-refactor-virDomainDeviceCCWAddressIsValid-into-virccw.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 3de657416726803a56fb5b025396bccdd8bfa955 Mon Sep 17 00:00:00 2001 -Message-Id: <3de657416726803a56fb5b025396bccdd8bfa955@dist-git> -From: Boris Fiuczynski -Date: Fri, 13 May 2022 12:31:06 +0200 -Subject: [PATCH] util: refactor virDomainDeviceCCWAddressIsValid into virccw - -Refactor virDomainDeviceCCWAddressIsValid into virccw and rename method -as virCCWDeviceAddressIsValid. - -Signed-off-by: Boris Fiuczynski -Reviewed-by: Michal Privoznik -(cherry picked from commit 38756ce5ba17d31597a3470d07708a21bf460c9b) -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 -Signed-off-by: Thomas Huth ---- - src/conf/device_conf.c | 12 ++---------- - src/conf/device_conf.h | 1 - - src/libvirt_private.syms | 2 +- - src/util/virccw.c | 8 ++++++++ - src/util/virccw.h | 2 ++ - 5 files changed, 13 insertions(+), 12 deletions(-) - -diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c -index bdc9219f84..2385e81994 100644 ---- a/src/conf/device_conf.c -+++ b/src/conf/device_conf.c -@@ -258,14 +258,6 @@ virPCIDeviceAddressFormat(virBuffer *buf, - addr.function); - } - --bool --virDomainDeviceCCWAddressIsValid(virCCWDeviceAddress *addr) --{ -- return addr->cssid <= VIR_CCW_DEVICE_MAX_CSSID && -- addr->ssid <= VIR_CCW_DEVICE_MAX_SSID && -- addr->devno <= VIR_CCW_DEVICE_MAX_DEVNO; --} -- - int - virDomainDeviceCCWAddressParseXML(xmlNodePtr node, - virCCWDeviceAddress *addr) -@@ -288,7 +280,7 @@ virDomainDeviceCCWAddressParseXML(xmlNodePtr node, - &addr->devno)) < 0) - return -1; - -- if (!virDomainDeviceCCWAddressIsValid(addr)) { -+ if (!virCCWDeviceAddressIsValid(addr)) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid specification for virtio ccw address: cssid='0x%x' ssid='0x%x' devno='0x%04x'"), - addr->cssid, addr->ssid, addr->devno); -@@ -453,7 +445,7 @@ virDomainDeviceAddressIsValid(virDomainDeviceInfo *info, - return true; - - case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW: -- return virDomainDeviceCCWAddressIsValid(&info->addr.ccw); -+ return virCCWDeviceAddressIsValid(&info->addr.ccw); - - case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_USB: - return true; -diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h -index 5c4b7b2f8e..0ed6991c23 100644 ---- a/src/conf/device_conf.h -+++ b/src/conf/device_conf.h -@@ -193,7 +193,6 @@ void virPCIDeviceAddressFormat(virBuffer *buf, - virPCIDeviceAddress addr, - bool includeTypeInAddr); - --bool virDomainDeviceCCWAddressIsValid(virCCWDeviceAddress *addr); - int virDomainDeviceCCWAddressParseXML(xmlNodePtr node, - virCCWDeviceAddress *addr); - bool virDomainDeviceCCWAddressEqual(virCCWDeviceAddress *addr1, -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index eb56292b34..9ed367d427 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -132,7 +132,6 @@ virDomainDeviceAddressIsValid; - virDomainDeviceAddressTypeToString; - virDomainDeviceCcidAddressParseXML; - virDomainDeviceCCWAddressEqual; --virDomainDeviceCCWAddressIsValid; - virDomainDeviceCCWAddressParseXML; - virDomainDeviceDriveAddressParseXML; - virDomainDeviceInfoAddressIsEqual; -@@ -1904,6 +1903,7 @@ virBufferVasprintf; - # util/virccw.h - virCCWDeviceAddressAsString; - virCCWDeviceAddressIncrement; -+virCCWDeviceAddressIsValid; - - - # util/vircgroup.h -diff --git a/src/util/virccw.c b/src/util/virccw.c -index d14d432414..c3dfda2613 100644 ---- a/src/util/virccw.c -+++ b/src/util/virccw.c -@@ -22,6 +22,14 @@ - #include "virccw.h" - - -+bool -+virCCWDeviceAddressIsValid(virCCWDeviceAddress *addr) -+{ -+ return addr->cssid <= VIR_CCW_DEVICE_MAX_CSSID && -+ addr->ssid <= VIR_CCW_DEVICE_MAX_SSID && -+ addr->devno <= VIR_CCW_DEVICE_MAX_DEVNO; -+} -+ - char* - virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - { -diff --git a/src/util/virccw.h b/src/util/virccw.h -index 4c48c9605e..c4daaff7b3 100644 ---- a/src/util/virccw.h -+++ b/src/util/virccw.h -@@ -35,6 +35,8 @@ struct _virCCWDeviceAddress { - bool assigned; - }; - -+bool virCCWDeviceAddressIsValid(virCCWDeviceAddress *addr); -+ - char* virCCWDeviceAddressAsString(virCCWDeviceAddress *addr) - ATTRIBUTE_NONNULL(1); - int virCCWDeviceAddressIncrement(virCCWDeviceAddress *addr); --- -2.39.1 - diff --git a/SOURCES/libvirt-virDomainDiskDefValidate-Improve-error-messages-for-startupPolicy-checks.patch b/SOURCES/libvirt-virDomainDiskDefValidate-Improve-error-messages-for-startupPolicy-checks.patch deleted file mode 100644 index a6076a1..0000000 --- a/SOURCES/libvirt-virDomainDiskDefValidate-Improve-error-messages-for-startupPolicy-checks.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 41247c87fd47f2e55825d62c697da810ba5062f5 Mon Sep 17 00:00:00 2001 -Message-Id: <41247c87fd47f2e55825d62c697da810ba5062f5@dist-git> -From: Peter Krempa -Date: Tue, 14 Jun 2022 13:13:48 +0200 -Subject: [PATCH] virDomainDiskDefValidate: Improve error messages for - 'startupPolicy' checks -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Remove linebreak and mention the attribute name. Also prepare the error -messages for future by substituting the type of offending access. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit 9a480737c8adf92c332aa850c5269191ceb04eb9) -https://bugzilla.redhat.com/show_bug.cgi?id=2095758 ---- - src/conf/domain_validate.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c -index a4271f1247..452742e67c 100644 ---- a/src/conf/domain_validate.c -+++ b/src/conf/domain_validate.c -@@ -778,9 +778,9 @@ virDomainDiskDefValidate(const virDomainDef *def, - if (disk->startupPolicy != VIR_DOMAIN_STARTUP_POLICY_DEFAULT) { - if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) { - virReportError(VIR_ERR_XML_ERROR, -- _("Setting disk %s is not allowed for " -- "disk of network type"), -- virDomainStartupPolicyTypeToString(disk->startupPolicy)); -+ _("disk startupPolicy '%s' is not allowed for disk of '%s' type"), -+ virDomainStartupPolicyTypeToString(disk->startupPolicy), -+ virStorageTypeToString(disk->src->type)); - return -1; - } - -@@ -788,8 +788,7 @@ virDomainDiskDefValidate(const virDomainDef *def, - disk->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY && - disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_REQUISITE) { - virReportError(VIR_ERR_XML_ERROR, "%s", -- _("Setting disk 'requisite' is allowed only for " -- "cdrom or floppy")); -+ _("disk startupPolicy 'requisite' is allowed only for cdrom or floppy")); - return -1; - } - } --- -2.35.1 - diff --git a/SOURCES/libvirt-virDomainDiskDefValidateStartupPolicy-Validate-disk-type-better.patch b/SOURCES/libvirt-virDomainDiskDefValidateStartupPolicy-Validate-disk-type-better.patch deleted file mode 100644 index f57195b..0000000 --- a/SOURCES/libvirt-virDomainDiskDefValidateStartupPolicy-Validate-disk-type-better.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 26daf647925213a05509cc302d9151fe4525febb Mon Sep 17 00:00:00 2001 -Message-Id: <26daf647925213a05509cc302d9151fe4525febb@dist-git> -From: Peter Krempa -Date: Tue, 14 Jun 2022 14:07:47 +0200 -Subject: [PATCH] virDomainDiskDefValidateStartupPolicy: Validate disk type - better -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Our startup policy checkers work only for local paths, so disk sources -such as NVMe, or vhost-user can't be used with startup policy. - -Unfortunately the validation did not catch these cases. Fix it. - -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit b90d0f0a1e4ee52c828fb683c14c14e241e6fcbb) -https://bugzilla.redhat.com/show_bug.cgi?id=2095758 ---- - src/conf/domain_validate.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c -index bfff7339ef..55759af9f8 100644 ---- a/src/conf/domain_validate.c -+++ b/src/conf/domain_validate.c -@@ -604,7 +604,10 @@ virDomainDiskDefValidateStartupPolicy(const virDomainDiskDef *disk) - if (disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_DEFAULT) - return 0; - -- if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) { -+ /* We want to allow any startup policy for un-translated _TYPE_VOLUME disks. -+ * virStorageSourceGetActualType returns _TYPE_VOLUME in such case */ -+ if (virStorageSourceGetActualType(disk->src) != VIR_STORAGE_TYPE_VOLUME && -+ !virStorageSourceIsLocalStorage(disk->src)) { - virReportError(VIR_ERR_XML_ERROR, - _("disk startupPolicy '%s' is not allowed for disk of '%s' type"), - virDomainStartupPolicyTypeToString(disk->startupPolicy), --- -2.35.1 - diff --git a/SOURCES/libvirt-virDomainDiskTranslateSourcePool-Fix-check-of-startupPolicy-definition.patch b/SOURCES/libvirt-virDomainDiskTranslateSourcePool-Fix-check-of-startupPolicy-definition.patch deleted file mode 100644 index d8ab75e..0000000 --- a/SOURCES/libvirt-virDomainDiskTranslateSourcePool-Fix-check-of-startupPolicy-definition.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 2ea89fb18aa9d2dac1e651869736fede7a2ec434 Mon Sep 17 00:00:00 2001 -Message-Id: <2ea89fb18aa9d2dac1e651869736fede7a2ec434@dist-git> -From: Peter Krempa -Date: Tue, 14 Jun 2022 14:21:33 +0200 -Subject: [PATCH] virDomainDiskTranslateSourcePool: Fix check of - 'startupPolicy' definition -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The check was historically done only for _TYPE_VOLUME disks, but -refactors to allow _TYPE_VOLUME disks in the backing chain caused a -regression where we'd reject startupPolicy also for _TYPE_BLOCK disks -which historically worked well. - -Fix it by using the 'virDomainDiskDefValidateStartupPolicy' helper and -use it only when the top level image is a _TYPE_VOLUME as in other cases -it was already validated. This also allows _TYPE_BLOCK volumes to use -startup policy. - -Fixes: 37f01262eed9f37dd5eb7de8b83edd2fea741054 -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2095758 -Signed-off-by: Peter Krempa -Reviewed-by: Ján Tomko -(cherry picked from commit ed8984306e1cd44c424fda3ed412a4177dd7b84d) ---- - src/conf/domain_conf.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c -index 805a15848e..92510973e6 100644 ---- a/src/conf/domain_conf.c -+++ b/src/conf/domain_conf.c -@@ -31311,13 +31311,13 @@ virDomainDiskTranslateSourcePool(virDomainDiskDef *def) - - if (virDomainStorageSourceTranslateSourcePool(n, conn) < 0) - return -1; -- } - -- if (def->startupPolicy != 0 && -- virStorageSourceGetActualType(def->src) != VIR_STORAGE_TYPE_FILE) { -- virReportError(VIR_ERR_XML_ERROR, "%s", -- _("'startupPolicy' is only valid for 'file' type volume")); -- return -1; -+ /* The validity of 'startupPolicy' setting is checked only for the top -+ * level image. For any other subsequent images we honour it only if -+ * possible */ -+ if (n == def->src && -+ virDomainDiskDefValidateStartupPolicy(def) < 0) -+ return -1; - } - - return 0; --- -2.35.1 - diff --git a/SOURCES/libvirt-vircpi-Add-PCIe-5.0-and-6.0-link-speeds.patch b/SOURCES/libvirt-vircpi-Add-PCIe-5.0-and-6.0-link-speeds.patch deleted file mode 100644 index 0efd778..0000000 --- a/SOURCES/libvirt-vircpi-Add-PCIe-5.0-and-6.0-link-speeds.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 0a192b453da043cfb3679a07b55c1628b56efdde Mon Sep 17 00:00:00 2001 -Message-Id: <0a192b453da043cfb3679a07b55c1628b56efdde@dist-git> -From: Michal Privoznik -Date: Fri, 8 Jul 2022 14:29:32 +0200 -Subject: [PATCH] vircpi: Add PCIe 5.0 and 6.0 link speeds -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The PCIe 5.0 and PCIe 6.0 standards define new link speeds: -32GT/s and 64GT/s, respectively. Update our internal enum to -include these new speeds. Otherwise we format incorrect XML: - - - - - - -Like all "good" specifications, these are also locked behind a -login portal. But we can look at pciutils' source code: [1] and -[2]. - -1: https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git/commit/ls-caps.c?id=caca31a0eea41c7b051705704c1158fddc02fbd2 -2: https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git/commit/ls-caps.c?id=5bdf63b6b1bc35b59c4b3f47f7ca83ca1868155b - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2105231 -Signed-off-by: Michal Privoznik -Reviewed-by: Ján Tomko -(cherry picked from commit d33c2a9e2f933b31f8e96e9938c237bdffe27f84) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2168116 -Signed-off-by: Michal Privoznik ---- - src/util/virpci.c | 2 +- - src/util/virpci.h | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/util/virpci.c b/src/util/virpci.c -index 0d476cd8b4..4949d1a3d4 100644 ---- a/src/util/virpci.c -+++ b/src/util/virpci.c -@@ -46,7 +46,7 @@ VIR_LOG_INIT("util.pci"); - - VIR_ENUM_IMPL(virPCIELinkSpeed, - VIR_PCIE_LINK_SPEED_LAST, -- "", "2.5", "5", "8", "16", -+ "", "2.5", "5", "8", "16", "32", "64" - ); - - VIR_ENUM_IMPL(virPCIStubDriver, -diff --git a/src/util/virpci.h b/src/util/virpci.h -index b9b9cd7b34..4d9193f24e 100644 ---- a/src/util/virpci.h -+++ b/src/util/virpci.h -@@ -83,6 +83,8 @@ typedef enum { - VIR_PCIE_LINK_SPEED_5, - VIR_PCIE_LINK_SPEED_8, - VIR_PCIE_LINK_SPEED_16, -+ VIR_PCIE_LINK_SPEED_32, -+ VIR_PCIE_LINK_SPEED_64, - VIR_PCIE_LINK_SPEED_LAST - } virPCIELinkSpeed; - --- -2.39.1 - diff --git a/SOURCES/libvirt-virnuma-Avoid-integer-overflow-in-virNumaGetPages.patch b/SOURCES/libvirt-virnuma-Avoid-integer-overflow-in-virNumaGetPages.patch deleted file mode 100644 index 4d114a1..0000000 --- a/SOURCES/libvirt-virnuma-Avoid-integer-overflow-in-virNumaGetPages.patch +++ /dev/null @@ -1,68 +0,0 @@ -From f3ae3ac1807549c1eb4cc5a0286047ff019e14a0 Mon Sep 17 00:00:00 2001 -Message-ID: -From: Michal Privoznik -Date: Fri, 24 Nov 2023 11:59:32 +0100 -Subject: [PATCH] virnuma: Avoid integer overflow in virNumaGetPages() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -On systems with humongous pages (16GiB) and 32bit int it's easy -to hit integer overflow in virNumaGetPages(). What happens is, -inside of virNumaGetPages() as we process hugepages for given -NUMA node (e.g. in order to produce capabilities XML), we keep a -sum of sizes of pools in an ULL variable (huge_page_sum). In each -iteration, the variable is incremented by 1024 * page_size * -page_avail. Now, page_size is just an uint, so we have: - - ULL += U * U * ULL; - -and because of associativity, U * U is computed first and since -we have two operands of the same type, no type expansion happens. -But this means, for humongous pages (like 16GiB) the -multiplication overflows. - -Therefore, move the multiplication out of the loop. This helps in -two ways: - -1) now we have ULL += U * ULL; which expands the uint in - multiplication, - -2) it saves couple of CPU cycles. - -Resolves: https://issues.redhat.com/browse/RHEL-16749 -Signed-off-by: Michal Privoznik -Reviewed-by: Ján Tomko -(cherry picked from commit 9694d1ca6a4ef7a37ac20249eb8b85c1bb48ef6b) -Signed-off-by: Michal Privoznik ---- - src/util/virnuma.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/util/virnuma.c b/src/util/virnuma.c -index 7c892d6267..e0938867f9 100644 ---- a/src/util/virnuma.c -+++ b/src/util/virnuma.c -@@ -806,9 +806,7 @@ virNumaGetPages(int node, - tmp_free[ntmp] = page_free; - ntmp++; - -- /* page_size is in kibibytes while we want huge_page_sum -- * in just bytes. */ -- huge_page_sum += 1024 * page_size * page_avail; -+ huge_page_sum += page_size * page_avail; - } - - if (direrr < 0) -@@ -819,6 +817,9 @@ virNumaGetPages(int node, - VIR_REALLOC_N(tmp_avail, ntmp + 1); - VIR_REALLOC_N(tmp_free, ntmp + 1); - -+ /* page_size is in kibibytes while we want huge_page_sum in just bytes. */ -+ huge_page_sum *= 1024; -+ - if (virNumaGetPageInfo(node, system_page_size, huge_page_sum, - &tmp_avail[ntmp], &tmp_free[ntmp]) < 0) - return -1; --- -2.43.0 diff --git a/SOURCES/libvirt-virpci-Resolve-leak-in-virPCIVirtualFunctionList-cleanup.patch b/SOURCES/libvirt-virpci-Resolve-leak-in-virPCIVirtualFunctionList-cleanup.patch deleted file mode 100644 index ffc4a36..0000000 --- a/SOURCES/libvirt-virpci-Resolve-leak-in-virPCIVirtualFunctionList-cleanup.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0e91f4dc214d01e9d9537b1111ce67010530fd20 Mon Sep 17 00:00:00 2001 -Message-Id: <0e91f4dc214d01e9d9537b1111ce67010530fd20@dist-git> -From: Tim Shearer -Date: Mon, 1 May 2023 13:15:48 +0000 -Subject: [PATCH] virpci: Resolve leak in virPCIVirtualFunctionList cleanup -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Repeatedly querying an SR-IOV PCI device's capabilities exposes a -memory leak caused by a failure to free the virPCIVirtualFunction -array within the parent struct's g_autoptr cleanup. - -Valgrind output after getting a single interface's XML description -1000 times: - -==325982== 256,000 bytes in 1,000 blocks are definitely lost in loss record 2,634 of 2,635 -==325982== at 0x4C3C096: realloc (vg_replace_malloc.c:1437) -==325982== by 0x59D952D: g_realloc (in /usr/lib64/libglib-2.0.so.0.5600.4) -==325982== by 0x4EE1F52: virReallocN (viralloc.c:52) -==325982== by 0x4EE1FB7: virExpandN (viralloc.c:78) -==325982== by 0x4EE219A: virInsertElementInternal (viralloc.c:183) -==325982== by 0x4EE23B2: virAppendElement (viralloc.c:288) -==325982== by 0x4F65D85: virPCIGetVirtualFunctionsFull (virpci.c:2389) -==325982== by 0x4F65753: virPCIGetVirtualFunctions (virpci.c:2256) -==325982== by 0x505CB75: virNodeDeviceGetPCISRIOVCaps (node_device_conf.c:2969) -==325982== by 0x505D181: virNodeDeviceGetPCIDynamicCaps (node_device_conf.c:3099) -==325982== by 0x505BC4E: virNodeDeviceUpdateCaps (node_device_conf.c:2677) -==325982== by 0x260FCBB2: nodeDeviceGetXMLDesc (node_device_driver.c:355) - -Signed-off-by: Tim Shearer -Reviewed-by: Ján Tomko -(cherry picked from commit 6425a311b8ad19d6f9c0b315bf1d722551ea3585) - -https://bugzilla.redhat.com/show_bug.cgi?id=2196351 -https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2023-2700 - -Signed-off-by: Ján Tomko ---- - src/util/virpci.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/util/virpci.c b/src/util/virpci.c -index 4949d1a3d4..2714d11a7d 100644 ---- a/src/util/virpci.c -+++ b/src/util/virpci.c -@@ -2255,6 +2255,7 @@ virPCIVirtualFunctionListFree(virPCIVirtualFunctionList *list) - g_free(list->functions[i].ifname); - } - -+ g_free(list->functions); - g_free(list); - } - --- -2.40.1 diff --git a/SOURCES/libvirt-virpidfile-Add-virPidFileReadPathIfLocked-func.patch b/SOURCES/libvirt-virpidfile-Add-virPidFileReadPathIfLocked-func.patch deleted file mode 100644 index b3b154f..0000000 --- a/SOURCES/libvirt-virpidfile-Add-virPidFileReadPathIfLocked-func.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9d0247153a70ab1909d0690ec9b7f4d20e8cb602 Mon Sep 17 00:00:00 2001 -Message-Id: <9d0247153a70ab1909d0690ec9b7f4d20e8cb602@dist-git> -From: Vasiliy Ulyanov -Date: Wed, 2 Feb 2022 17:28:15 +0100 -Subject: [PATCH] virpidfile: Add virPidFileReadPathIfLocked func - -The function will attempt to read a pid from @path, and store it in -@pid. The @pid will only be set, however, if @path is locked by -virFileLock() at byte 0 and the pid in @path is running. - -Signed-off-by: Vasiliy Ulyanov -Signed-off-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit 013ab22f79d1345daf6b2778ca498acb16939011) -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152188 -Signed-off-by: Michal Privoznik ---- - src/libvirt_private.syms | 1 + - src/util/virpidfile.c | 35 +++++++++++++++++++++++++++++++++++ - src/util/virpidfile.h | 2 ++ - 3 files changed, 38 insertions(+) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index fa734dfd33..568b0f34a1 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -3061,6 +3061,7 @@ virPidFileRead; - virPidFileReadIfAlive; - virPidFileReadPath; - virPidFileReadPathIfAlive; -+virPidFileReadPathIfLocked; - virPidFileRelease; - virPidFileReleasePath; - virPidFileWrite; -diff --git a/src/util/virpidfile.c b/src/util/virpidfile.c -index 7069f8343d..9d194f7336 100644 ---- a/src/util/virpidfile.c -+++ b/src/util/virpidfile.c -@@ -302,6 +302,41 @@ int virPidFileReadIfAlive(const char *dir, - return 0; - } - -+/** -+ * virPidFileReadPathIfLocked: -+ * @path: path to pidfile -+ * @pid: variable to return pid in -+ * -+ * This will attempt to read a pid from @path, and store it in -+ * @pid. The @pid will only be set, however, if the pid in @path -+ * is running, and @path is locked by virFileLock() at byte 0 -+ * (which is exactly what virCommandSetPidFile() results in). -+ * This adds protection against returning a stale pid. -+ * -+ * Returns -1 upon error, or zero on successful -+ * reading of the pidfile. If @path is not locked -+ * or if the PID was not still alive, zero will -+ * be returned, but @pid will be set to -1. -+ */ -+int virPidFileReadPathIfLocked(const char *path, pid_t *pid) -+{ -+ VIR_AUTOCLOSE fd = -1; -+ -+ if ((fd = open(path, O_RDWR)) < 0) -+ return -1; -+ -+ if (virFileLock(fd, false, 0, 1, false) >= 0) { -+ /* The file isn't locked. PID is stale. */ -+ *pid = -1; -+ return 0; -+ } -+ -+ if (virPidFileReadPathIfAlive(path, pid, NULL) < 0) -+ return -1; -+ -+ return 0; -+} -+ - - int virPidFileDeletePath(const char *pidfile) - { -diff --git a/src/util/virpidfile.h b/src/util/virpidfile.h -index fd8013c41e..e84542f298 100644 ---- a/src/util/virpidfile.h -+++ b/src/util/virpidfile.h -@@ -48,6 +48,8 @@ int virPidFileReadIfAlive(const char *dir, - const char *name, - pid_t *pid, - const char *binpath) G_GNUC_WARN_UNUSED_RESULT; -+int virPidFileReadPathIfLocked(const char *path, -+ pid_t *pid) G_GNUC_WARN_UNUSED_RESULT; - - int virPidFileDeletePath(const char *path); - int virPidFileDelete(const char *dir, --- -2.39.0 - diff --git a/SOURCES/libvirt-virsh-Add-support-for-VIR_MIGRATE_ZEROCOPY-flag.patch b/SOURCES/libvirt-virsh-Add-support-for-VIR_MIGRATE_ZEROCOPY-flag.patch deleted file mode 100644 index c16422a..0000000 --- a/SOURCES/libvirt-virsh-Add-support-for-VIR_MIGRATE_ZEROCOPY-flag.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 20c1c86f96dd7293734888ef6f8b75c11cda5fae Mon Sep 17 00:00:00 2001 -Message-Id: <20c1c86f96dd7293734888ef6f8b75c11cda5fae@dist-git> -From: Jiri Denemark -Date: Wed, 22 Jun 2022 16:36:53 +0200 -Subject: [PATCH] virsh: Add support for VIR_MIGRATE_ZEROCOPY flag -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jiri Denemark -Reviewed-by: Ján Tomko -(cherry picked from commit efa3baeae70fbdf4ab032ca485cb9272ee96bd50) - -https://bugzilla.redhat.com/show_bug.cgi?id=2089433 - -Conflicts: - docs/manpages/virsh.rst - tools/virsh-domain.c - - post-copy recovery not backported - -Signed-off-by: Jiri Denemark ---- - docs/manpages/virsh.rst | 8 +++++++- - tools/virsh-domain.c | 7 +++++++ - 2 files changed, 14 insertions(+), 1 deletion(-) - -diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst -index dd534c10cb..d24e7774a6 100644 ---- a/docs/manpages/virsh.rst -+++ b/docs/manpages/virsh.rst -@@ -3225,7 +3225,8 @@ migrate - migrate [--live] [--offline] [--direct] [--p2p [--tunnelled]] - [--persistent] [--undefinesource] [--suspend] [--copy-storage-all] - [--copy-storage-inc] [--change-protection] [--unsafe] [--verbose] -- [--rdma-pin-all] [--abort-on-error] [--postcopy] [--postcopy-after-precopy] -+ [--rdma-pin-all] [--abort-on-error] [--postcopy] -+ [--postcopy-after-precopy] [--zerocopy] - domain desturi [migrateuri] [graphicsuri] [listen-address] [dname] - [--timeout seconds [--timeout-suspend | --timeout-postcopy]] - [--xml file] [--migrate-disks disk-list] [--disks-port port] -@@ -3298,6 +3299,11 @@ high (and thus allowing the domain to lock most of the host's memory). Doing so - may be dangerous to both the domain and the host itself since the host's kernel - may run out of memory. - -+*--zerocopy* requests zero-copy mechanism to be used for migrating memory pages. -+For QEMU/KVM this means QEMU will be temporarily allowed to lock all guest -+pages in host's memory, although only those that are queued for transfer will -+be locked at the same time. -+ - ``Note``: Individual hypervisors usually do not support all possible types of - migration. For example, QEMU does not support direct migration. - -diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c -index b56f6a90f5..c5bade1dbf 100644 ---- a/tools/virsh-domain.c -+++ b/tools/virsh-domain.c -@@ -10730,6 +10730,10 @@ static const vshCmdOptDef opts_migrate[] = { - .type = VSH_OT_BOOL, - .help = N_("automatically switch to post-copy migration after one pass of pre-copy") - }, -+ {.name = "zerocopy", -+ .type = VSH_OT_BOOL, -+ .help = N_("use zero-copy mechanism for migrating memory pages") -+ }, - {.name = "migrateuri", - .type = VSH_OT_STRING, - .completer = virshCompleteEmpty, -@@ -11133,6 +11137,9 @@ doMigrate(void *opaque) - if (vshCommandOptBool(cmd, "postcopy")) - flags |= VIR_MIGRATE_POSTCOPY; - -+ if (vshCommandOptBool(cmd, "zerocopy")) -+ flags |= VIR_MIGRATE_ZEROCOPY; -+ - if (vshCommandOptBool(cmd, "tls")) - flags |= VIR_MIGRATE_TLS; - --- -2.35.1 - diff --git a/SOURCES/symlinks b/SOURCES/symlinks deleted file mode 100644 index 54c634d..0000000 --- a/SOURCES/symlinks +++ /dev/null @@ -1,1123 +0,0 @@ -.ctags.d/libvirt.ctags ../.ctags -tests/virt-admin-self-test ./virsh-self-test -tests/genericxml2xmloutdata/device-backenddomain.xml ../genericxml2xmlindata/device-backenddomain.xml -tests/networkxml2xmlin/leasetime-hours.xml ../networkxml2confdata/leasetime-hours.xml -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/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/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 -tests/nodedevxml2xmlout/ap_card07.xml ../nodedevschemadata/ap_card07.xml -tests/nodedevxml2xmlout/ap_matrix.xml ../nodedevschemadata/ap_matrix.xml -tests/nodedevxml2xmlout/ap_matrix_mdev_types.xml ../nodedevschemadata/ap_matrix_mdev_types.xml -tests/nodedevxml2xmlout/ccw_0_0_ffff.xml ../nodedevschemadata/ccw_0_0_ffff.xml -tests/nodedevxml2xmlout/computer.xml ../nodedevschemadata/computer.xml -tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types.xml ../nodedevschemadata/css_0_0_fffe_mdev_types.xml -tests/nodedevxml2xmlout/css_0_0_ffff.xml ../nodedevschemadata/css_0_0_ffff.xml -tests/nodedevxml2xmlout/drm_renderD129.xml ../nodedevschemadata/drm_renderD129.xml -tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml ../nodedevschemadata/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml -tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml ../nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml -tests/nodedevxml2xmlout/net_00_13_02_b9_f9_d3.xml ../nodedevschemadata/net_00_13_02_b9_f9_d3.xml -tests/nodedevxml2xmlout/net_00_15_58_2f_e9_55.xml ../nodedevschemadata/net_00_15_58_2f_e9_55.xml -tests/nodedevxml2xmlout/pci_0000_00_02_0_header_type.xml ../nodedevschemadata/pci_0000_00_02_0_header_type.xml -tests/nodedevxml2xmlout/pci_0000_00_1c_0_header_type.xml ../nodedevschemadata/pci_0000_00_1c_0_header_type.xml -tests/nodedevxml2xmlout/pci_0000_02_10_7_mdev_types.xml ../nodedevschemadata/pci_0000_02_10_7_mdev_types.xml -tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov.xml ../nodedevschemadata/pci_0000_02_10_7_sriov.xml -tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_pf_vfs_all.xml ../nodedevschemadata/pci_0000_02_10_7_sriov_pf_vfs_all.xml -tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_pf_vfs_all_header_type.xml ../nodedevschemadata/pci_0000_02_10_7_sriov_pf_vfs_all_header_type.xml -tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_vfs.xml ../nodedevschemadata/pci_0000_02_10_7_sriov_vfs.xml -tests/nodedevxml2xmlout/pci_0000_02_10_7_sriov_zero_vfs_max_count.xml ../nodedevschemadata/pci_0000_02_10_7_sriov_zero_vfs_max_count.xml -tests/nodedevxml2xmlout/pci_0000_42_00_0_vpd.xml ../nodedevschemadata/pci_0000_42_00_0_vpd.xml -tests/nodedevxml2xmlout/pci_1002_71c4.xml ../nodedevschemadata/pci_1002_71c4.xml -tests/nodedevxml2xmlout/pci_8086_0c0c_snd_hda_intel.xml ../nodedevschemadata/pci_8086_0c0c_snd_hda_intel.xml -tests/nodedevxml2xmlout/pci_8086_10c9_sriov_pf.xml ../nodedevschemadata/pci_8086_10c9_sriov_pf.xml -tests/nodedevxml2xmlout/pci_8086_27c5_scsi_host.xml ../nodedevschemadata/pci_8086_27c5_scsi_host.xml -tests/nodedevxml2xmlout/pci_8086_27c5_scsi_host_0.xml ../nodedevschemadata/pci_8086_27c5_scsi_host_0.xml -tests/nodedevxml2xmlout/pci_8086_27c5_scsi_host_0_unique_id.xml ../nodedevschemadata/pci_8086_27c5_scsi_host_0_unique_id.xml -tests/nodedevxml2xmlout/pci_8086_27c5_scsi_host_scsi_device_lun0.xml ../nodedevschemadata/pci_8086_27c5_scsi_host_scsi_device_lun0.xml -tests/nodedevxml2xmlout/pci_8086_27c5_scsi_host_scsi_host.xml ../nodedevschemadata/pci_8086_27c5_scsi_host_scsi_host.xml -tests/nodedevxml2xmlout/pci_8086_4238_pcie_wireless.xml ../nodedevschemadata/pci_8086_4238_pcie_wireless.xml -tests/nodedevxml2xmlout/scsi_target0_0_0.xml ../nodedevschemadata/scsi_target0_0_0.xml -tests/nodedevxml2xmlout/scsi_target1_0_0.xml ../nodedevschemadata/scsi_target1_0_0.xml -tests/nodedevxml2xmlout/storage_serial_3600c0ff000d7a2a5d463ff4902000000.xml ../nodedevschemadata/storage_serial_3600c0ff000d7a2a5d463ff4902000000.xml -tests/nodedevxml2xmlout/storage_serial_SATA_HTS721010G9SA00_MPCZ12Y0GNGWSE.xml ../nodedevschemadata/storage_serial_SATA_HTS721010G9SA00_MPCZ12Y0GNGWSE.xml -tests/nodedevxml2xmlout/usb_device_1d6b_1_0000_00_1d_0.xml ../nodedevschemadata/usb_device_1d6b_1_0000_00_1d_0.xml -tests/nodedevxml2xmlout/usb_device_1d6b_1_0000_00_1d_0_if0.xml ../nodedevschemadata/usb_device_1d6b_1_0000_00_1d_0_if0.xml -tests/qemublocktestdata/imagecreate/qcow2-backing-luks.xml qcow2.xml -tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2-slice.xml qcow2.xml -tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2luks.xml qcow2.xml -tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.xml qcow2.xml -tests/qemublocktestdata/imagecreate/qcow2-backing-raw-slice.xml qcow2.xml -tests/qemublocktestdata/imagecreate/qcow2-backing-raw.xml qcow2.xml -tests/qemublocktestdata/imagecreate/qcow2-luks-encopts-backing.xml qcow2-luks-encopts.xml -tests/qemufirmwaredata/etc/qemu/firmware/40-ovmf-sb-keys.json ../../../usr/share/qemu/firmware/50-ovmf-sb-keys.json -tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell-detach.xml qemuhotplug-base-live+ivshmem-plain.xml -tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain-detach.xml qemuhotplug-base-live.xml -tests/qemustatusxml2xmldata/backup-pull-out.xml backup-pull-in.xml -tests/qemustatusxml2xmldata/blockjob-blockdev-out.xml blockjob-blockdev-in.xml -tests/qemustatusxml2xmldata/blockjob-mirror-out.xml blockjob-mirror-in.xml -tests/qemustatusxml2xmldata/migration-in-params-out.xml migration-in-params-in.xml -tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-out.xml migration-out-nbd-bitmaps-in.xml -tests/qemustatusxml2xmldata/migration-out-params-out.xml migration-out-params-in.xml -tests/qemustatusxml2xmldata/modern-out.xml modern-in.xml -tests/qemustatusxml2xmldata/vcpus-multi-out.xml vcpus-multi-in.xml -tests/qemuvhostuserdata/etc/qemu/vhost-user/40-gpu.json ../../../usr/share/qemu/vhost-user/50-gpu.json -tests/qemuvhostuserdata/usr/share/qemu/vhost-user/30-gpu.json 50-gpu.json -tests/qemuvhostuserdata/usr/share/qemu/vhost-user/60-gpu.json 50-gpu.json -tests/qemuxml2argvdata/aarch64-gic-default-both.args aarch64-gic-v3.args -tests/qemuxml2argvdata/aarch64-gic-default-both.xml aarch64-gic-default.xml -tests/qemuxml2argvdata/aarch64-gic-default-v2.args aarch64-gic-v2.args -tests/qemuxml2argvdata/aarch64-gic-default-v2.xml aarch64-gic-default.xml -tests/qemuxml2argvdata/aarch64-gic-default-v3.args aarch64-gic-v3.args -tests/qemuxml2argvdata/aarch64-gic-default-v3.xml aarch64-gic-default.xml -tests/qemuxml2argvdata/aarch64-gic-default.args aarch64-gic-v2.args -tests/qemuxml2argvdata/aarch64-gic-none-both.args aarch64-gic-v3.args -tests/qemuxml2argvdata/aarch64-gic-none-both.xml aarch64-gic-none.xml -tests/qemuxml2argvdata/aarch64-gic-none-v2.args aarch64-gic-v2.args -tests/qemuxml2argvdata/aarch64-gic-none-v2.xml aarch64-gic-none.xml -tests/qemuxml2argvdata/aarch64-gic-none-v3.args aarch64-gic-v3.args -tests/qemuxml2argvdata/aarch64-gic-none-v3.xml aarch64-gic-none-v2.xml -tests/qemuxml2argvdata/aarch64-gic-none.args aarch64-gic-v2.args -tests/qemuxml2argvdata/cpu-check-full.args cpu-check-none.args -tests/qemuxml2argvdata/cpu-check-partial.args cpu-check-none.args -tests/qemuxml2argvdata/cpu-numa-memshared-1.xml cpu-numa-memshared.xml -tests/qemuxml2argvdata/disk-backing-chains-index.x86_64-2.12.0.args disk-backing-chains-noindex.x86_64-2.12.0.args -tests/qemuxml2argvdata/disk-backing-chains-index.x86_64-latest.args disk-backing-chains-noindex.x86_64-latest.args -tests/qemuxml2argvdata/mach-virt-console-native.args mach-virt-serial-native.args -tests/qemuxml2argvdata/mach-virt-serial+console-native.args mach-virt-serial-native.args -tests/qemuxml2argvdata/mach-virt-serial-compat.args mach-virt-serial-native.args -tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.xml memory-hotplug-nvdimm-ppc64.xml -tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.xml memory-hotplug-ppc64-nonuma.xml -tests/qemuxml2argvdata/pci-rom-disabled-invalid.args pci-rom-disabled.args -tests/qemuxml2argvdata/ppc64-usb-controller-legacy.xml ppc64-usb-controller.xml -tests/qemuxml2argvdata/ppc64-usb-controller-qemu-xhci.xml ppc64-usb-controller.xml -tests/qemuxml2argvdata/pseries-console-native.args pseries-serial-native.args -tests/qemuxml2argvdata/pseries-features-ccf.xml pseries-features.xml -tests/qemuxml2argvdata/pseries-features-cfpc.xml pseries-features.xml -tests/qemuxml2argvdata/pseries-features-hpt-pagesize.xml pseries-features.xml -tests/qemuxml2argvdata/pseries-features-htm.xml pseries-features.xml -tests/qemuxml2argvdata/pseries-features-ibs.xml pseries-features.xml -tests/qemuxml2argvdata/pseries-features-nested-hv.xml pseries-features.xml -tests/qemuxml2argvdata/pseries-features-sbbc.xml pseries-features.xml -tests/qemuxml2argvdata/pseries-serial+console-native.args pseries-serial-native.args -tests/qemuxml2argvdata/pseries-serial-compat.args pseries-serial-native.args -tests/qemuxml2argvdata/q35-virtio-pci.xml q35-pcie.xml -tests/qemuxml2argvdata/usb-controller-default-unavailable-q35.xml usb-controller-default-q35.xml -tests/qemuxml2argvdata/usb-controller-explicit-unavailable-q35.xml usb-controller-explicit-q35.xml -tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.xml usb-controller-qemu-xhci.xml -tests/qemuxml2argvdata/user-aliases2.args boot-floppy-q35.args -tests/qemuxml2xmloutdata/aarch64-gic-default-both.xml ../qemuxml2argvdata/aarch64-gic-v3.xml -tests/qemuxml2xmloutdata/aarch64-gic-default-v2.xml ../qemuxml2argvdata/aarch64-gic-v2.xml -tests/qemuxml2xmloutdata/aarch64-gic-default-v3.xml ../qemuxml2argvdata/aarch64-gic-v3.xml -tests/qemuxml2xmloutdata/aarch64-gic-default.xml ../qemuxml2argvdata/aarch64-gic-v2.xml -tests/qemuxml2xmloutdata/aarch64-gic-host.xml ../qemuxml2argvdata/aarch64-gic-host.xml -tests/qemuxml2xmloutdata/aarch64-gic-none-both.xml ../qemuxml2argvdata/aarch64-gic-v3.xml -tests/qemuxml2xmloutdata/aarch64-gic-none-v2.xml ../qemuxml2argvdata/aarch64-gic-v2.xml -tests/qemuxml2xmloutdata/aarch64-gic-none-v3.xml ../qemuxml2argvdata/aarch64-gic-v3.xml -tests/qemuxml2xmloutdata/aarch64-gic-none.xml ../qemuxml2argvdata/aarch64-gic-v2.xml -tests/qemuxml2xmloutdata/aarch64-gic-v2.xml ../qemuxml2argvdata/aarch64-gic-v2.xml -tests/qemuxml2xmloutdata/aarch64-gic-v3.xml ../qemuxml2argvdata/aarch64-gic-v3.xml -tests/qemuxml2xmloutdata/audio-alsa-best.xml ../qemuxml2argvdata/audio-alsa-best.xml -tests/qemuxml2xmloutdata/audio-alsa-full.xml ../qemuxml2argvdata/audio-alsa-full.xml -tests/qemuxml2xmloutdata/audio-alsa-minimal.xml ../qemuxml2argvdata/audio-alsa-minimal.xml -tests/qemuxml2xmloutdata/audio-coreaudio-best.xml ../qemuxml2argvdata/audio-coreaudio-best.xml -tests/qemuxml2xmloutdata/audio-coreaudio-full.xml ../qemuxml2argvdata/audio-coreaudio-full.xml -tests/qemuxml2xmloutdata/audio-coreaudio-minimal.xml ../qemuxml2argvdata/audio-coreaudio-minimal.xml -tests/qemuxml2xmloutdata/audio-file-best.xml ../qemuxml2argvdata/audio-file-best.xml -tests/qemuxml2xmloutdata/audio-file-full.xml ../qemuxml2argvdata/audio-file-full.xml -tests/qemuxml2xmloutdata/audio-file-minimal.xml ../qemuxml2argvdata/audio-file-minimal.xml -tests/qemuxml2xmloutdata/audio-jack-full.xml ../qemuxml2argvdata/audio-jack-full.xml -tests/qemuxml2xmloutdata/audio-many-backends.x86_64-latest.xml ../qemuxml2argvdata/audio-many-backends.xml -tests/qemuxml2xmloutdata/audio-none-best.xml ../qemuxml2argvdata/audio-none-best.xml -tests/qemuxml2xmloutdata/audio-none-full.xml ../qemuxml2argvdata/audio-none-full.xml -tests/qemuxml2xmloutdata/audio-none-minimal.xml ../qemuxml2argvdata/audio-none-minimal.xml -tests/qemuxml2xmloutdata/audio-oss-best.xml ../qemuxml2argvdata/audio-oss-best.xml -tests/qemuxml2xmloutdata/audio-oss-full.xml ../qemuxml2argvdata/audio-oss-full.xml -tests/qemuxml2xmloutdata/audio-oss-minimal.xml ../qemuxml2argvdata/audio-oss-minimal.xml -tests/qemuxml2xmloutdata/audio-pulseaudio-best.xml ../qemuxml2argvdata/audio-pulseaudio-best.xml -tests/qemuxml2xmloutdata/audio-pulseaudio-full.xml ../qemuxml2argvdata/audio-pulseaudio-full.xml -tests/qemuxml2xmloutdata/audio-pulseaudio-minimal.xml ../qemuxml2argvdata/audio-pulseaudio-minimal.xml -tests/qemuxml2xmloutdata/audio-sdl-best.xml ../qemuxml2argvdata/audio-sdl-best.xml -tests/qemuxml2xmloutdata/audio-sdl-full.xml ../qemuxml2argvdata/audio-sdl-full.xml -tests/qemuxml2xmloutdata/audio-sdl-minimal.xml ../qemuxml2argvdata/audio-sdl-minimal.xml -tests/qemuxml2xmloutdata/audio-spice-best.xml ../qemuxml2argvdata/audio-spice-best.xml -tests/qemuxml2xmloutdata/audio-spice-full.xml ../qemuxml2argvdata/audio-spice-full.xml -tests/qemuxml2xmloutdata/audio-spice-minimal.xml ../qemuxml2argvdata/audio-spice-minimal.xml -tests/qemuxml2xmloutdata/blkdeviotune-group-num.x86_64-latest.xml ../qemuxml2argvdata/blkdeviotune-group-num.xml -tests/qemuxml2xmloutdata/blkdeviotune-max-length.x86_64-latest.xml ../qemuxml2argvdata/blkdeviotune-max-length.xml -tests/qemuxml2xmloutdata/blkdeviotune-max.x86_64-latest.xml ../qemuxml2argvdata/blkdeviotune-max.xml -tests/qemuxml2xmloutdata/boot-floppy-q35.xml ../qemuxml2argvdata/boot-floppy-q35.xml -tests/qemuxml2xmloutdata/clock-realtime.xml ../qemuxml2argvdata/clock-realtime.xml -tests/qemuxml2xmloutdata/clock-timer-armvtimer.aarch64-latest.xml ../qemuxml2argvdata/clock-timer-armvtimer.xml -tests/qemuxml2xmloutdata/disk-detect-zeroes.x86_64-latest.xml ../qemuxml2argvdata/disk-detect-zeroes.xml -tests/qemuxml2xmloutdata/disk-nvme.xml ../qemuxml2argvdata/disk-nvme.xml -tests/qemuxml2xmloutdata/disk-virtio-queues.x86_64-latest.xml ../qemuxml2argvdata/disk-virtio-queues.xml -tests/qemuxml2xmloutdata/disk-virtio-scsi-reservations.xml ../qemuxml2argvdata/disk-virtio-scsi-reservations.xml -tests/qemuxml2xmloutdata/downscript.xml ../qemuxml2argvdata/downscript.xml -tests/qemuxml2xmloutdata/encrypted-disk-usage.xml ../qemuxml2argvdata/encrypted-disk-usage.xml -tests/qemuxml2xmloutdata/fd-memory-no-numa-topology.xml ../qemuxml2argvdata/fd-memory-no-numa-topology.xml -tests/qemuxml2xmloutdata/fd-memory-numa-topology.xml ../qemuxml2argvdata/fd-memory-numa-topology.xml -tests/qemuxml2xmloutdata/fd-memory-numa-topology2.xml ../qemuxml2argvdata/fd-memory-numa-topology2.xml -tests/qemuxml2xmloutdata/fd-memory-numa-topology3.xml ../qemuxml2argvdata/fd-memory-numa-topology3.xml -tests/qemuxml2xmloutdata/fd-memory-numa-topology4.x86_64-latest.xml ../qemuxml2argvdata/fd-memory-numa-topology4.xml -tests/qemuxml2xmloutdata/hugepages-default-2M.xml ../qemuxml2argvdata/hugepages-default-2M.xml -tests/qemuxml2xmloutdata/hugepages-default-system-size.xml ../qemuxml2argvdata/hugepages-default-system-size.xml -tests/qemuxml2xmloutdata/hugepages-memaccess.xml ../qemuxml2argvdata/hugepages-memaccess.xml -tests/qemuxml2xmloutdata/hugepages-memaccess2.xml ../qemuxml2argvdata/hugepages-memaccess2.xml -tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml ../qemuxml2argvdata/hugepages-numa-default-dimm.xml -tests/qemuxml2xmloutdata/hugepages-nvdimm.xml ../qemuxml2argvdata/hugepages-nvdimm.xml -tests/qemuxml2xmloutdata/input-linux.x86_64-latest.xml ../qemuxml2argvdata/input-linux.xml -tests/qemuxml2xmloutdata/intel-iommu-aw-bits.x86_64-latest.xml ../qemuxml2argvdata/intel-iommu-aw-bits.xml -tests/qemuxml2xmloutdata/intel-iommu-caching-mode.x86_64-latest.xml ../qemuxml2argvdata/intel-iommu-caching-mode.xml -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/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 -tests/qemuxml2xmloutdata/mach-virt-console-native.xml mach-virt-serial-compat.xml -tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml mach-virt-serial-compat.xml -tests/qemuxml2xmloutdata/mach-virt-serial-native.xml mach-virt-serial-compat.xml -tests/qemuxml2xmloutdata/memfd-memory-default-hugepage.x86_64-latest.xml ../qemuxml2argvdata/memfd-memory-default-hugepage.xml -tests/qemuxml2xmloutdata/memfd-memory-numa.x86_64-latest.xml ../qemuxml2argvdata/memfd-memory-numa.xml -tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-access.xml ../qemuxml2argvdata/memory-hotplug-nvdimm-access.xml -tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-align.xml ../qemuxml2argvdata/memory-hotplug-nvdimm-align.xml -tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-label.xml ../qemuxml2argvdata/memory-hotplug-nvdimm-label.xml -tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-pmem.xml ../qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml -tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-readonly.xml ../qemuxml2argvdata/memory-hotplug-nvdimm-readonly.xml -tests/qemuxml2xmloutdata/memory-hotplug-nvdimm.xml ../qemuxml2argvdata/memory-hotplug-nvdimm.xml -tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma.xml ../qemuxml2argvdata/memory-hotplug-ppc64-nonuma.xml -tests/qemuxml2xmloutdata/memory-hotplug-virtio-mem.x86_64-latest.xml ../qemuxml2argvdata/memory-hotplug-virtio-mem.xml -tests/qemuxml2xmloutdata/memory-hotplug-virtio-pmem.x86_64-latest.xml ../qemuxml2argvdata/memory-hotplug-virtio-pmem.xml -tests/qemuxml2xmloutdata/net-user-addr.xml ../qemuxml2argvdata/net-user-addr.xml -tests/qemuxml2xmloutdata/net-virtio-teaming-hostdev.xml ../qemuxml2argvdata/net-virtio-teaming-hostdev.xml -tests/qemuxml2xmloutdata/numatune-hmat.xml ../qemuxml2argvdata/numatune-hmat.xml -tests/qemuxml2xmloutdata/numatune-memnode-restrictive-mode.x86_64-latest.xml ../qemuxml2argvdata/numatune-memnode-restrictive-mode.xml -tests/qemuxml2xmloutdata/numatune-no-vcpu.xml ../qemuxml2argvdata/numatune-no-vcpu.xml -tests/qemuxml2xmloutdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.xml ../qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.xml -tests/qemuxml2xmloutdata/pages-dimm-discard.xml ../qemuxml2argvdata/pages-dimm-discard.xml -tests/qemuxml2xmloutdata/pages-discard-hugepages.xml ../qemuxml2argvdata/pages-discard-hugepages.xml -tests/qemuxml2xmloutdata/pages-discard.xml ../qemuxml2argvdata/pages-discard.xml -tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml ../qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.xml -tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml ../qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.xml -tests/qemuxml2xmloutdata/pseries-console-native.xml pseries-serial-native.xml -tests/qemuxml2xmloutdata/pseries-serial+console-native.xml pseries-serial-native.xml -tests/qemuxml2xmloutdata/pseries-serial-compat.xml pseries-serial-native.xml -tests/qemuxml2xmloutdata/serial-tcp-tlsx509-chardev-notls.xml ../qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.xml -tests/qemuxml2xmloutdata/smbios-type-fwcfg.xml ../qemuxml2argvdata/smbios-type-fwcfg.xml -tests/qemuxml2xmloutdata/tpm-emulator-spapr.ppc64-latest.xml ../qemuxml2argvdata/tpm-emulator-spapr.xml -tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.x86_64-latest.xml ../qemuxml2argvdata/tpm-emulator-tpm2-enc.xml -tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-latest.xml ../qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml -tests/qemuxml2xmloutdata/tpm-emulator-tpm2.x86_64-latest.xml ../qemuxml2argvdata/tpm-emulator-tpm2.xml -tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml ../qemuxml2argvdata/tpm-emulator.xml -tests/qemuxml2xmloutdata/tpm-passthrough-crb.x86_64-latest.xml ../qemuxml2argvdata/tpm-passthrough-crb.xml -tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml ../qemuxml2argvdata/tpm-passthrough.xml -tests/qemuxml2xmloutdata/user-aliases.xml ../qemuxml2argvdata/user-aliases.xml -tests/qemuxml2xmloutdata/vcpu-placement-static.xml ../qemuxml2argvdata/vcpu-placement-static.xml -tests/qemuxml2xmloutdata/vhost-user-fs-fd-memory.x86_64-latest.xml ../qemuxml2argvdata/vhost-user-fs-fd-memory.xml -tests/qemuxml2xmloutdata/vhost-user-fs-hugepages.x86_64-latest.xml ../qemuxml2argvdata/vhost-user-fs-hugepages.xml -tests/qemuxml2xmloutdata/vhost-user-fs-sock.x86_64-latest.xml ../qemuxml2argvdata/vhost-user-fs-sock.xml -tests/qemuxml2xmloutdata/vhost-vsock-ccw-iommu.s390x-latest.xml ../qemuxml2argvdata/vhost-vsock-ccw-iommu.xml -tests/qemuxml2xmloutdata/vhost-vsock-ccw.xml ../qemuxml2argvdata/vhost-vsock-ccw.xml -tests/qemuxml2xmloutdata/vhost-vsock.x86_64-latest.xml ../qemuxml2argvdata/vhost-vsock.xml -tests/qemuxml2xmloutdata/video-qxl-resolution.xml ../qemuxml2argvdata/video-qxl-resolution.xml -tests/qemuxml2xmloutdata/video-virtio-vga-gpu-gl.x86_64-latest.xml ../qemuxml2argvdata/video-virtio-vga-gpu-gl.xml -tests/qemuxml2xmloutdata/virtio-options.x86_64-latest.xml ../qemuxml2argvdata/virtio-options.xml -tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-features.x86_64-latest.xml ../qemuxml2argvdata/x86_64-default-cpu-tcg-features.xml -tests/vircaps2xmldata/linux-basic-dies/system/cpu ../../../virhostcpudata/linux-with-die/cpu -tests/vircaps2xmldata/linux-basic-dies/system/node ../../../virhostcpudata/linux-with-die/node -tests/vircaps2xmldata/linux-basic/system/node/node0/cpu0 ../../cpu/cpu0 -tests/vircaps2xmldata/linux-basic/system/node/node0/cpu1 ../../cpu/cpu1 -tests/vircaps2xmldata/linux-basic/system/node/node0/cpu2 ../../cpu/cpu2 -tests/vircaps2xmldata/linux-basic/system/node/node0/cpu3 ../../cpu/cpu3 -tests/vircaps2xmldata/linux-basic/system/node/node1/cpu4 ../../cpu/cpu4 -tests/vircaps2xmldata/linux-basic/system/node/node1/cpu5 ../../cpu/cpu5 -tests/vircaps2xmldata/linux-basic/system/node/node1/cpu6 ../../cpu/cpu6 -tests/vircaps2xmldata/linux-basic/system/node/node1/cpu7 ../../cpu/cpu7 -tests/vircaps2xmldata/linux-basic/system/node/node2/cpu10 ../../cpu/cpu10 -tests/vircaps2xmldata/linux-basic/system/node/node2/cpu11 ../../cpu/cpu11 -tests/vircaps2xmldata/linux-basic/system/node/node2/cpu8 ../../cpu/cpu8 -tests/vircaps2xmldata/linux-basic/system/node/node2/cpu9 ../../cpu/cpu9 -tests/vircaps2xmldata/linux-basic/system/node/node3/cpu12 ../../cpu/cpu12 -tests/vircaps2xmldata/linux-basic/system/node/node3/cpu13 ../../cpu/cpu13 -tests/vircaps2xmldata/linux-basic/system/node/node3/cpu14 ../../cpu/cpu14 -tests/vircaps2xmldata/linux-basic/system/node/node3/cpu15 ../../cpu/cpu15 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu0 ../../cpu/cpu0 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu1 ../../cpu/cpu1 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu2 ../../cpu/cpu2 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu3 ../../cpu/cpu3 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu4 ../../cpu/cpu4 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu5 ../../cpu/cpu5 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu6 ../../cpu/cpu6 -tests/vircaps2xmldata/linux-caches/system/node/node0/cpu7 ../../cpu/cpu7 -tests/vircaps2xmldata/linux-hmat/system/node/node0/access1/targets/node1 ../../../node1 -tests/vircaps2xmldata/linux-resctrl-cdp/system ../linux-resctrl/system/ -tests/vircaps2xmldata/linux-resctrl-cmt/system ../linux-resctrl/system -tests/vircaps2xmldata/linux-resctrl-fake-feature/system ../linux-resctrl/system -tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpu0 ../../cpu/cpu0 -tests/vircaps2xmldata/linux-resctrl-skx/system/node/node0/cpu0 ../../cpu/cpu0 -tests/vircaps2xmldata/linux-resctrl/system/node/node0/cpu0 ../../cpu/cpu0 -tests/vircaps2xmldata/linux-resctrl/system/node/node0/cpu1 ../../cpu/cpu1 -tests/vircaps2xmldata/linux-resctrl/system/node/node0/cpu2 ../../cpu/cpu2 -tests/vircaps2xmldata/linux-resctrl/system/node/node0/cpu3 ../../cpu/cpu3 -tests/vircaps2xmldata/linux-resctrl/system/node/node0/cpu4 ../../cpu/cpu4 -tests/vircaps2xmldata/linux-resctrl/system/node/node0/cpu5 ../../cpu/cpu5 -tests/vircaps2xmldata/linux-resctrl/system/node/node1/cpu10 ../../cpu/cpu10 -tests/vircaps2xmldata/linux-resctrl/system/node/node1/cpu11 ../../cpu/cpu11 -tests/vircaps2xmldata/linux-resctrl/system/node/node1/cpu6 ../../cpu/cpu6 -tests/vircaps2xmldata/linux-resctrl/system/node/node1/cpu7 ../../cpu/cpu7 -tests/vircaps2xmldata/linux-resctrl/system/node/node1/cpu8 ../../cpu/cpu8 -tests/vircaps2xmldata/linux-resctrl/system/node/node1/cpu9 ../../cpu/cpu9 -tests/virfilecachedata/9ca150bf3119b75dcac8e8bae4bc3a28e75bc3e262757001e8b953580f5e75ef.cache 5f3154560c130108b282a2aa15b1658aa16923e46497dd8deeb6be287ddb0ca0.cache -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu100 ../../cpu/cpu100 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu101 ../../cpu/cpu101 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu102 ../../cpu/cpu102 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu103 ../../cpu/cpu103 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu144 ../../cpu/cpu144 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu145 ../../cpu/cpu145 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu146 ../../cpu/cpu146 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu147 ../../cpu/cpu147 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu148 ../../cpu/cpu148 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu149 ../../cpu/cpu149 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu150 ../../cpu/cpu150 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu151 ../../cpu/cpu151 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu152 ../../cpu/cpu152 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu153 ../../cpu/cpu153 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu154 ../../cpu/cpu154 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu155 ../../cpu/cpu155 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu156 ../../cpu/cpu156 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu157 ../../cpu/cpu157 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu158 ../../cpu/cpu158 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu159 ../../cpu/cpu159 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu16 ../../cpu/cpu16 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu17 ../../cpu/cpu17 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu18 ../../cpu/cpu18 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu19 ../../cpu/cpu19 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu20 ../../cpu/cpu20 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu21 ../../cpu/cpu21 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu22 ../../cpu/cpu22 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu23 ../../cpu/cpu23 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu24 ../../cpu/cpu24 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu25 ../../cpu/cpu25 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu26 ../../cpu/cpu26 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu27 ../../cpu/cpu27 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu28 ../../cpu/cpu28 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu29 ../../cpu/cpu29 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu30 ../../cpu/cpu30 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu31 ../../cpu/cpu31 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu32 ../../cpu/cpu32 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu33 ../../cpu/cpu33 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu34 ../../cpu/cpu34 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu35 ../../cpu/cpu35 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu36 ../../cpu/cpu36 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu37 ../../cpu/cpu37 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu38 ../../cpu/cpu38 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu39 ../../cpu/cpu39 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu56 ../../cpu/cpu56 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu57 ../../cpu/cpu57 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu58 ../../cpu/cpu58 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu59 ../../cpu/cpu59 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu60 ../../cpu/cpu60 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu61 ../../cpu/cpu61 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu62 ../../cpu/cpu62 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu63 ../../cpu/cpu63 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu64 ../../cpu/cpu64 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu65 ../../cpu/cpu65 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu66 ../../cpu/cpu66 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu67 ../../cpu/cpu67 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu68 ../../cpu/cpu68 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu69 ../../cpu/cpu69 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu70 ../../cpu/cpu70 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu71 ../../cpu/cpu71 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu80 ../../cpu/cpu80 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu81 ../../cpu/cpu81 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu82 ../../cpu/cpu82 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu83 ../../cpu/cpu83 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu84 ../../cpu/cpu84 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu85 ../../cpu/cpu85 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu86 ../../cpu/cpu86 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu87 ../../cpu/cpu87 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu88 ../../cpu/cpu88 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu89 ../../cpu/cpu89 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu90 ../../cpu/cpu90 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu91 ../../cpu/cpu91 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu92 ../../cpu/cpu92 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu93 ../../cpu/cpu93 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu94 ../../cpu/cpu94 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu95 ../../cpu/cpu95 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu96 ../../cpu/cpu96 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu97 ../../cpu/cpu97 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu98 ../../cpu/cpu98 -tests/virhostcpudata/linux-deconf-cpus/node/node0/cpu99 ../../cpu/cpu99 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu40 ../../cpu/cpu40 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu41 ../../cpu/cpu41 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu42 ../../cpu/cpu42 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu43 ../../cpu/cpu43 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu44 ../../cpu/cpu44 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu45 ../../cpu/cpu45 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu46 ../../cpu/cpu46 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu47 ../../cpu/cpu47 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu48 ../../cpu/cpu48 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu49 ../../cpu/cpu49 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu50 ../../cpu/cpu50 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu51 ../../cpu/cpu51 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu52 ../../cpu/cpu52 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu53 ../../cpu/cpu53 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu54 ../../cpu/cpu54 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu55 ../../cpu/cpu55 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu72 ../../cpu/cpu72 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu73 ../../cpu/cpu73 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu74 ../../cpu/cpu74 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu75 ../../cpu/cpu75 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu76 ../../cpu/cpu76 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu77 ../../cpu/cpu77 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu78 ../../cpu/cpu78 -tests/virhostcpudata/linux-deconf-cpus/node/node1/cpu79 ../../cpu/cpu79 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu104 ../../cpu/cpu104 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu105 ../../cpu/cpu105 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu106 ../../cpu/cpu106 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu107 ../../cpu/cpu107 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu108 ../../cpu/cpu108 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu109 ../../cpu/cpu109 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu110 ../../cpu/cpu110 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu111 ../../cpu/cpu111 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu112 ../../cpu/cpu112 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu113 ../../cpu/cpu113 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu114 ../../cpu/cpu114 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu115 ../../cpu/cpu115 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu116 ../../cpu/cpu116 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu117 ../../cpu/cpu117 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu118 ../../cpu/cpu118 -tests/virhostcpudata/linux-deconf-cpus/node/node16/cpu119 ../../cpu/cpu119 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu120 ../../cpu/cpu120 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu121 ../../cpu/cpu121 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu122 ../../cpu/cpu122 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu123 ../../cpu/cpu123 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu124 ../../cpu/cpu124 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu125 ../../cpu/cpu125 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu126 ../../cpu/cpu126 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu127 ../../cpu/cpu127 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu128 ../../cpu/cpu128 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu129 ../../cpu/cpu129 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu130 ../../cpu/cpu130 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu131 ../../cpu/cpu131 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu132 ../../cpu/cpu132 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu133 ../../cpu/cpu133 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu134 ../../cpu/cpu134 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu135 ../../cpu/cpu135 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu136 ../../cpu/cpu136 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu137 ../../cpu/cpu137 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu138 ../../cpu/cpu138 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu139 ../../cpu/cpu139 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu140 ../../cpu/cpu140 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu141 ../../cpu/cpu141 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu142 ../../cpu/cpu142 -tests/virhostcpudata/linux-deconf-cpus/node/node17/cpu143 ../../cpu/cpu143 -tests/virhostcpudata/linux-high-ids/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-high-ids/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-high-ids/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-high-ids/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-high-ids/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-high-ids/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-high-ids/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-high-ids/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-high-ids/node/node1/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-high-ids/node/node1/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-high-ids/node/node1/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-high-ids/node/node1/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-high-ids/node/node1/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-high-ids/node/node1/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-high-ids/node/node1/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-high-ids/node/node1/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-subcores1/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-subcores1/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-subcores1/node/node0/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-subcores1/node/node0/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-subcores1/node/node0/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-subcores1/node/node0/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-subcores1/node/node0/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-subcores1/node/node0/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-subcores1/node/node0/cpu16 ../../cpu/cpu16 -tests/virhostcpudata/linux-subcores1/node/node0/cpu17 ../../cpu/cpu17 -tests/virhostcpudata/linux-subcores1/node/node0/cpu18 ../../cpu/cpu18 -tests/virhostcpudata/linux-subcores1/node/node0/cpu19 ../../cpu/cpu19 -tests/virhostcpudata/linux-subcores1/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-subcores1/node/node0/cpu20 ../../cpu/cpu20 -tests/virhostcpudata/linux-subcores1/node/node0/cpu21 ../../cpu/cpu21 -tests/virhostcpudata/linux-subcores1/node/node0/cpu22 ../../cpu/cpu22 -tests/virhostcpudata/linux-subcores1/node/node0/cpu23 ../../cpu/cpu23 -tests/virhostcpudata/linux-subcores1/node/node0/cpu24 ../../cpu/cpu24 -tests/virhostcpudata/linux-subcores1/node/node0/cpu25 ../../cpu/cpu25 -tests/virhostcpudata/linux-subcores1/node/node0/cpu26 ../../cpu/cpu26 -tests/virhostcpudata/linux-subcores1/node/node0/cpu27 ../../cpu/cpu27 -tests/virhostcpudata/linux-subcores1/node/node0/cpu28 ../../cpu/cpu28 -tests/virhostcpudata/linux-subcores1/node/node0/cpu29 ../../cpu/cpu29 -tests/virhostcpudata/linux-subcores1/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-subcores1/node/node0/cpu30 ../../cpu/cpu30 -tests/virhostcpudata/linux-subcores1/node/node0/cpu31 ../../cpu/cpu31 -tests/virhostcpudata/linux-subcores1/node/node0/cpu32 ../../cpu/cpu32 -tests/virhostcpudata/linux-subcores1/node/node0/cpu33 ../../cpu/cpu33 -tests/virhostcpudata/linux-subcores1/node/node0/cpu34 ../../cpu/cpu34 -tests/virhostcpudata/linux-subcores1/node/node0/cpu35 ../../cpu/cpu35 -tests/virhostcpudata/linux-subcores1/node/node0/cpu36 ../../cpu/cpu36 -tests/virhostcpudata/linux-subcores1/node/node0/cpu37 ../../cpu/cpu37 -tests/virhostcpudata/linux-subcores1/node/node0/cpu38 ../../cpu/cpu38 -tests/virhostcpudata/linux-subcores1/node/node0/cpu39 ../../cpu/cpu39 -tests/virhostcpudata/linux-subcores1/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-subcores1/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-subcores1/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-subcores1/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-subcores1/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-subcores1/node/node0/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-subcores1/node/node1/cpu40 ../../cpu/cpu40 -tests/virhostcpudata/linux-subcores1/node/node1/cpu41 ../../cpu/cpu41 -tests/virhostcpudata/linux-subcores1/node/node1/cpu42 ../../cpu/cpu42 -tests/virhostcpudata/linux-subcores1/node/node1/cpu43 ../../cpu/cpu43 -tests/virhostcpudata/linux-subcores1/node/node1/cpu44 ../../cpu/cpu44 -tests/virhostcpudata/linux-subcores1/node/node1/cpu45 ../../cpu/cpu45 -tests/virhostcpudata/linux-subcores1/node/node1/cpu46 ../../cpu/cpu46 -tests/virhostcpudata/linux-subcores1/node/node1/cpu47 ../../cpu/cpu47 -tests/virhostcpudata/linux-subcores1/node/node1/cpu48 ../../cpu/cpu48 -tests/virhostcpudata/linux-subcores1/node/node1/cpu49 ../../cpu/cpu49 -tests/virhostcpudata/linux-subcores1/node/node1/cpu50 ../../cpu/cpu50 -tests/virhostcpudata/linux-subcores1/node/node1/cpu51 ../../cpu/cpu51 -tests/virhostcpudata/linux-subcores1/node/node1/cpu52 ../../cpu/cpu52 -tests/virhostcpudata/linux-subcores1/node/node1/cpu53 ../../cpu/cpu53 -tests/virhostcpudata/linux-subcores1/node/node1/cpu54 ../../cpu/cpu54 -tests/virhostcpudata/linux-subcores1/node/node1/cpu55 ../../cpu/cpu55 -tests/virhostcpudata/linux-subcores1/node/node1/cpu56 ../../cpu/cpu56 -tests/virhostcpudata/linux-subcores1/node/node1/cpu57 ../../cpu/cpu57 -tests/virhostcpudata/linux-subcores1/node/node1/cpu58 ../../cpu/cpu58 -tests/virhostcpudata/linux-subcores1/node/node1/cpu59 ../../cpu/cpu59 -tests/virhostcpudata/linux-subcores1/node/node1/cpu60 ../../cpu/cpu60 -tests/virhostcpudata/linux-subcores1/node/node1/cpu61 ../../cpu/cpu61 -tests/virhostcpudata/linux-subcores1/node/node1/cpu62 ../../cpu/cpu62 -tests/virhostcpudata/linux-subcores1/node/node1/cpu63 ../../cpu/cpu63 -tests/virhostcpudata/linux-subcores1/node/node1/cpu64 ../../cpu/cpu64 -tests/virhostcpudata/linux-subcores1/node/node1/cpu65 ../../cpu/cpu65 -tests/virhostcpudata/linux-subcores1/node/node1/cpu66 ../../cpu/cpu66 -tests/virhostcpudata/linux-subcores1/node/node1/cpu67 ../../cpu/cpu67 -tests/virhostcpudata/linux-subcores1/node/node1/cpu68 ../../cpu/cpu68 -tests/virhostcpudata/linux-subcores1/node/node1/cpu69 ../../cpu/cpu69 -tests/virhostcpudata/linux-subcores1/node/node1/cpu70 ../../cpu/cpu70 -tests/virhostcpudata/linux-subcores1/node/node1/cpu71 ../../cpu/cpu71 -tests/virhostcpudata/linux-subcores1/node/node1/cpu72 ../../cpu/cpu72 -tests/virhostcpudata/linux-subcores1/node/node1/cpu73 ../../cpu/cpu73 -tests/virhostcpudata/linux-subcores1/node/node1/cpu74 ../../cpu/cpu74 -tests/virhostcpudata/linux-subcores1/node/node1/cpu75 ../../cpu/cpu75 -tests/virhostcpudata/linux-subcores1/node/node1/cpu76 ../../cpu/cpu76 -tests/virhostcpudata/linux-subcores1/node/node1/cpu77 ../../cpu/cpu77 -tests/virhostcpudata/linux-subcores1/node/node1/cpu78 ../../cpu/cpu78 -tests/virhostcpudata/linux-subcores1/node/node1/cpu79 ../../cpu/cpu79 -tests/virhostcpudata/linux-subcores1/node/node16/cpu100 ../../cpu/cpu100 -tests/virhostcpudata/linux-subcores1/node/node16/cpu101 ../../cpu/cpu101 -tests/virhostcpudata/linux-subcores1/node/node16/cpu102 ../../cpu/cpu102 -tests/virhostcpudata/linux-subcores1/node/node16/cpu103 ../../cpu/cpu103 -tests/virhostcpudata/linux-subcores1/node/node16/cpu104 ../../cpu/cpu104 -tests/virhostcpudata/linux-subcores1/node/node16/cpu105 ../../cpu/cpu105 -tests/virhostcpudata/linux-subcores1/node/node16/cpu106 ../../cpu/cpu106 -tests/virhostcpudata/linux-subcores1/node/node16/cpu107 ../../cpu/cpu107 -tests/virhostcpudata/linux-subcores1/node/node16/cpu108 ../../cpu/cpu108 -tests/virhostcpudata/linux-subcores1/node/node16/cpu109 ../../cpu/cpu109 -tests/virhostcpudata/linux-subcores1/node/node16/cpu110 ../../cpu/cpu110 -tests/virhostcpudata/linux-subcores1/node/node16/cpu111 ../../cpu/cpu111 -tests/virhostcpudata/linux-subcores1/node/node16/cpu112 ../../cpu/cpu112 -tests/virhostcpudata/linux-subcores1/node/node16/cpu113 ../../cpu/cpu113 -tests/virhostcpudata/linux-subcores1/node/node16/cpu114 ../../cpu/cpu114 -tests/virhostcpudata/linux-subcores1/node/node16/cpu115 ../../cpu/cpu115 -tests/virhostcpudata/linux-subcores1/node/node16/cpu116 ../../cpu/cpu116 -tests/virhostcpudata/linux-subcores1/node/node16/cpu117 ../../cpu/cpu117 -tests/virhostcpudata/linux-subcores1/node/node16/cpu118 ../../cpu/cpu118 -tests/virhostcpudata/linux-subcores1/node/node16/cpu119 ../../cpu/cpu119 -tests/virhostcpudata/linux-subcores1/node/node16/cpu80 ../../cpu/cpu80 -tests/virhostcpudata/linux-subcores1/node/node16/cpu81 ../../cpu/cpu81 -tests/virhostcpudata/linux-subcores1/node/node16/cpu82 ../../cpu/cpu82 -tests/virhostcpudata/linux-subcores1/node/node16/cpu83 ../../cpu/cpu83 -tests/virhostcpudata/linux-subcores1/node/node16/cpu84 ../../cpu/cpu84 -tests/virhostcpudata/linux-subcores1/node/node16/cpu85 ../../cpu/cpu85 -tests/virhostcpudata/linux-subcores1/node/node16/cpu86 ../../cpu/cpu86 -tests/virhostcpudata/linux-subcores1/node/node16/cpu87 ../../cpu/cpu87 -tests/virhostcpudata/linux-subcores1/node/node16/cpu88 ../../cpu/cpu88 -tests/virhostcpudata/linux-subcores1/node/node16/cpu89 ../../cpu/cpu89 -tests/virhostcpudata/linux-subcores1/node/node16/cpu90 ../../cpu/cpu90 -tests/virhostcpudata/linux-subcores1/node/node16/cpu91 ../../cpu/cpu91 -tests/virhostcpudata/linux-subcores1/node/node16/cpu92 ../../cpu/cpu92 -tests/virhostcpudata/linux-subcores1/node/node16/cpu93 ../../cpu/cpu93 -tests/virhostcpudata/linux-subcores1/node/node16/cpu94 ../../cpu/cpu94 -tests/virhostcpudata/linux-subcores1/node/node16/cpu95 ../../cpu/cpu95 -tests/virhostcpudata/linux-subcores1/node/node16/cpu96 ../../cpu/cpu96 -tests/virhostcpudata/linux-subcores1/node/node16/cpu97 ../../cpu/cpu97 -tests/virhostcpudata/linux-subcores1/node/node16/cpu98 ../../cpu/cpu98 -tests/virhostcpudata/linux-subcores1/node/node16/cpu99 ../../cpu/cpu99 -tests/virhostcpudata/linux-subcores1/node/node17/cpu120 ../../cpu/cpu120 -tests/virhostcpudata/linux-subcores1/node/node17/cpu121 ../../cpu/cpu121 -tests/virhostcpudata/linux-subcores1/node/node17/cpu122 ../../cpu/cpu122 -tests/virhostcpudata/linux-subcores1/node/node17/cpu123 ../../cpu/cpu123 -tests/virhostcpudata/linux-subcores1/node/node17/cpu124 ../../cpu/cpu124 -tests/virhostcpudata/linux-subcores1/node/node17/cpu125 ../../cpu/cpu125 -tests/virhostcpudata/linux-subcores1/node/node17/cpu126 ../../cpu/cpu126 -tests/virhostcpudata/linux-subcores1/node/node17/cpu127 ../../cpu/cpu127 -tests/virhostcpudata/linux-subcores1/node/node17/cpu128 ../../cpu/cpu128 -tests/virhostcpudata/linux-subcores1/node/node17/cpu129 ../../cpu/cpu129 -tests/virhostcpudata/linux-subcores1/node/node17/cpu130 ../../cpu/cpu130 -tests/virhostcpudata/linux-subcores1/node/node17/cpu131 ../../cpu/cpu131 -tests/virhostcpudata/linux-subcores1/node/node17/cpu132 ../../cpu/cpu132 -tests/virhostcpudata/linux-subcores1/node/node17/cpu133 ../../cpu/cpu133 -tests/virhostcpudata/linux-subcores1/node/node17/cpu134 ../../cpu/cpu134 -tests/virhostcpudata/linux-subcores1/node/node17/cpu135 ../../cpu/cpu135 -tests/virhostcpudata/linux-subcores1/node/node17/cpu136 ../../cpu/cpu136 -tests/virhostcpudata/linux-subcores1/node/node17/cpu137 ../../cpu/cpu137 -tests/virhostcpudata/linux-subcores1/node/node17/cpu138 ../../cpu/cpu138 -tests/virhostcpudata/linux-subcores1/node/node17/cpu139 ../../cpu/cpu139 -tests/virhostcpudata/linux-subcores1/node/node17/cpu140 ../../cpu/cpu140 -tests/virhostcpudata/linux-subcores1/node/node17/cpu141 ../../cpu/cpu141 -tests/virhostcpudata/linux-subcores1/node/node17/cpu142 ../../cpu/cpu142 -tests/virhostcpudata/linux-subcores1/node/node17/cpu143 ../../cpu/cpu143 -tests/virhostcpudata/linux-subcores1/node/node17/cpu144 ../../cpu/cpu144 -tests/virhostcpudata/linux-subcores1/node/node17/cpu145 ../../cpu/cpu145 -tests/virhostcpudata/linux-subcores1/node/node17/cpu146 ../../cpu/cpu146 -tests/virhostcpudata/linux-subcores1/node/node17/cpu147 ../../cpu/cpu147 -tests/virhostcpudata/linux-subcores1/node/node17/cpu148 ../../cpu/cpu148 -tests/virhostcpudata/linux-subcores1/node/node17/cpu149 ../../cpu/cpu149 -tests/virhostcpudata/linux-subcores1/node/node17/cpu150 ../../cpu/cpu150 -tests/virhostcpudata/linux-subcores1/node/node17/cpu151 ../../cpu/cpu151 -tests/virhostcpudata/linux-subcores1/node/node17/cpu152 ../../cpu/cpu152 -tests/virhostcpudata/linux-subcores1/node/node17/cpu153 ../../cpu/cpu153 -tests/virhostcpudata/linux-subcores1/node/node17/cpu154 ../../cpu/cpu154 -tests/virhostcpudata/linux-subcores1/node/node17/cpu155 ../../cpu/cpu155 -tests/virhostcpudata/linux-subcores1/node/node17/cpu156 ../../cpu/cpu156 -tests/virhostcpudata/linux-subcores1/node/node17/cpu157 ../../cpu/cpu157 -tests/virhostcpudata/linux-subcores1/node/node17/cpu158 ../../cpu/cpu158 -tests/virhostcpudata/linux-subcores1/node/node17/cpu159 ../../cpu/cpu159 -tests/virhostcpudata/linux-subcores2/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-subcores2/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-subcores2/node/node0/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-subcores2/node/node0/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-subcores2/node/node0/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-subcores2/node/node0/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-subcores2/node/node0/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-subcores2/node/node0/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-subcores2/node/node0/cpu16 ../../cpu/cpu16 -tests/virhostcpudata/linux-subcores2/node/node0/cpu17 ../../cpu/cpu17 -tests/virhostcpudata/linux-subcores2/node/node0/cpu18 ../../cpu/cpu18 -tests/virhostcpudata/linux-subcores2/node/node0/cpu19 ../../cpu/cpu19 -tests/virhostcpudata/linux-subcores2/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-subcores2/node/node0/cpu20 ../../cpu/cpu20 -tests/virhostcpudata/linux-subcores2/node/node0/cpu21 ../../cpu/cpu21 -tests/virhostcpudata/linux-subcores2/node/node0/cpu22 ../../cpu/cpu22 -tests/virhostcpudata/linux-subcores2/node/node0/cpu23 ../../cpu/cpu23 -tests/virhostcpudata/linux-subcores2/node/node0/cpu24 ../../cpu/cpu24 -tests/virhostcpudata/linux-subcores2/node/node0/cpu25 ../../cpu/cpu25 -tests/virhostcpudata/linux-subcores2/node/node0/cpu26 ../../cpu/cpu26 -tests/virhostcpudata/linux-subcores2/node/node0/cpu27 ../../cpu/cpu27 -tests/virhostcpudata/linux-subcores2/node/node0/cpu28 ../../cpu/cpu28 -tests/virhostcpudata/linux-subcores2/node/node0/cpu29 ../../cpu/cpu29 -tests/virhostcpudata/linux-subcores2/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-subcores2/node/node0/cpu30 ../../cpu/cpu30 -tests/virhostcpudata/linux-subcores2/node/node0/cpu31 ../../cpu/cpu31 -tests/virhostcpudata/linux-subcores2/node/node0/cpu32 ../../cpu/cpu32 -tests/virhostcpudata/linux-subcores2/node/node0/cpu33 ../../cpu/cpu33 -tests/virhostcpudata/linux-subcores2/node/node0/cpu34 ../../cpu/cpu34 -tests/virhostcpudata/linux-subcores2/node/node0/cpu35 ../../cpu/cpu35 -tests/virhostcpudata/linux-subcores2/node/node0/cpu36 ../../cpu/cpu36 -tests/virhostcpudata/linux-subcores2/node/node0/cpu37 ../../cpu/cpu37 -tests/virhostcpudata/linux-subcores2/node/node0/cpu38 ../../cpu/cpu38 -tests/virhostcpudata/linux-subcores2/node/node0/cpu39 ../../cpu/cpu39 -tests/virhostcpudata/linux-subcores2/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-subcores2/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-subcores2/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-subcores2/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-subcores2/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-subcores2/node/node0/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-subcores2/node/node1/cpu40 ../../cpu/cpu40 -tests/virhostcpudata/linux-subcores2/node/node1/cpu41 ../../cpu/cpu41 -tests/virhostcpudata/linux-subcores2/node/node1/cpu42 ../../cpu/cpu42 -tests/virhostcpudata/linux-subcores2/node/node1/cpu43 ../../cpu/cpu43 -tests/virhostcpudata/linux-subcores2/node/node1/cpu44 ../../cpu/cpu44 -tests/virhostcpudata/linux-subcores2/node/node1/cpu45 ../../cpu/cpu45 -tests/virhostcpudata/linux-subcores2/node/node1/cpu46 ../../cpu/cpu46 -tests/virhostcpudata/linux-subcores2/node/node1/cpu47 ../../cpu/cpu47 -tests/virhostcpudata/linux-subcores2/node/node1/cpu48 ../../cpu/cpu48 -tests/virhostcpudata/linux-subcores2/node/node1/cpu49 ../../cpu/cpu49 -tests/virhostcpudata/linux-subcores2/node/node1/cpu50 ../../cpu/cpu50 -tests/virhostcpudata/linux-subcores2/node/node1/cpu51 ../../cpu/cpu51 -tests/virhostcpudata/linux-subcores2/node/node1/cpu52 ../../cpu/cpu52 -tests/virhostcpudata/linux-subcores2/node/node1/cpu53 ../../cpu/cpu53 -tests/virhostcpudata/linux-subcores2/node/node1/cpu54 ../../cpu/cpu54 -tests/virhostcpudata/linux-subcores2/node/node1/cpu55 ../../cpu/cpu55 -tests/virhostcpudata/linux-subcores2/node/node1/cpu56 ../../cpu/cpu56 -tests/virhostcpudata/linux-subcores2/node/node1/cpu57 ../../cpu/cpu57 -tests/virhostcpudata/linux-subcores2/node/node1/cpu58 ../../cpu/cpu58 -tests/virhostcpudata/linux-subcores2/node/node1/cpu59 ../../cpu/cpu59 -tests/virhostcpudata/linux-subcores2/node/node1/cpu60 ../../cpu/cpu60 -tests/virhostcpudata/linux-subcores2/node/node1/cpu61 ../../cpu/cpu61 -tests/virhostcpudata/linux-subcores2/node/node1/cpu62 ../../cpu/cpu62 -tests/virhostcpudata/linux-subcores2/node/node1/cpu63 ../../cpu/cpu63 -tests/virhostcpudata/linux-subcores2/node/node1/cpu64 ../../cpu/cpu64 -tests/virhostcpudata/linux-subcores2/node/node1/cpu65 ../../cpu/cpu65 -tests/virhostcpudata/linux-subcores2/node/node1/cpu66 ../../cpu/cpu66 -tests/virhostcpudata/linux-subcores2/node/node1/cpu67 ../../cpu/cpu67 -tests/virhostcpudata/linux-subcores2/node/node1/cpu68 ../../cpu/cpu68 -tests/virhostcpudata/linux-subcores2/node/node1/cpu69 ../../cpu/cpu69 -tests/virhostcpudata/linux-subcores2/node/node1/cpu70 ../../cpu/cpu70 -tests/virhostcpudata/linux-subcores2/node/node1/cpu71 ../../cpu/cpu71 -tests/virhostcpudata/linux-subcores2/node/node1/cpu72 ../../cpu/cpu72 -tests/virhostcpudata/linux-subcores2/node/node1/cpu73 ../../cpu/cpu73 -tests/virhostcpudata/linux-subcores2/node/node1/cpu74 ../../cpu/cpu74 -tests/virhostcpudata/linux-subcores2/node/node1/cpu75 ../../cpu/cpu75 -tests/virhostcpudata/linux-subcores2/node/node1/cpu76 ../../cpu/cpu76 -tests/virhostcpudata/linux-subcores2/node/node1/cpu77 ../../cpu/cpu77 -tests/virhostcpudata/linux-subcores2/node/node1/cpu78 ../../cpu/cpu78 -tests/virhostcpudata/linux-subcores2/node/node1/cpu79 ../../cpu/cpu79 -tests/virhostcpudata/linux-subcores2/node/node16/cpu100 ../../cpu/cpu100 -tests/virhostcpudata/linux-subcores2/node/node16/cpu101 ../../cpu/cpu101 -tests/virhostcpudata/linux-subcores2/node/node16/cpu102 ../../cpu/cpu102 -tests/virhostcpudata/linux-subcores2/node/node16/cpu103 ../../cpu/cpu103 -tests/virhostcpudata/linux-subcores2/node/node16/cpu104 ../../cpu/cpu104 -tests/virhostcpudata/linux-subcores2/node/node16/cpu105 ../../cpu/cpu105 -tests/virhostcpudata/linux-subcores2/node/node16/cpu106 ../../cpu/cpu106 -tests/virhostcpudata/linux-subcores2/node/node16/cpu107 ../../cpu/cpu107 -tests/virhostcpudata/linux-subcores2/node/node16/cpu108 ../../cpu/cpu108 -tests/virhostcpudata/linux-subcores2/node/node16/cpu109 ../../cpu/cpu109 -tests/virhostcpudata/linux-subcores2/node/node16/cpu110 ../../cpu/cpu110 -tests/virhostcpudata/linux-subcores2/node/node16/cpu111 ../../cpu/cpu111 -tests/virhostcpudata/linux-subcores2/node/node16/cpu112 ../../cpu/cpu112 -tests/virhostcpudata/linux-subcores2/node/node16/cpu113 ../../cpu/cpu113 -tests/virhostcpudata/linux-subcores2/node/node16/cpu114 ../../cpu/cpu114 -tests/virhostcpudata/linux-subcores2/node/node16/cpu115 ../../cpu/cpu115 -tests/virhostcpudata/linux-subcores2/node/node16/cpu116 ../../cpu/cpu116 -tests/virhostcpudata/linux-subcores2/node/node16/cpu117 ../../cpu/cpu117 -tests/virhostcpudata/linux-subcores2/node/node16/cpu118 ../../cpu/cpu118 -tests/virhostcpudata/linux-subcores2/node/node16/cpu119 ../../cpu/cpu119 -tests/virhostcpudata/linux-subcores2/node/node16/cpu80 ../../cpu/cpu80 -tests/virhostcpudata/linux-subcores2/node/node16/cpu81 ../../cpu/cpu81 -tests/virhostcpudata/linux-subcores2/node/node16/cpu82 ../../cpu/cpu82 -tests/virhostcpudata/linux-subcores2/node/node16/cpu83 ../../cpu/cpu83 -tests/virhostcpudata/linux-subcores2/node/node16/cpu84 ../../cpu/cpu84 -tests/virhostcpudata/linux-subcores2/node/node16/cpu85 ../../cpu/cpu85 -tests/virhostcpudata/linux-subcores2/node/node16/cpu86 ../../cpu/cpu86 -tests/virhostcpudata/linux-subcores2/node/node16/cpu87 ../../cpu/cpu87 -tests/virhostcpudata/linux-subcores2/node/node16/cpu88 ../../cpu/cpu88 -tests/virhostcpudata/linux-subcores2/node/node16/cpu89 ../../cpu/cpu89 -tests/virhostcpudata/linux-subcores2/node/node16/cpu90 ../../cpu/cpu90 -tests/virhostcpudata/linux-subcores2/node/node16/cpu91 ../../cpu/cpu91 -tests/virhostcpudata/linux-subcores2/node/node16/cpu92 ../../cpu/cpu92 -tests/virhostcpudata/linux-subcores2/node/node16/cpu93 ../../cpu/cpu93 -tests/virhostcpudata/linux-subcores2/node/node16/cpu94 ../../cpu/cpu94 -tests/virhostcpudata/linux-subcores2/node/node16/cpu95 ../../cpu/cpu95 -tests/virhostcpudata/linux-subcores2/node/node16/cpu96 ../../cpu/cpu96 -tests/virhostcpudata/linux-subcores2/node/node16/cpu97 ../../cpu/cpu97 -tests/virhostcpudata/linux-subcores2/node/node16/cpu98 ../../cpu/cpu98 -tests/virhostcpudata/linux-subcores2/node/node16/cpu99 ../../cpu/cpu99 -tests/virhostcpudata/linux-subcores2/node/node17/cpu120 ../../cpu/cpu120 -tests/virhostcpudata/linux-subcores2/node/node17/cpu121 ../../cpu/cpu121 -tests/virhostcpudata/linux-subcores2/node/node17/cpu122 ../../cpu/cpu122 -tests/virhostcpudata/linux-subcores2/node/node17/cpu123 ../../cpu/cpu123 -tests/virhostcpudata/linux-subcores2/node/node17/cpu124 ../../cpu/cpu124 -tests/virhostcpudata/linux-subcores2/node/node17/cpu125 ../../cpu/cpu125 -tests/virhostcpudata/linux-subcores2/node/node17/cpu126 ../../cpu/cpu126 -tests/virhostcpudata/linux-subcores2/node/node17/cpu127 ../../cpu/cpu127 -tests/virhostcpudata/linux-subcores2/node/node17/cpu128 ../../cpu/cpu128 -tests/virhostcpudata/linux-subcores2/node/node17/cpu129 ../../cpu/cpu129 -tests/virhostcpudata/linux-subcores2/node/node17/cpu130 ../../cpu/cpu130 -tests/virhostcpudata/linux-subcores2/node/node17/cpu131 ../../cpu/cpu131 -tests/virhostcpudata/linux-subcores2/node/node17/cpu132 ../../cpu/cpu132 -tests/virhostcpudata/linux-subcores2/node/node17/cpu133 ../../cpu/cpu133 -tests/virhostcpudata/linux-subcores2/node/node17/cpu134 ../../cpu/cpu134 -tests/virhostcpudata/linux-subcores2/node/node17/cpu135 ../../cpu/cpu135 -tests/virhostcpudata/linux-subcores2/node/node17/cpu136 ../../cpu/cpu136 -tests/virhostcpudata/linux-subcores2/node/node17/cpu137 ../../cpu/cpu137 -tests/virhostcpudata/linux-subcores2/node/node17/cpu138 ../../cpu/cpu138 -tests/virhostcpudata/linux-subcores2/node/node17/cpu139 ../../cpu/cpu139 -tests/virhostcpudata/linux-subcores2/node/node17/cpu140 ../../cpu/cpu140 -tests/virhostcpudata/linux-subcores2/node/node17/cpu141 ../../cpu/cpu141 -tests/virhostcpudata/linux-subcores2/node/node17/cpu142 ../../cpu/cpu142 -tests/virhostcpudata/linux-subcores2/node/node17/cpu143 ../../cpu/cpu143 -tests/virhostcpudata/linux-subcores2/node/node17/cpu144 ../../cpu/cpu144 -tests/virhostcpudata/linux-subcores2/node/node17/cpu145 ../../cpu/cpu145 -tests/virhostcpudata/linux-subcores2/node/node17/cpu146 ../../cpu/cpu146 -tests/virhostcpudata/linux-subcores2/node/node17/cpu147 ../../cpu/cpu147 -tests/virhostcpudata/linux-subcores2/node/node17/cpu148 ../../cpu/cpu148 -tests/virhostcpudata/linux-subcores2/node/node17/cpu149 ../../cpu/cpu149 -tests/virhostcpudata/linux-subcores2/node/node17/cpu150 ../../cpu/cpu150 -tests/virhostcpudata/linux-subcores2/node/node17/cpu151 ../../cpu/cpu151 -tests/virhostcpudata/linux-subcores2/node/node17/cpu152 ../../cpu/cpu152 -tests/virhostcpudata/linux-subcores2/node/node17/cpu153 ../../cpu/cpu153 -tests/virhostcpudata/linux-subcores2/node/node17/cpu154 ../../cpu/cpu154 -tests/virhostcpudata/linux-subcores2/node/node17/cpu155 ../../cpu/cpu155 -tests/virhostcpudata/linux-subcores2/node/node17/cpu156 ../../cpu/cpu156 -tests/virhostcpudata/linux-subcores2/node/node17/cpu157 ../../cpu/cpu157 -tests/virhostcpudata/linux-subcores2/node/node17/cpu158 ../../cpu/cpu158 -tests/virhostcpudata/linux-subcores2/node/node17/cpu159 ../../cpu/cpu159 -tests/virhostcpudata/linux-subcores3/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-subcores3/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-subcores3/node/node0/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-subcores3/node/node0/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-subcores3/node/node0/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-subcores3/node/node0/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-subcores3/node/node0/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-subcores3/node/node0/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-subcores3/node/node0/cpu16 ../../cpu/cpu16 -tests/virhostcpudata/linux-subcores3/node/node0/cpu17 ../../cpu/cpu17 -tests/virhostcpudata/linux-subcores3/node/node0/cpu18 ../../cpu/cpu18 -tests/virhostcpudata/linux-subcores3/node/node0/cpu19 ../../cpu/cpu19 -tests/virhostcpudata/linux-subcores3/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-subcores3/node/node0/cpu20 ../../cpu/cpu20 -tests/virhostcpudata/linux-subcores3/node/node0/cpu21 ../../cpu/cpu21 -tests/virhostcpudata/linux-subcores3/node/node0/cpu22 ../../cpu/cpu22 -tests/virhostcpudata/linux-subcores3/node/node0/cpu23 ../../cpu/cpu23 -tests/virhostcpudata/linux-subcores3/node/node0/cpu24 ../../cpu/cpu24 -tests/virhostcpudata/linux-subcores3/node/node0/cpu25 ../../cpu/cpu25 -tests/virhostcpudata/linux-subcores3/node/node0/cpu26 ../../cpu/cpu26 -tests/virhostcpudata/linux-subcores3/node/node0/cpu27 ../../cpu/cpu27 -tests/virhostcpudata/linux-subcores3/node/node0/cpu28 ../../cpu/cpu28 -tests/virhostcpudata/linux-subcores3/node/node0/cpu29 ../../cpu/cpu29 -tests/virhostcpudata/linux-subcores3/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-subcores3/node/node0/cpu30 ../../cpu/cpu30 -tests/virhostcpudata/linux-subcores3/node/node0/cpu31 ../../cpu/cpu31 -tests/virhostcpudata/linux-subcores3/node/node0/cpu32 ../../cpu/cpu32 -tests/virhostcpudata/linux-subcores3/node/node0/cpu33 ../../cpu/cpu33 -tests/virhostcpudata/linux-subcores3/node/node0/cpu34 ../../cpu/cpu34 -tests/virhostcpudata/linux-subcores3/node/node0/cpu35 ../../cpu/cpu35 -tests/virhostcpudata/linux-subcores3/node/node0/cpu36 ../../cpu/cpu36 -tests/virhostcpudata/linux-subcores3/node/node0/cpu37 ../../cpu/cpu37 -tests/virhostcpudata/linux-subcores3/node/node0/cpu38 ../../cpu/cpu38 -tests/virhostcpudata/linux-subcores3/node/node0/cpu39 ../../cpu/cpu39 -tests/virhostcpudata/linux-subcores3/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-subcores3/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-subcores3/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-subcores3/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-subcores3/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-subcores3/node/node0/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-subcores3/node/node1/cpu40 ../../cpu/cpu40 -tests/virhostcpudata/linux-subcores3/node/node1/cpu41 ../../cpu/cpu41 -tests/virhostcpudata/linux-subcores3/node/node1/cpu42 ../../cpu/cpu42 -tests/virhostcpudata/linux-subcores3/node/node1/cpu43 ../../cpu/cpu43 -tests/virhostcpudata/linux-subcores3/node/node1/cpu44 ../../cpu/cpu44 -tests/virhostcpudata/linux-subcores3/node/node1/cpu45 ../../cpu/cpu45 -tests/virhostcpudata/linux-subcores3/node/node1/cpu46 ../../cpu/cpu46 -tests/virhostcpudata/linux-subcores3/node/node1/cpu47 ../../cpu/cpu47 -tests/virhostcpudata/linux-subcores3/node/node1/cpu48 ../../cpu/cpu48 -tests/virhostcpudata/linux-subcores3/node/node1/cpu49 ../../cpu/cpu49 -tests/virhostcpudata/linux-subcores3/node/node1/cpu50 ../../cpu/cpu50 -tests/virhostcpudata/linux-subcores3/node/node1/cpu51 ../../cpu/cpu51 -tests/virhostcpudata/linux-subcores3/node/node1/cpu52 ../../cpu/cpu52 -tests/virhostcpudata/linux-subcores3/node/node1/cpu53 ../../cpu/cpu53 -tests/virhostcpudata/linux-subcores3/node/node1/cpu54 ../../cpu/cpu54 -tests/virhostcpudata/linux-subcores3/node/node1/cpu55 ../../cpu/cpu55 -tests/virhostcpudata/linux-subcores3/node/node1/cpu56 ../../cpu/cpu56 -tests/virhostcpudata/linux-subcores3/node/node1/cpu57 ../../cpu/cpu57 -tests/virhostcpudata/linux-subcores3/node/node1/cpu58 ../../cpu/cpu58 -tests/virhostcpudata/linux-subcores3/node/node1/cpu59 ../../cpu/cpu59 -tests/virhostcpudata/linux-subcores3/node/node1/cpu60 ../../cpu/cpu60 -tests/virhostcpudata/linux-subcores3/node/node1/cpu61 ../../cpu/cpu61 -tests/virhostcpudata/linux-subcores3/node/node1/cpu62 ../../cpu/cpu62 -tests/virhostcpudata/linux-subcores3/node/node1/cpu63 ../../cpu/cpu63 -tests/virhostcpudata/linux-subcores3/node/node1/cpu64 ../../cpu/cpu64 -tests/virhostcpudata/linux-subcores3/node/node1/cpu65 ../../cpu/cpu65 -tests/virhostcpudata/linux-subcores3/node/node1/cpu66 ../../cpu/cpu66 -tests/virhostcpudata/linux-subcores3/node/node1/cpu67 ../../cpu/cpu67 -tests/virhostcpudata/linux-subcores3/node/node1/cpu68 ../../cpu/cpu68 -tests/virhostcpudata/linux-subcores3/node/node1/cpu69 ../../cpu/cpu69 -tests/virhostcpudata/linux-subcores3/node/node1/cpu70 ../../cpu/cpu70 -tests/virhostcpudata/linux-subcores3/node/node1/cpu71 ../../cpu/cpu71 -tests/virhostcpudata/linux-subcores3/node/node1/cpu72 ../../cpu/cpu72 -tests/virhostcpudata/linux-subcores3/node/node1/cpu73 ../../cpu/cpu73 -tests/virhostcpudata/linux-subcores3/node/node1/cpu74 ../../cpu/cpu74 -tests/virhostcpudata/linux-subcores3/node/node1/cpu75 ../../cpu/cpu75 -tests/virhostcpudata/linux-subcores3/node/node1/cpu76 ../../cpu/cpu76 -tests/virhostcpudata/linux-subcores3/node/node1/cpu77 ../../cpu/cpu77 -tests/virhostcpudata/linux-subcores3/node/node1/cpu78 ../../cpu/cpu78 -tests/virhostcpudata/linux-subcores3/node/node1/cpu79 ../../cpu/cpu79 -tests/virhostcpudata/linux-subcores3/node/node16/cpu100 ../../cpu/cpu100 -tests/virhostcpudata/linux-subcores3/node/node16/cpu101 ../../cpu/cpu101 -tests/virhostcpudata/linux-subcores3/node/node16/cpu102 ../../cpu/cpu102 -tests/virhostcpudata/linux-subcores3/node/node16/cpu103 ../../cpu/cpu103 -tests/virhostcpudata/linux-subcores3/node/node16/cpu104 ../../cpu/cpu104 -tests/virhostcpudata/linux-subcores3/node/node16/cpu105 ../../cpu/cpu105 -tests/virhostcpudata/linux-subcores3/node/node16/cpu106 ../../cpu/cpu106 -tests/virhostcpudata/linux-subcores3/node/node16/cpu107 ../../cpu/cpu107 -tests/virhostcpudata/linux-subcores3/node/node16/cpu108 ../../cpu/cpu108 -tests/virhostcpudata/linux-subcores3/node/node16/cpu109 ../../cpu/cpu109 -tests/virhostcpudata/linux-subcores3/node/node16/cpu110 ../../cpu/cpu110 -tests/virhostcpudata/linux-subcores3/node/node16/cpu111 ../../cpu/cpu111 -tests/virhostcpudata/linux-subcores3/node/node16/cpu112 ../../cpu/cpu112 -tests/virhostcpudata/linux-subcores3/node/node16/cpu113 ../../cpu/cpu113 -tests/virhostcpudata/linux-subcores3/node/node16/cpu114 ../../cpu/cpu114 -tests/virhostcpudata/linux-subcores3/node/node16/cpu115 ../../cpu/cpu115 -tests/virhostcpudata/linux-subcores3/node/node16/cpu116 ../../cpu/cpu116 -tests/virhostcpudata/linux-subcores3/node/node16/cpu117 ../../cpu/cpu117 -tests/virhostcpudata/linux-subcores3/node/node16/cpu118 ../../cpu/cpu118 -tests/virhostcpudata/linux-subcores3/node/node16/cpu119 ../../cpu/cpu119 -tests/virhostcpudata/linux-subcores3/node/node16/cpu80 ../../cpu/cpu80 -tests/virhostcpudata/linux-subcores3/node/node16/cpu81 ../../cpu/cpu81 -tests/virhostcpudata/linux-subcores3/node/node16/cpu82 ../../cpu/cpu82 -tests/virhostcpudata/linux-subcores3/node/node16/cpu83 ../../cpu/cpu83 -tests/virhostcpudata/linux-subcores3/node/node16/cpu84 ../../cpu/cpu84 -tests/virhostcpudata/linux-subcores3/node/node16/cpu85 ../../cpu/cpu85 -tests/virhostcpudata/linux-subcores3/node/node16/cpu86 ../../cpu/cpu86 -tests/virhostcpudata/linux-subcores3/node/node16/cpu87 ../../cpu/cpu87 -tests/virhostcpudata/linux-subcores3/node/node16/cpu88 ../../cpu/cpu88 -tests/virhostcpudata/linux-subcores3/node/node16/cpu89 ../../cpu/cpu89 -tests/virhostcpudata/linux-subcores3/node/node16/cpu90 ../../cpu/cpu90 -tests/virhostcpudata/linux-subcores3/node/node16/cpu91 ../../cpu/cpu91 -tests/virhostcpudata/linux-subcores3/node/node16/cpu92 ../../cpu/cpu92 -tests/virhostcpudata/linux-subcores3/node/node16/cpu93 ../../cpu/cpu93 -tests/virhostcpudata/linux-subcores3/node/node16/cpu94 ../../cpu/cpu94 -tests/virhostcpudata/linux-subcores3/node/node16/cpu95 ../../cpu/cpu95 -tests/virhostcpudata/linux-subcores3/node/node16/cpu96 ../../cpu/cpu96 -tests/virhostcpudata/linux-subcores3/node/node16/cpu97 ../../cpu/cpu97 -tests/virhostcpudata/linux-subcores3/node/node16/cpu98 ../../cpu/cpu98 -tests/virhostcpudata/linux-subcores3/node/node16/cpu99 ../../cpu/cpu99 -tests/virhostcpudata/linux-subcores3/node/node17/cpu120 ../../cpu/cpu120 -tests/virhostcpudata/linux-subcores3/node/node17/cpu121 ../../cpu/cpu121 -tests/virhostcpudata/linux-subcores3/node/node17/cpu122 ../../cpu/cpu122 -tests/virhostcpudata/linux-subcores3/node/node17/cpu123 ../../cpu/cpu123 -tests/virhostcpudata/linux-subcores3/node/node17/cpu124 ../../cpu/cpu124 -tests/virhostcpudata/linux-subcores3/node/node17/cpu125 ../../cpu/cpu125 -tests/virhostcpudata/linux-subcores3/node/node17/cpu126 ../../cpu/cpu126 -tests/virhostcpudata/linux-subcores3/node/node17/cpu127 ../../cpu/cpu127 -tests/virhostcpudata/linux-subcores3/node/node17/cpu128 ../../cpu/cpu128 -tests/virhostcpudata/linux-subcores3/node/node17/cpu129 ../../cpu/cpu129 -tests/virhostcpudata/linux-subcores3/node/node17/cpu130 ../../cpu/cpu130 -tests/virhostcpudata/linux-subcores3/node/node17/cpu131 ../../cpu/cpu131 -tests/virhostcpudata/linux-subcores3/node/node17/cpu132 ../../cpu/cpu132 -tests/virhostcpudata/linux-subcores3/node/node17/cpu133 ../../cpu/cpu133 -tests/virhostcpudata/linux-subcores3/node/node17/cpu134 ../../cpu/cpu134 -tests/virhostcpudata/linux-subcores3/node/node17/cpu135 ../../cpu/cpu135 -tests/virhostcpudata/linux-subcores3/node/node17/cpu136 ../../cpu/cpu136 -tests/virhostcpudata/linux-subcores3/node/node17/cpu137 ../../cpu/cpu137 -tests/virhostcpudata/linux-subcores3/node/node17/cpu138 ../../cpu/cpu138 -tests/virhostcpudata/linux-subcores3/node/node17/cpu139 ../../cpu/cpu139 -tests/virhostcpudata/linux-subcores3/node/node17/cpu140 ../../cpu/cpu140 -tests/virhostcpudata/linux-subcores3/node/node17/cpu141 ../../cpu/cpu141 -tests/virhostcpudata/linux-subcores3/node/node17/cpu142 ../../cpu/cpu142 -tests/virhostcpudata/linux-subcores3/node/node17/cpu143 ../../cpu/cpu143 -tests/virhostcpudata/linux-subcores3/node/node17/cpu144 ../../cpu/cpu144 -tests/virhostcpudata/linux-subcores3/node/node17/cpu145 ../../cpu/cpu145 -tests/virhostcpudata/linux-subcores3/node/node17/cpu146 ../../cpu/cpu146 -tests/virhostcpudata/linux-subcores3/node/node17/cpu147 ../../cpu/cpu147 -tests/virhostcpudata/linux-subcores3/node/node17/cpu148 ../../cpu/cpu148 -tests/virhostcpudata/linux-subcores3/node/node17/cpu149 ../../cpu/cpu149 -tests/virhostcpudata/linux-subcores3/node/node17/cpu150 ../../cpu/cpu150 -tests/virhostcpudata/linux-subcores3/node/node17/cpu151 ../../cpu/cpu151 -tests/virhostcpudata/linux-subcores3/node/node17/cpu152 ../../cpu/cpu152 -tests/virhostcpudata/linux-subcores3/node/node17/cpu153 ../../cpu/cpu153 -tests/virhostcpudata/linux-subcores3/node/node17/cpu154 ../../cpu/cpu154 -tests/virhostcpudata/linux-subcores3/node/node17/cpu155 ../../cpu/cpu155 -tests/virhostcpudata/linux-subcores3/node/node17/cpu156 ../../cpu/cpu156 -tests/virhostcpudata/linux-subcores3/node/node17/cpu157 ../../cpu/cpu157 -tests/virhostcpudata/linux-subcores3/node/node17/cpu158 ../../cpu/cpu158 -tests/virhostcpudata/linux-subcores3/node/node17/cpu159 ../../cpu/cpu159 -tests/virhostcpudata/linux-test2/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-test2/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-test3/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-test3/node/node0/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-test3/node/node0/cpu16 ../../cpu/cpu16 -tests/virhostcpudata/linux-test3/node/node0/cpu20 ../../cpu/cpu20 -tests/virhostcpudata/linux-test3/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-test3/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-test3/node/node1/cpu24 ../../cpu/cpu24 -tests/virhostcpudata/linux-test3/node/node1/cpu28 ../../cpu/cpu28 -tests/virhostcpudata/linux-test3/node/node1/cpu32 ../../cpu/cpu32 -tests/virhostcpudata/linux-test3/node/node1/cpu36 ../../cpu/cpu36 -tests/virhostcpudata/linux-test3/node/node1/cpu40 ../../cpu/cpu40 -tests/virhostcpudata/linux-test3/node/node1/cpu44 ../../cpu/cpu44 -tests/virhostcpudata/linux-test3/node/node2/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-test3/node/node2/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-test3/node/node2/cpu19 ../../cpu/cpu19 -tests/virhostcpudata/linux-test3/node/node2/cpu23 ../../cpu/cpu23 -tests/virhostcpudata/linux-test3/node/node2/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-test3/node/node2/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-test3/node/node3/cpu27 ../../cpu/cpu27 -tests/virhostcpudata/linux-test3/node/node3/cpu31 ../../cpu/cpu31 -tests/virhostcpudata/linux-test3/node/node3/cpu35 ../../cpu/cpu35 -tests/virhostcpudata/linux-test3/node/node3/cpu39 ../../cpu/cpu39 -tests/virhostcpudata/linux-test3/node/node3/cpu43 ../../cpu/cpu43 -tests/virhostcpudata/linux-test3/node/node3/cpu47 ../../cpu/cpu47 -tests/virhostcpudata/linux-test3/node/node4/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-test3/node/node4/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-test3/node/node4/cpu18 ../../cpu/cpu18 -tests/virhostcpudata/linux-test3/node/node4/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-test3/node/node4/cpu22 ../../cpu/cpu22 -tests/virhostcpudata/linux-test3/node/node4/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-test3/node/node5/cpu26 ../../cpu/cpu26 -tests/virhostcpudata/linux-test3/node/node5/cpu30 ../../cpu/cpu30 -tests/virhostcpudata/linux-test3/node/node5/cpu34 ../../cpu/cpu34 -tests/virhostcpudata/linux-test3/node/node5/cpu38 ../../cpu/cpu38 -tests/virhostcpudata/linux-test3/node/node5/cpu42 ../../cpu/cpu42 -tests/virhostcpudata/linux-test3/node/node5/cpu46 ../../cpu/cpu46 -tests/virhostcpudata/linux-test3/node/node6/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-test3/node/node6/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-test3/node/node6/cpu17 ../../cpu/cpu17 -tests/virhostcpudata/linux-test3/node/node6/cpu21 ../../cpu/cpu21 -tests/virhostcpudata/linux-test3/node/node6/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-test3/node/node6/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-test3/node/node7/cpu25 ../../cpu/cpu25 -tests/virhostcpudata/linux-test3/node/node7/cpu29 ../../cpu/cpu29 -tests/virhostcpudata/linux-test3/node/node7/cpu33 ../../cpu/cpu33 -tests/virhostcpudata/linux-test3/node/node7/cpu37 ../../cpu/cpu37 -tests/virhostcpudata/linux-test3/node/node7/cpu41 ../../cpu/cpu41 -tests/virhostcpudata/linux-test3/node/node7/cpu45 ../../cpu/cpu45 -tests/virhostcpudata/linux-test4/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-test4/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-test4/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-test4/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-test4/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-test4/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-test4/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-test4/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-test4/node/node1/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-test4/node/node1/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-test4/node/node1/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-test4/node/node1/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-test4/node/node1/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-test4/node/node1/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-test4/node/node1/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-test4/node/node1/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-test6/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-test6/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-test6/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-test6/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-test6/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-test6/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-test6/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-test6/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-test7/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-test7/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-test7/node/node0/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-test7/node/node0/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-test7/node/node0/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-test7/node/node0/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-test7/node/node0/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-test7/node/node0/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-test7/node/node0/cpu16 ../../cpu/cpu16 -tests/virhostcpudata/linux-test7/node/node0/cpu17 ../../cpu/cpu17 -tests/virhostcpudata/linux-test7/node/node0/cpu18 ../../cpu/cpu18 -tests/virhostcpudata/linux-test7/node/node0/cpu19 ../../cpu/cpu19 -tests/virhostcpudata/linux-test7/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-test7/node/node0/cpu20 ../../cpu/cpu20 -tests/virhostcpudata/linux-test7/node/node0/cpu21 ../../cpu/cpu21 -tests/virhostcpudata/linux-test7/node/node0/cpu22 ../../cpu/cpu22 -tests/virhostcpudata/linux-test7/node/node0/cpu23 ../../cpu/cpu23 -tests/virhostcpudata/linux-test7/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-test7/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-test7/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-test7/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-test7/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-test7/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-test7/node/node0/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-test8/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-test8/node/node0/cpu12 ../../cpu/cpu12 -tests/virhostcpudata/linux-test8/node/node0/cpu16 ../../cpu/cpu16 -tests/virhostcpudata/linux-test8/node/node0/cpu20 ../../cpu/cpu20 -tests/virhostcpudata/linux-test8/node/node0/cpu24 ../../cpu/cpu24 -tests/virhostcpudata/linux-test8/node/node0/cpu28 ../../cpu/cpu28 -tests/virhostcpudata/linux-test8/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-test8/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-test8/node/node1/cpu32 ../../cpu/cpu32 -tests/virhostcpudata/linux-test8/node/node1/cpu36 ../../cpu/cpu36 -tests/virhostcpudata/linux-test8/node/node1/cpu40 ../../cpu/cpu40 -tests/virhostcpudata/linux-test8/node/node1/cpu44 ../../cpu/cpu44 -tests/virhostcpudata/linux-test8/node/node1/cpu48 ../../cpu/cpu48 -tests/virhostcpudata/linux-test8/node/node1/cpu52 ../../cpu/cpu52 -tests/virhostcpudata/linux-test8/node/node1/cpu56 ../../cpu/cpu56 -tests/virhostcpudata/linux-test8/node/node1/cpu60 ../../cpu/cpu60 -tests/virhostcpudata/linux-test8/node/node2/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-test8/node/node2/cpu13 ../../cpu/cpu13 -tests/virhostcpudata/linux-test8/node/node2/cpu17 ../../cpu/cpu17 -tests/virhostcpudata/linux-test8/node/node2/cpu21 ../../cpu/cpu21 -tests/virhostcpudata/linux-test8/node/node2/cpu25 ../../cpu/cpu25 -tests/virhostcpudata/linux-test8/node/node2/cpu29 ../../cpu/cpu29 -tests/virhostcpudata/linux-test8/node/node2/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-test8/node/node2/cpu9 ../../cpu/cpu9 -tests/virhostcpudata/linux-test8/node/node3/cpu33 ../../cpu/cpu33 -tests/virhostcpudata/linux-test8/node/node3/cpu37 ../../cpu/cpu37 -tests/virhostcpudata/linux-test8/node/node3/cpu41 ../../cpu/cpu41 -tests/virhostcpudata/linux-test8/node/node3/cpu45 ../../cpu/cpu45 -tests/virhostcpudata/linux-test8/node/node3/cpu49 ../../cpu/cpu49 -tests/virhostcpudata/linux-test8/node/node3/cpu53 ../../cpu/cpu53 -tests/virhostcpudata/linux-test8/node/node3/cpu57 ../../cpu/cpu57 -tests/virhostcpudata/linux-test8/node/node3/cpu61 ../../cpu/cpu61 -tests/virhostcpudata/linux-test8/node/node4/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-test8/node/node4/cpu14 ../../cpu/cpu14 -tests/virhostcpudata/linux-test8/node/node4/cpu18 ../../cpu/cpu18 -tests/virhostcpudata/linux-test8/node/node4/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-test8/node/node4/cpu22 ../../cpu/cpu22 -tests/virhostcpudata/linux-test8/node/node4/cpu26 ../../cpu/cpu26 -tests/virhostcpudata/linux-test8/node/node4/cpu30 ../../cpu/cpu30 -tests/virhostcpudata/linux-test8/node/node4/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-test8/node/node5/cpu34 ../../cpu/cpu34 -tests/virhostcpudata/linux-test8/node/node5/cpu38 ../../cpu/cpu38 -tests/virhostcpudata/linux-test8/node/node5/cpu42 ../../cpu/cpu42 -tests/virhostcpudata/linux-test8/node/node5/cpu46 ../../cpu/cpu46 -tests/virhostcpudata/linux-test8/node/node5/cpu50 ../../cpu/cpu50 -tests/virhostcpudata/linux-test8/node/node5/cpu54 ../../cpu/cpu54 -tests/virhostcpudata/linux-test8/node/node5/cpu58 ../../cpu/cpu58 -tests/virhostcpudata/linux-test8/node/node5/cpu62 ../../cpu/cpu62 -tests/virhostcpudata/linux-test8/node/node6/cpu35 ../../cpu/cpu35 -tests/virhostcpudata/linux-test8/node/node6/cpu39 ../../cpu/cpu39 -tests/virhostcpudata/linux-test8/node/node6/cpu43 ../../cpu/cpu43 -tests/virhostcpudata/linux-test8/node/node6/cpu47 ../../cpu/cpu47 -tests/virhostcpudata/linux-test8/node/node6/cpu51 ../../cpu/cpu51 -tests/virhostcpudata/linux-test8/node/node6/cpu55 ../../cpu/cpu55 -tests/virhostcpudata/linux-test8/node/node6/cpu59 ../../cpu/cpu59 -tests/virhostcpudata/linux-test8/node/node6/cpu63 ../../cpu/cpu63 -tests/virhostcpudata/linux-test8/node/node7/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-test8/node/node7/cpu15 ../../cpu/cpu15 -tests/virhostcpudata/linux-test8/node/node7/cpu19 ../../cpu/cpu19 -tests/virhostcpudata/linux-test8/node/node7/cpu23 ../../cpu/cpu23 -tests/virhostcpudata/linux-test8/node/node7/cpu27 ../../cpu/cpu27 -tests/virhostcpudata/linux-test8/node/node7/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-test8/node/node7/cpu31 ../../cpu/cpu31 -tests/virhostcpudata/linux-test8/node/node7/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-with-die/node/node0/cpu0 ../../cpu/cpu0 -tests/virhostcpudata/linux-with-die/node/node0/cpu1 ../../cpu/cpu1 -tests/virhostcpudata/linux-with-die/node/node0/cpu10 ../../cpu/cpu10 -tests/virhostcpudata/linux-with-die/node/node0/cpu11 ../../cpu/cpu11 -tests/virhostcpudata/linux-with-die/node/node0/cpu2 ../../cpu/cpu2 -tests/virhostcpudata/linux-with-die/node/node0/cpu3 ../../cpu/cpu3 -tests/virhostcpudata/linux-with-die/node/node0/cpu4 ../../cpu/cpu4 -tests/virhostcpudata/linux-with-die/node/node0/cpu5 ../../cpu/cpu5 -tests/virhostcpudata/linux-with-die/node/node0/cpu6 ../../cpu/cpu6 -tests/virhostcpudata/linux-with-die/node/node0/cpu7 ../../cpu/cpu7 -tests/virhostcpudata/linux-with-die/node/node0/cpu8 ../../cpu/cpu8 -tests/virhostcpudata/linux-with-die/node/node0/cpu9 ../../cpu/cpu9 -tests/virstoragetestdata/images/sub/link1 ../qcow2_raw-raw-reldir.qcow2 -tests/virstoragetestdata/images/sub/link2 ../qcow2_qcow2-qcow2-symlink_raw-raw-reldir.qcow2 -tests/virstoragetestdata/lookup/sub/link2 ../wrap -tests/vmx2xmldata/cdrom-ide-file-missing-datastore.xml cdrom-ide-empty.xml -tests/vmx2xmldata/cdrom-ide-file-missing-file.xml cdrom-ide-empty.xml -tests/vmx2xmldata/serial-pipe-client-app.xml serial-pipe.xml -tests/vmx2xmldata/serial-pipe-client-vm.xml serial-pipe.xml -tests/vmx2xmldata/serial-pipe-server-app.xml serial-pipe.xml -tests/vmx2xmldata/serial-pipe-server-vm.xml serial-pipe.xml diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec deleted file mode 100644 index 01ab965..0000000 --- a/SPECS/libvirt.spec +++ /dev/null @@ -1,3265 +0,0 @@ -# -*- rpm-spec -*- - -# This spec file assumes you are building on a Fedora or RHEL version -# that's still supported by the vendor. It may work on other distros -# or versions, but no effort will be made to ensure that going forward. -%define min_rhel 8 -%define min_fedora 33 - -%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x -%if 0%{?rhel} - %if 0%{?rhel} > 8 - %define arches_qemu_kvm x86_64 aarch64 s390x - %else - %define arches_qemu_kvm x86_64 %{power64} aarch64 s390x - %endif -%endif - -%define arches_64bit x86_64 %{power64} aarch64 s390x riscv64 -%define arches_x86 %{ix86} x86_64 - -%define arches_systemtap_64bit %{arches_64bit} -%define arches_dmidecode %{arches_x86} -%define arches_xen %{arches_x86} aarch64 -%define arches_vbox %{arches_x86} -%define arches_ceph %{arches_64bit} -%define arches_zfs %{arches_x86} %{power64} %{arm} -%define arches_numactl %{arches_x86} %{power64} aarch64 s390x -%define arches_numad %{arches_x86} %{power64} aarch64 - -# The hypervisor drivers that run in libvirtd -%define with_qemu 0%{!?_without_qemu:1} -%define with_lxc 0%{!?_without_lxc:1} -%define with_libxl 0%{!?_without_libxl:1} -%define with_vbox 0%{!?_without_vbox:1} - -%ifarch %{arches_qemu_kvm} - %define with_qemu_kvm %{with_qemu} -%else - %define with_qemu_kvm 0 -%endif - -%define with_qemu_tcg %{with_qemu} - -# RHEL disables TCG on all architectures -%if 0%{?rhel} - %define with_qemu_tcg 0 -%endif - -%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm} - %define with_qemu 0 -%endif - -# Then the hypervisor drivers that run outside libvirtd, in libvirt.so -%define with_openvz 0%{!?_without_openvz:1} -%define with_vmware 0%{!?_without_vmware:1} -%define with_esx 0%{!?_without_esx:1} -%define with_hyperv 0%{!?_without_hyperv:1} - -# Then the secondary host drivers, which run inside libvirtd -%define with_storage_rbd 0%{!?_without_storage_rbd:1} -%if 0%{?fedora} - %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1} -%else - %define with_storage_sheepdog 0 -%endif - -%define with_storage_gluster 0%{!?_without_storage_gluster:1} -%if 0%{?rhel} - # Glusterfs has been dropped in RHEL-9, and before that - # was only enabled on arches where KVM exists - %if 0%{?rhel} > 8 - %define with_storage_gluster 0 - %else - %ifnarch %{arches_qemu_kvm} - %define with_storage_gluster 0 - %endif - %endif -%endif - -# Fedora has zfs-fuse -%if 0%{?fedora} - %define with_storage_zfs 0%{!?_without_storage_zfs:1} -%else - %define with_storage_zfs 0 -%endif - -%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1} -# libiscsi has been dropped in RHEL-9 -%if 0%{?rhel} > 8 - %define with_storage_iscsi_direct 0 -%endif - -# Other optional features -%define with_numactl 0%{!?_without_numactl:1} - -# A few optional bits off by default, we enable later -%define with_fuse 0 -%define with_sanlock 0 -%define with_numad 0 -%define with_firewalld_zone 0 -%define with_netcf 0 -%define with_libssh2 0 -%define with_wireshark 0 -%define with_libssh 0 -%define with_dmidecode 0 - -# Finally set the OS / architecture specific special cases - -# Architecture-dependent features -%ifnarch %{arches_xen} - %define with_libxl 0 -%endif -%ifnarch %{arches_vbox} - %define with_vbox 0 -%endif -%ifnarch %{arches_numactl} - %define with_numactl 0 -%endif -%ifnarch %{arches_zfs} - %define with_storage_zfs 0 -%endif -%ifnarch %{arches_ceph} - %define with_storage_rbd 0 -%endif - -# RHEL doesn't ship many hypervisor drivers -%if 0%{?rhel} - %define with_openvz 0 - %define with_vbox 0 - %define with_vmware 0 - %define with_libxl 0 - %define with_hyperv 0 - %define with_vz 0 - %define with_lxc 0 -%endif - -%define with_firewalld_zone 0%{!?_without_firewalld_zone:1} - -%if (0%{?fedora} && 0%{?fedora} < 34) || (0%{?rhel} && 0%{?rhel} < 9) - %define with_netcf 0%{!?_without_netcf:1} -%endif - - -# fuse is used to provide virtualized /proc for LXC -%if %{with_lxc} - %define with_fuse 0%{!?_without_fuse:1} -%endif - -# Enable sanlock library for lock management with QEMU -# Sanlock is available only on arches where kvm is available for RHEL -%if 0%{?fedora} - %define with_sanlock 0%{!?_without_sanlock:1} -%endif -%if 0%{?rhel} - %ifarch %{arches_qemu_kvm} - %define with_sanlock 0%{!?_without_sanlock:1} - %endif -%endif - -# Enable libssh2 transport for new enough distros -%if 0%{?fedora} - %define with_libssh2 0%{!?_without_libssh2:1} -%endif - -# Enable wireshark plugins for all distros -%define with_wireshark 0%{!?_without_wireshark:1} -%define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan - -# Enable libssh transport for all distros -%define with_libssh 0%{!?_without_libssh:1} - -%if %{with_qemu} || %{with_lxc} -# numad is used to manage the CPU and memory placement dynamically, -# it's not available on many non-x86 architectures. - %ifarch %{arches_numad} - %define with_numad 0%{!?_without_numad:1} - %endif -%endif - -%ifarch %{arches_dmidecode} - %define with_dmidecode 0%{!?_without_dmidecode:1} -%endif - -%define with_modular_daemons 0 -%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9 - %define with_modular_daemons 1 -%endif - -# Force QEMU to run as non-root -%define qemu_user qemu -%define qemu_group qemu - -# Locations for QEMU data -%define qemu_moddir %{_libdir}/qemu -%define qemu_datadir %{_datadir}/qemu - - -# RHEL releases provide stable tool chains and so it is safe to turn -# compiler warning into errors without being worried about frequent -# changes in reported warnings -%if 0%{?rhel} - %define enable_werror -Dwerror=true -%else - %define enable_werror -Dwerror=false -Dgit_werror=disabled -%endif - -%define tls_priority "@LIBVIRT,SYSTEM" - - -Summary: Library providing a simple virtualization API -Name: libvirt -Version: 8.0.0 -Release: 23.2%{?dist}%{?extra_release} -License: LGPLv2+ -URL: https://libvirt.org/ - -%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1 - %define mainturl stable_updates/ -%endif -Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz -Source1: symlinks - -Patch1: libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch -Patch2: libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch -Patch3: libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch -Patch4: libvirt-RHEL-qemu-Add-ability-to-set-sgio-values-for-hostdev.patch -Patch5: libvirt-RHEL-qemu-Add-check-for-unpriv-sgio-for-SCSI-generic-host-device.patch -Patch6: libvirt-RHEL-virscsi-Check-device-type-before-getting-it-s-dev-node-name.patch -Patch7: libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch -Patch8: libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch -Patch9: libvirt-RHEL-virutil-Accept-non-block-devices-in-virGetDeviceID.patch -Patch10: libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch -Patch11: libvirt-Revert-report-error-when-virProcessGetStatInfo-is-unable-to-parse-data.patch -Patch12: libvirt-qemu-fix-inactive-snapshot-revert.patch -Patch13: libvirt-qemuDomainSetupDisk-Initialize-targetPaths.patch -Patch14: libvirt-RHEL-Remove-glib-2.64.0-workaround-for-GSource-race.patch -Patch15: libvirt-qemu_command-Generate-memory-only-after-controllers.patch -Patch16: libvirt-qemu-Validate-domain-definition-even-on-migration.patch -Patch17: libvirt-node_device-Rework-udevKludgeStorageType.patch -Patch18: libvirt-node_device-Treat-NVMe-disks-as-regular-disks.patch -Patch19: libvirt-conf-Introduce-memory-allocation-threads.patch -Patch20: libvirt-qemu_capabilities-Detect-memory-backend-.prealloc-threads-property.patch -Patch21: libvirt-qemu_validate-Validate-prealloc-threads-against-qemuCpas.patch -Patch22: libvirt-qemu_command-Generate-prealloc-threads-property.patch -Patch23: libvirt-cpu_map-Disable-cpu64-rhel-for-host-model-and-baseline.patch -Patch24: libvirt-cputest-Drop-some-old-artificial-baseline-tests.patch -Patch25: libvirt-cputest-Give-better-names-to-baseline-tests.patch -Patch26: libvirt-cputest-Add-some-real-world-baseline-tests.patch -Patch27: libvirt-cpu_x86-Consolidate-signature-match-in-x86DecodeUseCandidate.patch -Patch28: libvirt-cpu_x86-Refactor-feature-list-comparison-in-x86DecodeUseCandidate.patch -Patch29: libvirt-cpu_x86-Penalize-disabled-features-when-computing-CPU-model.patch -Patch30: libvirt-cpu_x86-Ignore-enabled-features-for-input-models-in-x86DecodeUseCandidate.patch -Patch31: libvirt-nwfilter-fix-crash-when-counting-number-of-network-filters.patch -Patch32: libvirt-virDomainDiskDefValidate-Improve-error-messages-for-startupPolicy-checks.patch -Patch33: libvirt-domain_validate-Split-out-validation-of-disk-startup-policy.patch -Patch34: libvirt-virDomainDiskDefValidateStartupPolicy-Validate-disk-type-better.patch -Patch35: libvirt-virDomainDiskTranslateSourcePool-Fix-check-of-startupPolicy-definition.patch -Patch36: libvirt-conf-virtiofs-add-thread_pool-element.patch -Patch37: libvirt-qemu-virtiofs-format-thread-pool-size.patch -Patch38: libvirt-conf-Move-virDomainObj-originalMemlock-into-qemuDomainObjPrivate.patch -Patch39: libvirt-qemu_domain-Format-qemuDomainObjPrivate-originalMemlock.patch -Patch40: libvirt-qemu-Add-qemuDomainSetMaxMemLock-helper.patch -Patch41: libvirt-qemu_migration-Use-qemuDomainSetMaxMemLock.patch -Patch42: libvirt-qemu_migration-Restore-original-memory-locking-limit.patch -Patch43: libvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch -Patch44: libvirt-virsh-Add-support-for-VIR_MIGRATE_ZEROCOPY-flag.patch -Patch45: libvirt-qemu_migration-Implement-VIR_MIGRATE_ZEROCOPY-flag.patch -Patch46: libvirt-security_selinux.c-Relabel-existing-mode-bind-UNIX-sockets.patch -Patch47: libvirt-RHEL-qemu_migration-Fix-restoring-memlock-limit-on-destination.patch -Patch48: libvirt-qemu_process-Don-t-require-a-hugetlbfs-mount-for-memfd.patch -Patch49: libvirt-qemu_namespace-Tolerate-missing-ACLs-when-creating-a-path-in-namespace.patch -Patch50: libvirt-qemu_namespace-Fix-a-corner-case-in-qemuDomainGetPreservedMounts.patch -Patch51: libvirt-qemu_namespace-Introduce-qemuDomainNamespaceSetupPath.patch -Patch52: libvirt-qemu_process.c-Propagate-hugetlbfs-mounts-on-reconnect.patch -Patch53: libvirt-qemuProcessReconnect-Don-t-build-memory-paths.patch -Patch54: libvirt-util-json-Split-out-array-strinlist-conversion-from-virJSONValueObjectGetStringArray.patch -Patch55: libvirt-qemuAgentGetDisks-Don-t-use-virJSONValueObjectGetStringArray-for-optional-data.patch -Patch56: libvirt-virpidfile-Add-virPidFileReadPathIfLocked-func.patch -Patch57: libvirt-qemu-tpm-Get-swtpm-pid-without-binary-validation.patch -Patch58: libvirt-qemu_tpm-Do-async-IO-when-starting-swtpm-emulator.patch -Patch59: libvirt-qemu-gpu-Get-pid-without-binary-validation.patch -Patch60: libvirt-build-Only-install-libvirt-guests-when-building-libvirtd.patch -Patch61: libvirt-tools-Fix-install_mode-for-some-scripts.patch -Patch62: libvirt-qemu-Ignore-missing-vm.unprivileged_userfaultfd-sysctl.patch -Patch63: libvirt-nodedev-fix-reported-error-msg-in-css-cap-XML-parsing.patch -Patch64: libvirt-util-refactor-virDomainDeviceCCWAddress-into-virccw.h.patch -Patch65: libvirt-util-refactor-virDomainCCWAddressAsString-into-virccw.patch -Patch66: libvirt-util-make-reuse-of-ccw-device-address-format-constant.patch -Patch67: libvirt-util-refactor-ccw-address-constants-into-virccw.patch -Patch68: libvirt-util-refactor-virDomainCCWAddressIncrement-into-virccw.patch -Patch69: libvirt-util-refactor-virDomainDeviceCCWAddressIsValid-into-virccw.patch -Patch70: libvirt-util-refactor-virDomainDeviceCCWAddressEqual-into-virccw.patch -Patch71: libvirt-conf-adjust-method-name-virDomainDeviceCCWAddressParseXML.patch -Patch72: libvirt-util-add-ccw-device-address-parsing-into-virccw.patch -Patch73: libvirt-util-add-virCCWDeviceAddressFromString-to-virccw.patch -Patch74: libvirt-nodedev-refactor-css-format-from-ccw-format-method.patch -Patch75: libvirt-nodedev-refactor-ccw-device-address-parsing-from-XML.patch -Patch76: libvirt-nodedev-refactor-css-XML-parsing-from-ccw-XML-parsing.patch -Patch77: libvirt-schemas-refactor-out-nodedev-ccw-address-schema.patch -Patch78: libvirt-nodedev-add-optional-device-address-of-channel-device-to-css-device.patch -Patch79: libvirt-nodedev-add-tests-for-optional-device-address-to-css-device.patch -Patch80: libvirt-nodedev-prevent-internal-error-on-dev_busid-parse.patch -Patch81: libvirt-rpc-Fix-memory-leak-of-fds.patch -Patch82: libvirt-qemu_namespace-Don-t-leak-memory-in-qemuDomainGetPreservedMounts.patch -Patch83: libvirt-vircpi-Add-PCIe-5.0-and-6.0-link-speeds.patch -Patch84: libvirt-conf-Make-VIR_DOMAIN_NET_TYPE_ETHERNET-not-share-host-view.patch -Patch85: libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch -Patch86: libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch -Patch87: libvirt-qemu-monitor-Drop-old-monitor-fields-from-struct-_qemuMonitorMessage.patch -Patch88: libvirt-qemu-Make-struct-_qemuMonitorMessage-private.patch -Patch89: libvirt-qemu-monitor-Move-declaration-of-struct-_qemuMonitor-to-qemu_monitor_priv.h.patch -Patch90: libvirt-qemu-qemuBlockGetNamedNodeData-Remove-pointless-error-path.patch -Patch91: libvirt-qemu-monitor-Store-whether-query-named-block-nodes-supports-flat-parameter.patch -Patch92: libvirt-qemuMonitorJSONBlockStatsUpdateCapacityBlockdev-Use-flat-mode-of-query-named-block-nodes.patch -Patch93: libvirt-qemu-relax-shared-memory-check-for-vhostuser-daemons.patch -Patch94: libvirt-virpci-Resolve-leak-in-virPCIVirtualFunctionList-cleanup.patch -Patch95: libvirt-node_device_conf-Avoid-memleak-in-virNodeDeviceGetPCIVPDDynamicCap.patch -Patch96: libvirt-nodedev-update-transient-mdevs.patch -Patch97: libvirt-lib-Set-up-cpuset-controller-for-restrictive-numatune.patch -Patch98: libvirt-virnuma-Avoid-integer-overflow-in-virNumaGetPages.patch -Patch99: libvirt-remote-check-for-negative-array-lengths-before-allocation.patch -Patch100: libvirt-util-Fix-error-return-for-virProcessKillPainfullyDelay.patch -Patch101: libvirt-rpc-ensure-temporary-GSource-is-removed-from-client-event-loop.patch - -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-config-network = %{version}-%{release} -Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} -%if %{with_libxl} -Requires: libvirt-daemon-driver-libxl = %{version}-%{release} -%endif -%if %{with_lxc} -Requires: libvirt-daemon-driver-lxc = %{version}-%{release} -%endif -%if %{with_qemu} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} -%endif -# We had UML driver, but we've removed it. -Obsoletes: libvirt-daemon-driver-uml <= 5.0.0 -Obsoletes: libvirt-daemon-uml <= 5.0.0 -%if %{with_vbox} -Requires: libvirt-daemon-driver-vbox = %{version}-%{release} -%endif -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} - -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-client = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} - -# All build-time requirements. Run-time requirements are -# listed against each sub-RPM -BuildRequires: python3-docutils -BuildRequires: gcc -BuildRequires: meson >= 0.54.0 -BuildRequires: ninja-build -BuildRequires: git -BuildRequires: perl-interpreter -%if 0%{?rhel} == 8 -BuildRequires: python3-devel -%else -BuildRequires: python3 -%endif -%if %{with_libxl} -BuildRequires: xen-devel -%endif -BuildRequires: glib2-devel >= 2.56 -BuildRequires: libxml2-devel -BuildRequires: libxslt -BuildRequires: readline-devel -BuildRequires: bash-completion >= 2.0 -BuildRequires: gettext -BuildRequires: libtasn1-devel -BuildRequires: gnutls-devel -BuildRequires: libattr-devel -# For pool-build probing for existing pools -BuildRequires: libblkid-devel >= 2.17 -# for augparse, optionally used in testing -BuildRequires: augeas -BuildRequires: systemd-devel >= 185 -BuildRequires: libpciaccess-devel >= 0.10.9 -BuildRequires: yajl-devel -%if %{with_sanlock} -BuildRequires: sanlock-devel >= 2.4 -%endif -BuildRequires: libpcap-devel >= 1.5.0 -BuildRequires: libnl3-devel -BuildRequires: libselinux-devel -BuildRequires: dnsmasq >= 2.41 -BuildRequires: iptables -BuildRequires: ebtables -BuildRequires: module-init-tools -BuildRequires: cyrus-sasl-devel -BuildRequires: polkit >= 0.112 -# For mount/umount in FS driver -BuildRequires: util-linux -%if %{with_qemu} -# For managing ACLs -BuildRequires: libacl-devel -# From QEMU RPMs -BuildRequires: /usr/bin/qemu-img -%endif -# For LVM drivers -BuildRequires: lvm2 -# For pool type=iscsi -BuildRequires: iscsi-initiator-utils -%if %{with_storage_iscsi_direct} -# For pool type=iscsi-direct -BuildRequires: libiscsi-devel -%endif -# For disk driver -BuildRequires: parted-devel -# For Multipath support -BuildRequires: device-mapper-devel -%if %{with_storage_rbd} -BuildRequires: librados-devel -BuildRequires: librbd-devel -%endif -%if %{with_storage_gluster} -BuildRequires: glusterfs-api-devel >= 3.4.1 -BuildRequires: glusterfs-devel >= 3.4.1 -%endif -%if %{with_storage_sheepdog} -BuildRequires: sheepdog -%endif -%if %{with_numactl} -# For QEMU/LXC numa info -BuildRequires: numactl-devel -%endif -BuildRequires: libcap-ng-devel >= 0.5.0 -%if %{with_fuse} -BuildRequires: fuse-devel >= 2.8.6 -%endif -%if %{with_libssh2} -BuildRequires: libssh2-devel >= 1.3.0 -%endif -%if %{with_netcf} -BuildRequires: netcf-devel >= 0.2.2 -%endif -%if %{with_esx} -BuildRequires: libcurl-devel -%endif -%if %{with_hyperv} -BuildRequires: libwsman-devel >= 2.6.3 -%endif -BuildRequires: audit-libs-devel -# we need /usr/sbin/dtrace -BuildRequires: systemtap-sdt-devel - -# For mount/umount in FS driver -BuildRequires: util-linux -# For showmount in FS driver (netfs discovery) -BuildRequires: nfs-utils - -# Fedora build root suckage -BuildRequires: gawk - -# For storage wiping with different algorithms -BuildRequires: scrub - -%if %{with_numad} -BuildRequires: numad -%endif - -%if %{with_wireshark} -BuildRequires: wireshark-devel -%endif - -%if %{with_libssh} -BuildRequires: libssh-devel >= 0.7.0 -%endif - -BuildRequires: rpcgen -BuildRequires: libtirpc-devel - -# Needed for the firewalld_reload macro -%if %{with_firewalld_zone} -BuildRequires: firewalld-filesystem -%endif - -%description -Libvirt is a C toolkit to interact with the virtualization capabilities -of recent versions of Linux (and other OSes). The main package includes -the libvirtd server exporting the virtualization support. - -%package docs -Summary: API reference and website documentation - -%description docs -Includes the API reference for the libvirt C library, and a complete -copy of the libvirt.org website documentation. - -%package daemon -Summary: Server side daemon and supporting files for libvirt library - -# All runtime requirements for the libvirt package (runtime requrements -# for subpackages are listed later in those subpackages) - -# The client side, i.e. shared libs are in a subpackage -Requires: %{name}-libs = %{version}-%{release} - -# The libvirt-guests.sh script requires virsh from libvirt-client subpackage, -# but not every deployment wants to use libvirt-guests service. Using -# Recommends here will install libvirt-client by default (if available), but -# RPM won't complain if the package is unavailable, masked, or removed later. -Recommends: %{name}-client = %{version}-%{release} - -# netcat is needed on the server side so that clients that have -# libvirt < 6.9.0 can connect, but newer versions will prefer -# virt-ssh-helper. Making this a Recommends means that it gets -# installed by default, but can still be removed if compatibility -# with old clients is not required -Recommends: /usr/bin/nc - -# for modprobe of pci devices -Requires: module-init-tools - -# for /sbin/ip -Requires: iproute -# for /sbin/tc -Requires: iproute-tc - -Requires: polkit >= 0.112 -%if %{with_dmidecode} -# For virConnectGetSysinfo -Requires: dmidecode -%endif -# For service management -Requires(post): /usr/bin/systemctl -%if %{with_numad} -Requires: numad -%endif -# libvirtd depends on 'messagebus' service -Requires: dbus -# For uid creation during pre -Requires(pre): shadow-utils -# Needed by /usr/libexec/libvirt-guests.sh script. -Requires: gettext - -# Ensure smooth upgrades -Obsoletes: libvirt-admin < 7.3.0 -Provides: libvirt-admin = %{version}-%{release} -Obsoletes: libvirt-bash-completion < 7.3.0 - -%description daemon -Server side daemon required to manage the virtualization capabilities -of recent versions of Linux. Requires a hypervisor specific sub-RPM -for specific drivers. - -%package daemon-config-network -Summary: Default configuration files for the libvirtd daemon - -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} - -%description daemon-config-network -Default configuration files for setting up NAT based networking - -%package daemon-config-nwfilter -Summary: Network filter configuration files for the libvirtd daemon - -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} - -%description daemon-config-nwfilter -Network filter configuration files for cleaning guest traffic - -%package daemon-driver-network -Summary: Network driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: dnsmasq >= 2.41 -Requires: iptables - -%description daemon-driver-network -The network driver plugin for the libvirtd daemon, providing -an implementation of the virtual network APIs using the Linux -bridge capabilities. - - -%package daemon-driver-nwfilter -Summary: Nwfilter driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: iptables -Requires: ebtables - -%description daemon-driver-nwfilter -The nwfilter driver plugin for the libvirtd daemon, providing -an implementation of the firewall APIs using the ebtables, -iptables and ip6tables capabilities - - -%package daemon-driver-nodedev -Summary: Nodedev driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -# needed for device enumeration -Requires: systemd >= 185 -# For managing persistent mediated devices -Requires: mdevctl - -%description daemon-driver-nodedev -The nodedev driver plugin for the libvirtd daemon, providing -an implementation of the node device APIs using the udev -capabilities. - - -%package daemon-driver-interface -Summary: Interface driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -%if %{with_netcf} -Requires: netcf-libs >= 0.2.2 -%endif - -%description daemon-driver-interface -The interface driver plugin for the libvirtd daemon, providing -an implementation of the host network interface APIs. - -%package daemon-driver-secret -Summary: Secret driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} - -%description daemon-driver-secret -The secret driver plugin for the libvirtd daemon, providing -an implementation of the secret key APIs. - -%package daemon-driver-storage-core -Summary: Storage driver plugin including base backends for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: nfs-utils -# For mkfs -Requires: util-linux -%if %{with_qemu} -# From QEMU RPMs -Requires: /usr/bin/qemu-img -%endif -%if !%{with_storage_rbd} -Obsoletes: libvirt-daemon-driver-storage-rbd < %{version}-%{release} -%endif - -%description daemon-driver-storage-core -The storage driver plugin for the libvirtd daemon, providing -an implementation of the storage APIs using files, local disks, LVM, SCSI, -iSCSI, and multipath storage. - -%package daemon-driver-storage-logical -Summary: Storage driver plugin for lvm volumes -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: lvm2 - -%description daemon-driver-storage-logical -The storage driver backend adding implementation of the storage APIs for block -volumes using lvm. - - -%package daemon-driver-storage-disk -Summary: Storage driver plugin for disk -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: parted -Requires: device-mapper - -%description daemon-driver-storage-disk -The storage driver backend adding implementation of the storage APIs for block -volumes using the host disks. - - -%package daemon-driver-storage-scsi -Summary: Storage driver plugin for local scsi devices -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} - -%description daemon-driver-storage-scsi -The storage driver backend adding implementation of the storage APIs for scsi -host devices. - - -%package daemon-driver-storage-iscsi -Summary: Storage driver plugin for iscsi -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: iscsi-initiator-utils - -%description daemon-driver-storage-iscsi -The storage driver backend adding implementation of the storage APIs for iscsi -volumes using the host iscsi stack. - - -%if %{with_storage_iscsi_direct} -%package daemon-driver-storage-iscsi-direct -Summary: Storage driver plugin for iscsi-direct -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} - -%description daemon-driver-storage-iscsi-direct -The storage driver backend adding implementation of the storage APIs for iscsi -volumes using libiscsi direct connection. -%endif - - -%package daemon-driver-storage-mpath -Summary: Storage driver plugin for multipath volumes -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: device-mapper - -%description daemon-driver-storage-mpath -The storage driver backend adding implementation of the storage APIs for -multipath storage using device mapper. - - -%if %{with_storage_gluster} -%package daemon-driver-storage-gluster -Summary: Storage driver plugin for gluster -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} - %if 0%{?fedora} -Requires: glusterfs-client >= 2.0.1 - %endif - %if (0%{?fedora} || 0%{?with_storage_gluster}) -Requires: /usr/sbin/gluster - %endif - -%description daemon-driver-storage-gluster -The storage driver backend adding implementation of the storage APIs for gluster -volumes using libgfapi. -%endif - - -%if %{with_storage_rbd} -%package daemon-driver-storage-rbd -Summary: Storage driver plugin for rbd -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} - -%description daemon-driver-storage-rbd -The storage driver backend adding implementation of the storage APIs for rbd -volumes using the ceph protocol. -%endif - - -%if %{with_storage_sheepdog} -%package daemon-driver-storage-sheepdog -Summary: Storage driver plugin for sheepdog -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: sheepdog - -%description daemon-driver-storage-sheepdog -The storage driver backend adding implementation of the storage APIs for -sheepdog volumes using. -%endif - - -%if %{with_storage_zfs} -%package daemon-driver-storage-zfs -Summary: Storage driver plugin for ZFS -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -# Support any conforming implementation of zfs -Requires: /sbin/zfs -Requires: /sbin/zpool - -%description daemon-driver-storage-zfs -The storage driver backend adding implementation of the storage APIs for -ZFS volumes. -%endif - - -%package daemon-driver-storage -Summary: Storage driver plugin including all backends for the libvirtd daemon -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release} -%if %{with_storage_iscsi_direct} -Requires: libvirt-daemon-driver-storage-iscsi-direct = %{version}-%{release} -%endif -%if %{with_storage_gluster} -Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release} -%endif -%if %{with_storage_rbd} -Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release} -%endif -%if %{with_storage_sheepdog} -Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release} -%endif -%if %{with_storage_zfs} -Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release} -%endif - -%description daemon-driver-storage -The storage driver plugin for the libvirtd daemon, providing -an implementation of the storage APIs using LVM, iSCSI, -parted and more. - - -%if %{with_qemu} -%package daemon-driver-qemu -Summary: QEMU driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Requires: /usr/bin/qemu-img -# For image compression -Requires: gzip -Requires: bzip2 -Requires: lzop -Requires: xz -Requires: systemd-container -Requires: swtpm-tools - -%description daemon-driver-qemu -The qemu driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -QEMU -%endif - - -%if %{with_lxc} -%package daemon-driver-lxc -Summary: LXC driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -# There really is a hard cross-driver dependency here -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: systemd-container - -%description daemon-driver-lxc -The LXC driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -the Linux kernel -%endif - - -%if %{with_vbox} -%package daemon-driver-vbox -Summary: VirtualBox driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} - -%description daemon-driver-vbox -The vbox driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -VirtualBox -%endif - - -%if %{with_libxl} -%package daemon-driver-libxl -Summary: Libxl driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} -Obsoletes: libvirt-daemon-driver-xen < 4.3.0 - -%description daemon-driver-libxl -The Libxl driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -Libxl -%endif - - - -%if %{with_qemu_tcg} -%package daemon-qemu -Summary: Server side daemon & driver required to run QEMU guests - -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -Requires: qemu - -%description daemon-qemu -Server side daemon and driver required to manage the virtualization -capabilities of the QEMU TCG emulators -%endif - - -%if %{with_qemu_kvm} -%package daemon-kvm -Summary: Server side daemon & driver required to run KVM guests - -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -Requires: qemu-kvm - -%description daemon-kvm -Server side daemon and driver required to manage the virtualization -capabilities of the KVM hypervisor -%endif - - -%if %{with_lxc} -%package daemon-lxc -Summary: Server side daemon & driver required to run LXC guests - -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-lxc = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} - -%description daemon-lxc -Server side daemon and driver required to manage the virtualization -capabilities of LXC -%endif - - -%if %{with_libxl} -%package daemon-xen -Summary: Server side daemon & driver required to run XEN guests - -Requires: libvirt-daemon = %{version}-%{release} - %if %{with_libxl} -Requires: libvirt-daemon-driver-libxl = %{version}-%{release} - %endif -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -Requires: xen - -%description daemon-xen -Server side daemon and driver required to manage the virtualization -capabilities of XEN -%endif - -%if %{with_vbox} -%package daemon-vbox -Summary: Server side daemon & driver required to run VirtualBox guests - -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-vbox = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} - -%description daemon-vbox -Server side daemon and driver required to manage the virtualization -capabilities of VirtualBox -%endif - -%package client -Summary: Client side utilities of the libvirt library -Requires: %{name}-libs = %{version}-%{release} -# Needed by virt-pki-validate script. -Requires: gnutls-utils - -# Ensure smooth upgrades -Obsoletes: libvirt-bash-completion < 7.3.0 - -%description client -The client binaries needed to access the virtualization -capabilities of recent versions of Linux (and other OSes). - -%package libs -Summary: Client side libraries -# So remote clients can access libvirt over SSH tunnel -Requires: cyrus-sasl -# Needed by default sasl.conf - no onerous extra deps, since -# 100's of other things on a system already pull in krb5-libs -Requires: cyrus-sasl-gssapi - -%description libs -Shared libraries for accessing the libvirt daemon. - -%if %{with_wireshark} -%package wireshark -Summary: Wireshark dissector plugin for libvirt RPC transactions -Requires: wireshark -Requires: %{name}-libs = %{version}-%{release} - -%description wireshark -Wireshark dissector plugin for better analysis of libvirt RPC traffic. -%endif - -%if %{with_lxc} -%package login-shell -Summary: Login shell for connecting users to an LXC container -Requires: %{name}-libs = %{version}-%{release} - -%description login-shell -Provides the set-uid virt-login-shell binary that is used to -connect a user to an LXC container when they login, by switching -namespaces. -%endif - -%package devel -Summary: Libraries, includes, etc. to compile with the libvirt library -Requires: %{name}-libs = %{version}-%{release} -Requires: pkgconfig - -%description devel -Include header files & development libraries for the libvirt C library. - -%if %{with_sanlock} -%package lock-sanlock -Summary: Sanlock lock manager plugin for QEMU driver -Requires: sanlock >= 2.4 -#for virt-sanlock-cleanup require augeas -Requires: augeas -Requires: %{name}-daemon = %{version}-%{release} -Requires: %{name}-libs = %{version}-%{release} - -%description lock-sanlock -Includes the Sanlock lock manager plugin for the QEMU -driver -%endif - -%package nss -Summary: Libvirt plugin for Name Service Switch -Requires: libvirt-daemon-driver-network = %{version}-%{release} - -%description nss -Libvirt plugin for NSS for translating domain names into IP addresses. - - -%prep - -%autosetup -S git_am -N - -# "make dist" replaces all symlinks with a copy of the linked files; -# we need to replace all of them with the original symlinks -echo "Restoring symlinks" -while read lnk target; do - if [ -e $lnk ]; then - rm -rf $lnk - ln -s $target $lnk - fi -done <%{_sourcedir}/symlinks || exit 1 -git add . -git commit -q -a --allow-empty --author 'rpm-build ' -m symlinks - - -git config gc.auto 0 - -%autopatch - -%build -%if 0%{?fedora} >= %{min_fedora} || 0%{?rhel} >= %{min_rhel} - %define supported_platform 1 -%else - %define supported_platform 0 -%endif - -%if ! %{supported_platform} -echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}" -exit 1 -%endif - -%if %{with_qemu} - %define arg_qemu -Ddriver_qemu=enabled -%else - %define arg_qemu -Ddriver_qemu=disabled -%endif - -%if %{with_openvz} - %define arg_openvz -Ddriver_openvz=enabled -%else - %define arg_openvz -Ddriver_openvz=disabled -%endif - -%if %{with_lxc} - %define arg_lxc -Ddriver_lxc=enabled - %define arg_login_shell -Dlogin_shell=enabled -%else - %define arg_lxc -Ddriver_lxc=disabled - %define arg_login_shell -Dlogin_shell=disabled -%endif - -%if %{with_vbox} - %define arg_vbox -Ddriver_vbox=enabled -%else - %define arg_vbox -Ddriver_vbox=disabled -%endif - -%if %{with_libxl} - %define arg_libxl -Ddriver_libxl=enabled -%else - %define arg_libxl -Ddriver_libxl=disabled -%endif - -%if %{with_esx} - %define arg_esx -Ddriver_esx=enabled -Dcurl=enabled -%else - %define arg_esx -Ddriver_esx=disabled -Dcurl=disabled -%endif - -%if %{with_hyperv} - %define arg_hyperv -Ddriver_hyperv=enabled -Dopenwsman=enabled -%else - %define arg_hyperv -Ddriver_hyperv=disabled -Dopenwsman=disabled -%endif - -%if %{with_vmware} - %define arg_vmware -Ddriver_vmware=enabled -%else - %define arg_vmware -Ddriver_vmware=disabled -%endif - -%if %{with_storage_rbd} - %define arg_storage_rbd -Dstorage_rbd=enabled -%else - %define arg_storage_rbd -Dstorage_rbd=disabled -%endif - -%if %{with_storage_sheepdog} - %define arg_storage_sheepdog -Dstorage_sheepdog=enabled -%else - %define arg_storage_sheepdog -Dstorage_sheepdog=disabled -%endif - -%if %{with_storage_gluster} - %define arg_storage_gluster -Dstorage_gluster=enabled -Dglusterfs=enabled -%else - %define arg_storage_gluster -Dstorage_gluster=disabled -Dglusterfs=disabled -%endif - -%if %{with_storage_zfs} - %define arg_storage_zfs -Dstorage_zfs=enabled -%else - %define arg_storage_zfs -Dstorage_zfs=disabled -%endif - -%if %{with_numactl} - %define arg_numactl -Dnumactl=enabled -%else - %define arg_numactl -Dnumactl=disabled -%endif - -%if %{with_numad} - %define arg_numad -Dnumad=enabled -%else - %define arg_numad -Dnumad=disabled -%endif - -%if %{with_fuse} - %define arg_fuse -Dfuse=enabled -%else - %define arg_fuse -Dfuse=disabled -%endif - -%if %{with_sanlock} - %define arg_sanlock -Dsanlock=enabled -%else - %define arg_sanlock -Dsanlock=disabled -%endif - -%if %{with_firewalld_zone} - %define arg_firewalld_zone -Dfirewalld_zone=enabled -%else - %define arg_firewalld_zone -Dfirewalld_zone=disabled -%endif - -%if %{with_netcf} - %define arg_netcf -Dnetcf=enabled -%else - %define arg_netcf -Dnetcf=disabled -%endif - -%if %{with_wireshark} - %define arg_wireshark -Dwireshark_dissector=enabled -%else - %define arg_wireshark -Dwireshark_dissector=disabled -%endif - -%if %{with_storage_iscsi_direct} - %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=enabled -Dlibiscsi=enabled -%else - %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=disabled -Dlibiscsi=disabled -%endif - -%if %{with_libssh} - %define arg_libssh -Dlibssh=enabled -%else - %define arg_libssh -Dlibssh=disabled -%endif - -%if %{with_libssh2} - %define arg_libssh2 -Dlibssh2=enabled -%else - %define arg_libssh2 -Dlibssh2=disabled -%endif - -%if %{with_modular_daemons} - %define arg_remote_mode -Dremote_default_mode=direct -%else - %define arg_remote_mode -Dremote_default_mode=legacy -%endif - -%define when %(date +"%%F-%%T") -%define where %(hostname) -%define who %{?packager}%{!?packager:Unknown} -%define arg_packager -Dpackager="%{who}, %{when}, %{where}" -%define arg_packager_version -Dpackager_version="%{release}" - -%define arg_selinux_mount -Dselinux_mount="/sys/fs/selinux" - -# place macros above and build commands below this comment - -export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec) - -%meson \ - -Drunstatedir=%{_rundir} \ - %{?arg_qemu} \ - %{?arg_openvz} \ - %{?arg_lxc} \ - %{?arg_vbox} \ - %{?arg_libxl} \ - -Dsasl=enabled \ - -Dpolkit=enabled \ - -Ddriver_libvirtd=enabled \ - -Ddriver_remote=enabled \ - -Ddriver_test=enabled \ - %{?arg_esx} \ - %{?arg_hyperv} \ - %{?arg_vmware} \ - -Ddriver_vz=disabled \ - -Ddriver_bhyve=disabled \ - -Ddriver_ch=disabled \ - %{?arg_remote_mode} \ - -Ddriver_interface=enabled \ - -Ddriver_network=enabled \ - -Dstorage_fs=enabled \ - -Dstorage_lvm=enabled \ - -Dstorage_iscsi=enabled \ - %{?arg_storage_iscsi_direct} \ - -Dstorage_scsi=enabled \ - -Dstorage_disk=enabled \ - -Dstorage_mpath=enabled \ - %{?arg_storage_rbd} \ - %{?arg_storage_sheepdog} \ - %{?arg_storage_gluster} \ - %{?arg_storage_zfs} \ - -Dstorage_vstorage=disabled \ - %{?arg_numactl} \ - %{?arg_numad} \ - -Dcapng=enabled \ - %{?arg_fuse} \ - %{?arg_netcf} \ - -Dselinux=enabled \ - %{?arg_selinux_mount} \ - -Dapparmor=disabled \ - -Dapparmor_profiles=disabled \ - -Dsecdriver_apparmor=disabled \ - -Dudev=enabled \ - -Dyajl=enabled \ - %{?arg_sanlock} \ - -Dlibpcap=enabled \ - -Dlibnl=enabled \ - -Daudit=enabled \ - -Ddtrace=enabled \ - -Dfirewalld=enabled \ - %{?arg_firewalld_zone} \ - %{?arg_wireshark} \ - %{?arg_libssh} \ - %{?arg_libssh2} \ - -Dpm_utils=disabled \ - -Dnss=enabled \ - %{arg_packager} \ - %{arg_packager_version} \ - -Dqemu_user=%{qemu_user} \ - -Dqemu_group=%{qemu_group} \ - -Dqemu_moddir=%{qemu_moddir} \ - -Dqemu_datadir=%{qemu_datadir} \ - -Dtls_priority=%{tls_priority} \ - %{?enable_werror} \ - -Dexpensive_tests=enabled \ - -Dinit_script=systemd \ - -Ddocs=enabled \ - -Dtests=enabled \ - -Drpath=disabled \ - %{?arg_login_shell} - -%meson_build - -%install -rm -fr %{buildroot} - -export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec) - -%meson_install - -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.a -%if %{with_wireshark} -rm -f $RPM_BUILD_ROOT%{wireshark_plugindir}/libvirt.la -%endif - -# We don't want to install /etc/libvirt/qemu/networks in the main %%files list -# because if the admin wants to delete the default network completely, we don't -# want to end up re-incarnating it on every RPM upgrade. -install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/ -cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \ - $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml -# libvirt saves this file with mode 0600 -chmod 0600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml - -# nwfilter files are installed in /usr/share/libvirt and copied to /etc in %%post -# to avoid verification errors on changed files in /etc -install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/ -cp -a $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml \ - $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/ -# libvirt saves these files with mode 600 -chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml - -%if ! %{with_qemu} -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug -%endif -%find_lang %{name} - -%if ! %{with_sanlock} -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug -%endif - -%if ! %{with_lxc} -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug -%endif - -%if ! %{with_qemu} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu -%endif -%if ! %{with_lxc} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc -%endif -%if ! %{with_libxl} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug -%endif - -# Copied into libvirt-docs subpackage eventually -mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs - -%ifarch %{arches_systemtap_64bit} -mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \ - $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp - - %if %{with_qemu} -mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ - $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp - %endif -%endif - -%check -# Building on slow archs, like emulated s390x in Fedora copr, requires -# raising the test timeout -VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10 - -%define libvirt_daemon_schedule_restart() mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : \ -/bin/systemctl is-active %1.service 1>/dev/null 2>&1 && \ - touch %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 || : - -%define libvirt_daemon_finish_restart() rm -f %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 \ -rmdir %{_localstatedir}/lib/rpm-state/libvirt 2>/dev/null || : - -%define libvirt_daemon_needs_restart() -f %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 - -%define libvirt_daemon_perform_restart() if test %libvirt_daemon_needs_restart %1 \ -then \ - /bin/systemctl try-restart %1.service >/dev/null 2>&1 || : \ -fi \ -%libvirt_daemon_finish_restart %1 - -# For daemons with only UNIX sockets -%define libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1.service -%define libvirt_daemon_systemd_preun() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1.socket - -# For daemons with UNIX and INET sockets -%define libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service -%define libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.socket - -# For daemons with only UNIX sockets and no unprivileged read-only access -%define libvirt_daemon_systemd_post_priv() %systemd_post %1.socket %1-admin.socket %1.service -%define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket - -%pre daemon -# 'libvirt' group is just to allow password-less polkit access to -# libvirtd. The uid number is irrelevant, so we use dynamic allocation -# described at the above link. -getent group libvirt >/dev/null || groupadd -r libvirt - -exit 0 - -%post daemon -%libvirt_daemon_systemd_post_priv virtlogd -%libvirt_daemon_systemd_post_priv virtlockd -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post_inet virtproxyd -%else -%libvirt_daemon_systemd_post_inet libvirtd -%endif - -%systemd_post libvirt-guests.service - -%libvirt_daemon_schedule_restart libvirtd - -%preun daemon -%systemd_preun libvirt-guests.service - -%libvirt_daemon_systemd_preun_inet libvirtd -%libvirt_daemon_systemd_preun_inet virtproxyd -%libvirt_daemon_systemd_preun_priv virtlogd -%libvirt_daemon_systemd_preun_priv virtlockd - -%postun daemon -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - /bin/systemctl reload-or-try-restart virtlockd.service virtlogd.service >/dev/null 2>&1 || : -fi -%systemd_postun libvirt-guests.service - -# In upgrade scenario we must explicitly enable virtlockd/virtlogd -# sockets, if libvirtd is already enabled and start them if -# libvirtd is running, otherwise you'll get failures to start -# guests -%triggerpostun daemon -- libvirt-daemon < 1.3.0 -if [ $1 -ge 1 ] ; then - /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && - /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || : - /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && - /bin/systemctl start virtlogd.socket virtlogd-admin.socket || : -fi - -%posttrans daemon -if test %libvirt_daemon_needs_restart libvirtd -then - # See if user has previously modified their install to - # tell libvirtd to use --listen - grep -E '^LIBVIRTD_ARGS=.*--listen' /etc/sysconfig/libvirtd 1>/dev/null 2>&1 - if test $? = 0 - then - # Then lets keep honouring --listen and *not* use - # systemd socket activation, because switching things - # might confuse mgmt tool like puppet/ansible that - # expect the old style libvirtd - /bin/systemctl mask \ - libvirtd.socket \ - libvirtd-ro.socket \ - libvirtd-admin.socket \ - libvirtd-tls.socket \ - libvirtd-tcp.socket >/dev/null 2>&1 || : - else - # Old libvirtd owns the sockets and will delete them on - # shutdown. Can't use a try-restart as libvirtd will simply - # own the sockets again when it comes back up. Thus we must - # do this particular ordering, so that we get libvirtd - # running with socket activation in use - /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 - if test $? = 0 - then - /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || : - - /bin/systemctl try-restart \ - libvirtd.socket \ - libvirtd-ro.socket \ - libvirtd-admin.socket >/dev/null 2>&1 || : - - /bin/systemctl start libvirtd.service >/dev/null 2>&1 || : - fi - fi -fi - -%libvirt_daemon_finish_restart libvirtd - -%post daemon-driver-network -%if %{with_firewalld_zone} - %firewalld_reload -%endif - -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtnetworkd -%endif -%libvirt_daemon_schedule_restart virtnetworkd - -%preun daemon-driver-network -%libvirt_daemon_systemd_preun virtnetworkd - -%postun daemon-driver-network -%if %{with_firewalld_zone} - %firewalld_reload -%endif - -%posttrans daemon-driver-network -%libvirt_daemon_perform_restart virtnetworkd - - -%post daemon-driver-nwfilter -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtnwfilterd -%endif -%libvirt_daemon_schedule_restart virtnwfilterd - -%preun daemon-driver-nwfilter -%libvirt_daemon_systemd_preun virtnwfilterd - -%posttrans daemon-driver-nwfilter -%libvirt_daemon_perform_restart virtnwfilterd - - -%post daemon-driver-nodedev -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtnodedevd -%endif -%libvirt_daemon_schedule_restart virtnodedevd - -%preun daemon-driver-nodedev -%libvirt_daemon_systemd_preun virtnodedevd - -%posttrans daemon-driver-nodedev -%libvirt_daemon_perform_restart virtnodedevd - - -%post daemon-driver-interface -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtinterfaced -%endif -%libvirt_daemon_schedule_restart virtinterfaced - -%preun daemon-driver-interface -%libvirt_daemon_systemd_preun virtinterfaced - -%posttrans daemon-driver-interface -%libvirt_daemon_perform_restart virtinterfaced - - -%post daemon-driver-secret -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtsecretd -%endif -%libvirt_daemon_schedule_restart virtsecretd - -%preun daemon-driver-secret -%libvirt_daemon_systemd_preun virtsecretd - -%posttrans daemon-driver-secret -%libvirt_daemon_perform_restart virtsecretd - - -%post daemon-driver-storage -%if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtstoraged -%endif -%libvirt_daemon_schedule_restart virtstoraged - -%preun daemon-driver-storage -%libvirt_daemon_systemd_preun virtstoraged - -%posttrans daemon-driver-storage -%libvirt_daemon_perform_restart virtstoraged - - -%if %{with_qemu} -%pre daemon-driver-qemu -# We want soft static allocation of well-known ids, as disk images -# are commonly shared across NFS mounts by id rather than name; see -# https://fedoraproject.org/wiki/Packaging:UsersAndGroups -getent group kvm >/dev/null || groupadd -f -g 36 -r kvm -getent group qemu >/dev/null || groupadd -f -g 107 -r qemu -if ! getent passwd qemu >/dev/null; then - if ! getent passwd 107 >/dev/null; then - useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu - else - useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu - fi -fi -exit 0 - -%post daemon-driver-qemu - %if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtqemud - %endif -%libvirt_daemon_schedule_restart virtqemud - -%preun daemon-driver-qemu -%libvirt_daemon_systemd_preun virtqemud - -%posttrans daemon-driver-qemu -%libvirt_daemon_perform_restart virtqemud -%endif - - -%if %{with_lxc} -%post daemon-driver-lxc - %if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtlxcd - %endif -%libvirt_daemon_schedule_restart virtlxcd - -%preun daemon-driver-lxc -%libvirt_daemon_systemd_preun virtlxcd - -%posttrans daemon-driver-lxc -%libvirt_daemon_perform_restart virtlxcd -%endif - - -%if %{with_vbox} -%post daemon-driver-vbox - %if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtvboxd - %endif -%libvirt_daemon_schedule_restart virtvboxd - -%preun daemon-driver-vbox -%libvirt_daemon_systemd_preun virtvboxd - -%posttrans daemon-driver-vbox -%libvirt_daemon_perform_restart virtvboxd -%endif - - -%if %{with_libxl} -%post daemon-driver-libxl - %if %{with_modular_daemons} -%libvirt_daemon_systemd_post virtxend - %endif -%libvirt_daemon_schedule_restart virtxend - -%preun daemon-driver-libxl -%libvirt_daemon_systemd_preun virtxend - -%posttrans daemon-driver-libxl -%libvirt_daemon_perform_restart virtxend -%endif - - -%post daemon-config-network -if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then - # see if the network used by default network creates a conflict, - # and try to resolve it - # NB: 192.168.122.0/24 is used in the default.xml template file; - # do not modify any of those values here without also modifying - # them in the template. - orig_sub=122 - sub=${orig_sub} - nl=' -' - routes="${nl}$(ip route show | cut -d' ' -f1)${nl}" - case ${routes} in - *"${nl}192.168.${orig_sub}.0/24${nl}"*) - # there was a match, so we need to look for an unused subnet - for new_sub in $(seq 124 254); do - case ${routes} in - *"${nl}192.168.${new_sub}.0/24${nl}"*) - ;; - *) - sub=$new_sub - break; - ;; - esac - done - ;; - *) - ;; - esac - - sed -e "s/${orig_sub}/${sub}/g" \ - < %{_datadir}/libvirt/networks/default.xml \ - > %{_sysconfdir}/libvirt/qemu/networks/default.xml - ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml - # libvirt saves this file with mode 0600 - chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml - - # Make sure libvirt picks up the new network defininiton - %libvirt_daemon_schedule_restart libvirtd - %libvirt_daemon_schedule_restart virtnetworkd -fi - -%posttrans daemon-config-network -%libvirt_daemon_perform_restart libvirtd -%libvirt_daemon_perform_restart virtnetworkd - -%post daemon-config-nwfilter -for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do - sysconfdir_file=%{_sysconfdir}/libvirt/nwfilter/$(basename "$datadir_file") - if [ ! -f "$sysconfdir_file" ]; then - # libvirt saves these files with mode 600 - install -m 0600 "$datadir_file" "$sysconfdir_file" - fi -done -# Make sure libvirt picks up the new nwfilter defininitons -%libvirt_daemon_schedule_restart libvirtd -%libvirt_daemon_schedule_restart virtnwfilterd - -%posttrans daemon-config-nwfilter -%libvirt_daemon_perform_restart libvirtd -%libvirt_daemon_perform_restart virtnwfilterd - -%if %{with_lxc} -%pre login-shell -getent group virtlogin >/dev/null || groupadd -r virtlogin -exit 0 -%endif - -%files - -%files docs -%doc AUTHORS.rst NEWS.rst README.rst -%doc libvirt-docs/* - -%files daemon - -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ - -%{_unitdir}/libvirtd.service -%{_unitdir}/libvirtd.socket -%{_unitdir}/libvirtd-ro.socket -%{_unitdir}/libvirtd-admin.socket -%{_unitdir}/libvirtd-tcp.socket -%{_unitdir}/libvirtd-tls.socket -%{_unitdir}/virtproxyd.service -%{_unitdir}/virtproxyd.socket -%{_unitdir}/virtproxyd-ro.socket -%{_unitdir}/virtproxyd-admin.socket -%{_unitdir}/virtproxyd-tcp.socket -%{_unitdir}/virtproxyd-tls.socket -%{_unitdir}/virt-guest-shutdown.target -%{_unitdir}/virtlogd.service -%{_unitdir}/virtlogd.socket -%{_unitdir}/virtlogd-admin.socket -%{_unitdir}/virtlockd.service -%{_unitdir}/virtlockd.socket -%{_unitdir}/virtlockd-admin.socket -%{_unitdir}/libvirt-guests.service -%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd -%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd -%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd -%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd -%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf -%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf -%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf -%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf -%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf -%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests -%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf - -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd -%dir %{_datadir}/libvirt/ - -%ghost %dir %{_rundir}/libvirt/ - -%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ -%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ -%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ -%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ - - -%dir %attr(0755, root, root) %{_libdir}/libvirt/ -%dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ -%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver -%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so - -%{_datadir}/augeas/lenses/libvirtd.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd.aug -%{_datadir}/augeas/lenses/virtlogd.aug -%{_datadir}/augeas/lenses/tests/test_virtlogd.aug -%{_datadir}/augeas/lenses/virtlockd.aug -%{_datadir}/augeas/lenses/tests/test_virtlockd.aug -%{_datadir}/augeas/lenses/virtproxyd.aug -%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug -%{_datadir}/augeas/lenses/libvirt_lockd.aug -%if %{with_qemu} -%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug -%endif - -%{_datadir}/polkit-1/actions/org.libvirt.unix.policy -%{_datadir}/polkit-1/actions/org.libvirt.api.policy -%{_datadir}/polkit-1/rules.d/50-libvirt.rules - -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ - -%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper - -%attr(0755, root, root) %{_bindir}/virt-ssh-helper - -%attr(0755, root, root) %{_sbindir}/libvirtd -%attr(0755, root, root) %{_sbindir}/virtproxyd -%attr(0755, root, root) %{_sbindir}/virtlogd -%attr(0755, root, root) %{_sbindir}/virtlockd -%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh - -%{_mandir}/man1/virt-admin.1* -%{_mandir}/man1/virt-host-validate.1* -%{_mandir}/man8/virt-ssh-helper.8* -%{_mandir}/man8/libvirtd.8* -%{_mandir}/man8/virtlogd.8* -%{_mandir}/man8/virtlockd.8* -%{_mandir}/man8/virtproxyd.8* -%{_mandir}/man7/virkey*.7* - -%{_bindir}/virt-host-validate -%{_bindir}/virt-admin -%{_datadir}/bash-completion/completions/virt-admin - -%files daemon-config-network -%dir %{_datadir}/libvirt/networks/ -%{_datadir}/libvirt/networks/default.xml -%ghost %{_sysconfdir}/libvirt/qemu/networks/default.xml -%ghost %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml - -%files daemon-config-nwfilter -%dir %{_datadir}/libvirt/nwfilter/ -%{_datadir}/libvirt/nwfilter/*.xml -%ghost %{_sysconfdir}/libvirt/nwfilter/*.xml - -%files daemon-driver-interface -%config(noreplace) %{_sysconfdir}/sysconfig/virtinterfaced -%config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf -%{_datadir}/augeas/lenses/virtinterfaced.aug -%{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug -%{_unitdir}/virtinterfaced.service -%{_unitdir}/virtinterfaced.socket -%{_unitdir}/virtinterfaced-ro.socket -%{_unitdir}/virtinterfaced-admin.socket -%attr(0755, root, root) %{_sbindir}/virtinterfaced -%{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so -%{_mandir}/man8/virtinterfaced.8* - -%files daemon-driver-network -%config(noreplace) %{_sysconfdir}/sysconfig/virtnetworkd -%config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf -%{_datadir}/augeas/lenses/virtnetworkd.aug -%{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug -%{_unitdir}/virtnetworkd.service -%{_unitdir}/virtnetworkd.socket -%{_unitdir}/virtnetworkd-ro.socket -%{_unitdir}/virtnetworkd-admin.socket -%attr(0755, root, root) %{_sbindir}/virtnetworkd -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart -%ghost %dir %{_rundir}/libvirt/network/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/ -%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/ -%attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper -%{_libdir}/%{name}/connection-driver/libvirt_driver_network.so -%{_mandir}/man8/virtnetworkd.8* - -%if %{with_firewalld_zone} -%{_prefix}/lib/firewalld/zones/libvirt.xml -%endif - -%files daemon-driver-nodedev -%config(noreplace) %{_sysconfdir}/sysconfig/virtnodedevd -%config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf -%{_datadir}/augeas/lenses/virtnodedevd.aug -%{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug -%{_unitdir}/virtnodedevd.service -%{_unitdir}/virtnodedevd.socket -%{_unitdir}/virtnodedevd-ro.socket -%{_unitdir}/virtnodedevd-admin.socket -%attr(0755, root, root) %{_sbindir}/virtnodedevd -%{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so -%{_mandir}/man8/virtnodedevd.8* - -%files daemon-driver-nwfilter -%config(noreplace) %{_sysconfdir}/sysconfig/virtnwfilterd -%config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf -%{_datadir}/augeas/lenses/virtnwfilterd.aug -%{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug -%{_unitdir}/virtnwfilterd.service -%{_unitdir}/virtnwfilterd.socket -%{_unitdir}/virtnwfilterd-ro.socket -%{_unitdir}/virtnwfilterd-admin.socket -%attr(0755, root, root) %{_sbindir}/virtnwfilterd -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ -%ghost %dir %{_rundir}/libvirt/network/ -%{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so -%{_mandir}/man8/virtnwfilterd.8* - -%files daemon-driver-secret -%config(noreplace) %{_sysconfdir}/sysconfig/virtsecretd -%config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf -%{_datadir}/augeas/lenses/virtsecretd.aug -%{_datadir}/augeas/lenses/tests/test_virtsecretd.aug -%{_unitdir}/virtsecretd.service -%{_unitdir}/virtsecretd.socket -%{_unitdir}/virtsecretd-ro.socket -%{_unitdir}/virtsecretd-admin.socket -%attr(0755, root, root) %{_sbindir}/virtsecretd -%{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so -%{_mandir}/man8/virtsecretd.8* - -%files daemon-driver-storage - -%files daemon-driver-storage-core -%config(noreplace) %{_sysconfdir}/sysconfig/virtstoraged -%config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf -%{_datadir}/augeas/lenses/virtstoraged.aug -%{_datadir}/augeas/lenses/tests/test_virtstoraged.aug -%{_unitdir}/virtstoraged.service -%{_unitdir}/virtstoraged.socket -%{_unitdir}/virtstoraged-ro.socket -%{_unitdir}/virtstoraged-admin.socket -%attr(0755, root, root) %{_sbindir}/virtstoraged -%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper -%{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so -%{_libdir}/%{name}/storage-file/libvirt_storage_file_fs.so -%{_mandir}/man8/virtstoraged.8* - -%files daemon-driver-storage-disk -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_disk.so - -%files daemon-driver-storage-logical -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_logical.so - -%files daemon-driver-storage-scsi -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_scsi.so - -%files daemon-driver-storage-iscsi -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so - -%if %{with_storage_iscsi_direct} -%files daemon-driver-storage-iscsi-direct -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi-direct.so -%endif - -%files daemon-driver-storage-mpath -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_mpath.so - -%if %{with_storage_gluster} -%files daemon-driver-storage-gluster -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_gluster.so -%{_libdir}/%{name}/storage-file/libvirt_storage_file_gluster.so -%endif - -%if %{with_storage_rbd} -%files daemon-driver-storage-rbd -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_rbd.so -%endif - -%if %{with_storage_sheepdog} -%files daemon-driver-storage-sheepdog -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so -%endif - -%if %{with_storage_zfs} -%files daemon-driver-storage-zfs -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so -%endif - -%if %{with_qemu} -%files daemon-driver-qemu -%config(noreplace) %{_sysconfdir}/sysconfig/virtqemud -%config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf -%config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf -%{_datadir}/augeas/lenses/virtqemud.aug -%{_datadir}/augeas/lenses/tests/test_virtqemud.aug -%{_unitdir}/virtqemud.service -%{_unitdir}/virtqemud.socket -%{_unitdir}/virtqemud-ro.socket -%{_unitdir}/virtqemud-admin.socket -%attr(0755, root, root) %{_sbindir}/virtqemud -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ -%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf -%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu -%ghost %dir %{_rundir}/libvirt/qemu/ -%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ -%dir %attr(0750, root, root) %{_localstatedir}/cache/libvirt/qemu/ -%{_datadir}/augeas/lenses/libvirtd_qemu.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug -%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so -%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/swtpm/ -%dir %attr(0730, tss, tss) %{_localstatedir}/log/swtpm/libvirt/qemu/ -%{_bindir}/virt-qemu-run -%{_mandir}/man1/virt-qemu-run.1* -%{_mandir}/man8/virtqemud.8* -%endif - -%if %{with_lxc} -%files daemon-driver-lxc -%config(noreplace) %{_sysconfdir}/sysconfig/virtlxcd -%config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf -%{_datadir}/augeas/lenses/virtlxcd.aug -%{_datadir}/augeas/lenses/tests/test_virtlxcd.aug -%{_unitdir}/virtlxcd.service -%{_unitdir}/virtlxcd.socket -%{_unitdir}/virtlxcd-ro.socket -%{_unitdir}/virtlxcd-admin.socket -%attr(0755, root, root) %{_sbindir}/virtlxcd -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ -%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc -%ghost %dir %{_rundir}/libvirt/lxc/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/ -%{_datadir}/augeas/lenses/libvirtd_lxc.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug -%attr(0755, root, root) %{_libexecdir}/libvirt_lxc -%{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so -%{_mandir}/man8/virtlxcd.8* -%endif - -%if %{with_libxl} -%files daemon-driver-libxl -%config(noreplace) %{_sysconfdir}/sysconfig/virtxend -%config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf -%{_datadir}/augeas/lenses/virtxend.aug -%{_datadir}/augeas/lenses/tests/test_virtxend.aug -%{_unitdir}/virtxend.service -%{_unitdir}/virtxend.socket -%{_unitdir}/virtxend-ro.socket -%{_unitdir}/virtxend-admin.socket -%attr(0755, root, root) %{_sbindir}/virtxend -%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl -%config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf -%{_datadir}/augeas/lenses/libvirtd_libxl.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/ -%ghost %dir %{_rundir}/libvirt/libxl/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/ -%{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so -%{_mandir}/man8/virtxend.8* -%endif - -%if %{with_vbox} -%files daemon-driver-vbox -%config(noreplace) %{_sysconfdir}/sysconfig/virtvboxd -%config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf -%{_datadir}/augeas/lenses/virtvboxd.aug -%{_datadir}/augeas/lenses/tests/test_virtvboxd.aug -%{_unitdir}/virtvboxd.service -%{_unitdir}/virtvboxd.socket -%{_unitdir}/virtvboxd-ro.socket -%{_unitdir}/virtvboxd-admin.socket -%attr(0755, root, root) %{_sbindir}/virtvboxd -%{_libdir}/%{name}/connection-driver/libvirt_driver_vbox.so -%{_mandir}/man8/virtvboxd.8* -%endif - -%if %{with_qemu_tcg} -%files daemon-qemu -%endif - -%if %{with_qemu_kvm} -%files daemon-kvm -%endif - -%if %{with_lxc} -%files daemon-lxc -%endif - -%if %{with_libxl} -%files daemon-xen -%endif - -%if %{with_vbox} -%files daemon-vbox -%endif - -%if %{with_sanlock} -%files lock-sanlock - %if %{with_qemu} -%config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf - %endif - %if %{with_libxl} -%config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf - %endif -%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so -%{_datadir}/augeas/lenses/libvirt_sanlock.aug -%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug -%dir %attr(0770, root, sanlock) %{_localstatedir}/lib/libvirt/sanlock -%{_sbindir}/virt-sanlock-cleanup -%{_mandir}/man8/virt-sanlock-cleanup.8* -%attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper -%endif - -%files client -%{_mandir}/man1/virsh.1* -%{_mandir}/man1/virt-xml-validate.1* -%{_mandir}/man1/virt-pki-query-dn.1* -%{_mandir}/man1/virt-pki-validate.1* -%{_bindir}/virsh -%{_bindir}/virt-xml-validate -%{_bindir}/virt-pki-query-dn -%{_bindir}/virt-pki-validate - -%{_datadir}/bash-completion/completions/virsh - -%files libs -f %{name}.lang -%license COPYING COPYING.LESSER -%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf -%config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf -%{_libdir}/libvirt.so.* -%{_libdir}/libvirt-qemu.so.* -%{_libdir}/libvirt-lxc.so.* -%{_libdir}/libvirt-admin.so.* -%dir %{_datadir}/libvirt/ -%dir %{_datadir}/libvirt/schemas/ -%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ - -%{_datadir}/systemtap/tapset/libvirt_probes*.stp -%{_datadir}/systemtap/tapset/libvirt_functions.stp -%if %{with_qemu} -%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp -%endif - -%{_datadir}/libvirt/schemas/*.rng - -%{_datadir}/libvirt/cpu_map/*.xml - -%{_datadir}/libvirt/test-screenshot.png - -%if %{with_wireshark} -%files wireshark -%{wireshark_plugindir}/libvirt.so -%endif - -%files nss -%{_libdir}/libnss_libvirt.so.2 -%{_libdir}/libnss_libvirt_guest.so.2 - -%if %{with_lxc} -%files login-shell -%attr(4750, root, virtlogin) %{_bindir}/virt-login-shell -%{_libexecdir}/virt-login-shell-helper -%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf -%{_mandir}/man1/virt-login-shell.1* -%endif - -%files devel -%{_libdir}/libvirt.so -%{_libdir}/libvirt-admin.so -%{_libdir}/libvirt-qemu.so -%{_libdir}/libvirt-lxc.so -%dir %{_includedir}/libvirt -%{_includedir}/libvirt/virterror.h -%{_includedir}/libvirt/libvirt.h -%{_includedir}/libvirt/libvirt-admin.h -%{_includedir}/libvirt/libvirt-common.h -%{_includedir}/libvirt/libvirt-domain.h -%{_includedir}/libvirt/libvirt-domain-checkpoint.h -%{_includedir}/libvirt/libvirt-domain-snapshot.h -%{_includedir}/libvirt/libvirt-event.h -%{_includedir}/libvirt/libvirt-host.h -%{_includedir}/libvirt/libvirt-interface.h -%{_includedir}/libvirt/libvirt-network.h -%{_includedir}/libvirt/libvirt-nodedev.h -%{_includedir}/libvirt/libvirt-nwfilter.h -%{_includedir}/libvirt/libvirt-secret.h -%{_includedir}/libvirt/libvirt-storage.h -%{_includedir}/libvirt/libvirt-stream.h -%{_includedir}/libvirt/libvirt-qemu.h -%{_includedir}/libvirt/libvirt-lxc.h -%{_libdir}/pkgconfig/libvirt.pc -%{_libdir}/pkgconfig/libvirt-admin.pc -%{_libdir}/pkgconfig/libvirt-qemu.pc -%{_libdir}/pkgconfig/libvirt-lxc.pc - -%dir %{_datadir}/libvirt/api/ -%{_datadir}/libvirt/api/libvirt-api.xml -%{_datadir}/libvirt/api/libvirt-admin-api.xml -%{_datadir}/libvirt/api/libvirt-qemu-api.xml -%{_datadir}/libvirt/api/libvirt-lxc-api.xml - - -%changelog -* Thu Jun 6 2024 Jiri Denemark - 8.0.0-23.2.el8 -- util: Fix error return for virProcessKillPainfullyDelay() (RHEL-36064) -- rpc: ensure temporary GSource is removed from client event loop (CVE-2024-4418) - -* Tue Apr 9 2024 Jiri Denemark - 8.0.0-23.1.el8 -- remote: check for negative array lengths before allocation (CVE-2024-2494) - -* Tue Dec 12 2023 Jiri Denemark - 8.0.0-23 -- virnuma: Avoid integer overflow in virNumaGetPages() (rhbz#RHEL-16749) - -* Mon Jul 31 2023 Jiri Denemark - 8.0.0-22 -- lib: Set up cpuset controller for restrictive numatune (rhbz#2223464) - -* Thu Jun 22 2023 Jiri Denemark - 8.0.0-21 -- nodedev: update transient mdevs (rhbz#2143160) - -* Fri May 19 2023 Jiri Denemark - 8.0.0-20 -- qemu: monitor: Drop old monitor fields from 'struct _qemuMonitorMessage' (rhbz#2170472) -- qemu: Make 'struct _qemuMonitorMessage' private (rhbz#2170472) -- qemu: monitor: Move declaration of struct _qemuMonitor to qemu_monitor_priv.h (rhbz#2170472) -- qemu: qemuBlockGetNamedNodeData: Remove pointless error path (rhbz#2170472) -- qemu: monitor: Store whether 'query-named-block-nodes' supports 'flat' parameter (rhbz#2170472) -- qemuMonitorJSONBlockStatsUpdateCapacityBlockdev: Use 'flat' mode of query-named-block-nodes (rhbz#2170472) -- qemu: relax shared memory check for vhostuser daemons (rhbz#2177701) -- virpci: Resolve leak in virPCIVirtualFunctionList cleanup (CVE-2023-2700) -- node_device_conf: Avoid memleak in virNodeDeviceGetPCIVPDDynamicCap() (CVE-2023-2700) - -* Tue Mar 14 2023 Jiri Denemark - 8.0.0-19 -- qemu: domain: Fix logic when tainting domain (rhbz#2174447) -- qemu: agent: Make fetching of 'can-offline' member from 'guest-query-vcpus' optional (rhbz#2174447) - -* Wed Mar 1 2023 Jiri Denemark - 8.0.0-18 -- conf: Make VIR_DOMAIN_NET_TYPE_ETHERNET not share 'host view' (rhbz#2172578) - -* Thu Feb 9 2023 Jiri Denemark - 8.0.0-17 -- vircpi: Add PCIe 5.0 and 6.0 link speeds (rhbz#2168116) - -* Wed Feb 8 2023 Jiri Denemark - 8.0.0-16 -- qemu_namespace: Don't leak memory in qemuDomainGetPreservedMounts() (rhbz#2166573) - -* Tue Jan 31 2023 Jiri Denemark - 8.0.0-15 -- nodedev: fix reported error msg in css cap XML parsing (rhbz#2165011) -- util: refactor virDomainDeviceCCWAddress into virccw.h (rhbz#2165011) -- util: refactor virDomainCCWAddressAsString into virccw (rhbz#2165011) -- util: make reuse of ccw device address format constant (rhbz#2165011) -- util: refactor ccw address constants into virccw (rhbz#2165011) -- util: refactor virDomainCCWAddressIncrement into virccw (rhbz#2165011) -- util: refactor virDomainDeviceCCWAddressIsValid into virccw (rhbz#2165011) -- util: refactor virDomainDeviceCCWAddressEqual into virccw (rhbz#2165011) -- conf: adjust method name virDomainDeviceCCWAddressParseXML (rhbz#2165011) -- util: add ccw device address parsing into virccw (rhbz#2165011) -- util: add virCCWDeviceAddressFromString to virccw (rhbz#2165011) -- nodedev: refactor css format from ccw format method (rhbz#2165011) -- nodedev: refactor ccw device address parsing from XML (rhbz#2165011) -- nodedev: refactor css XML parsing from ccw XML parsing (rhbz#2165011) -- schemas: refactor out nodedev ccw address schema (rhbz#2165011) -- nodedev: add optional device address of channel device to css device (rhbz#2165011) -- nodedev: add tests for optional device address to css device (rhbz#2165011) -- nodedev: prevent internal error on dev_busid parse (rhbz#2165011) -- rpc: Fix memory leak of fds (rhbz#2165428) - -* Wed Jan 11 2023 Jiri Denemark - 8.0.0-14 -- qemu: Ignore missing vm.unprivileged_userfaultfd sysctl (rhbz#2148578) - -* Wed Jan 4 2023 Jiri Denemark - 8.0.0-13 -- build: Only install libvirt-guests when building libvirtd (rhbz#2153688) -- tools: Fix install_mode for some scripts (rhbz#2153688) - -* Tue Dec 13 2022 Jiri Denemark - 8.0.0-12 -- util: json: Split out array->strinlist conversion from virJSONValueObjectGetStringArray (rhbz#2149752) -- qemuAgentGetDisks: Don't use virJSONValueObjectGetStringArray for optional data (rhbz#2149752) -- virpidfile: Add virPidFileReadPathIfLocked func (rhbz#2152188) -- qemu: tpm: Get swtpm pid without binary validation (rhbz#2152188) -- qemu_tpm: Do async IO when starting swtpm emulator (rhbz#2152188) -- qemu: gpu: Get pid without binary validation (rhbz#2152188) -- spec: libvirt-daemon: Add optional dependency on *-client (rhbz#2136591) - -* Fri Oct 7 2022 Jiri Denemark - 8.0.0-11 -- qemu_process: Don't require a hugetlbfs mount for memfd (rhbz#2123196) -- qemu_namespace: Tolerate missing ACLs when creating a path in namespace (rhbz#2123196) -- qemu_namespace: Fix a corner case in qemuDomainGetPreservedMounts() (rhbz#2123196) -- qemu_namespace: Introduce qemuDomainNamespaceSetupPath() (rhbz#2123196) -- qemu_process.c: Propagate hugetlbfs mounts on reconnect (rhbz#2123196) -- qemuProcessReconnect: Don't build memory paths (rhbz#2123196) - -* Mon Jul 25 2022 Jiri Denemark - 8.0.0-10 -- security_selinux.c: Relabel existing mode="bind" UNIX sockets (rhbz#2101575) -- RHEL: qemu_migration: Fix restoring memlock limit on destination (rhbz#2107954) - -* Thu Jun 30 2022 Jiri Denemark - 8.0.0-9 -- conf: virtiofs: add thread_pool element (rhbz#2079582) -- qemu: virtiofs: format --thread-pool-size (rhbz#2079582) -- conf: Move virDomainObj::originalMemlock into qemuDomainObjPrivate (rhbz#2089433) -- qemu_domain: Format qemuDomainObjPrivate::originalMemlock (rhbz#2089433) -- qemu: Add qemuDomainSetMaxMemLock helper (rhbz#2089433) -- qemu_migration: Use qemuDomainSetMaxMemLock (rhbz#2089433) -- qemu_migration: Restore original memory locking limit (rhbz#2089433) -- Add VIR_MIGRATE_ZEROCOPY flag (rhbz#2089433) -- virsh: Add support for VIR_MIGRATE_ZEROCOPY flag (rhbz#2089433) -- qemu_migration: Implement VIR_MIGRATE_ZEROCOPY flag (rhbz#2089433) - -* Wed Jun 15 2022 Jiri Denemark - 8.0.0-8 -- nwfilter: fix crash when counting number of network filters (CVE-2022-0897, rhbz#2063902) -- virDomainDiskDefValidate: Improve error messages for 'startupPolicy' checks (rhbz#2095758) -- domain_validate: Split out validation of disk startup policy (rhbz#2095758) -- virDomainDiskDefValidateStartupPolicy: Validate disk type better (rhbz#2095758) -- virDomainDiskTranslateSourcePool: Fix check of 'startupPolicy' definition (rhbz#2095758) - -* Tue May 17 2022 Jiri Denemark - 8.0.0-7 -- cpu_map: Disable cpu64-rhel* for host-model and baseline (rhbz#1851227) -- cputest: Drop some old artificial baseline tests (rhbz#1851227) -- cputest: Give better names to baseline tests (rhbz#1851227) -- cputest: Add some real world baseline tests (rhbz#1851227) -- cpu_x86: Consolidate signature match in x86DecodeUseCandidate (rhbz#1851227) -- cpu_x86: Refactor feature list comparison in x86DecodeUseCandidate (rhbz#1851227) -- cpu_x86: Penalize disabled features when computing CPU model (rhbz#1851227) -- cpu_x86: Ignore enabled features for input models in x86DecodeUseCandidate (rhbz#1851227) - -* Wed Apr 27 2022 Jiri Denemark - 8.0.0-6 -- conf: Introduce memory allocation threads (rhbz#2067126) -- qemu_capabilities: Detect memory-backend-*.prealloc-threads property (rhbz#2067126) -- qemu_validate: Validate prealloc threads against qemuCpas (rhbz#2067126) -- qemu_command: Generate prealloc-threads property (rhbz#2067126) - -* Fri Feb 25 2022 Jiri Denemark - 8.0.0-5 -- node_device: Rework udevKludgeStorageType() (rhbz#2056673) -- node_device: Treat NVMe disks as regular disks (rhbz#2056673) - -* Thu Feb 10 2022 Jiri Denemark - 8.0.0-4 -- qemu_command: Generate memory only after controllers (rhbz#2050697) -- qemu: Validate domain definition even on migration (rhbz#2050702) - -* Wed Feb 2 2022 Jiri Denemark - 8.0.0-3 -- qemuDomainSetupDisk: Initialize 'targetPaths' (rhbz#2046172) -- RHEL: Remove - 8.0.0-2 -- Revert "report error when virProcessGetStatInfo() is unable to parse data" (rhbz#2041610) -- qemu: fix inactive snapshot revert (rhbz#2043584) - -* Fri Jan 14 2022 Jiri Denemark - 8.0.0-1 -- Rebased to libvirt-8.0.0 (rhbz#2012802) - -* Thu Jan 13 2022 Jiri Denemark - 8.0.0-0rc1.1 -- Rebased to libvirt-8.0.0-rc1 (rhbz#2012802) -- The rebase also fixes the following bugs: - rhbz#1689202, rhbz#2014369, rhbz#2030119, rhbz#2029380, rhbz#2035237 - rhbz#2035714, rhbz#2034180 - -* Wed Dec 1 2021 Jiri Denemark - 7.10.0-1 -- Rebased to libvirt-7.10.0 (rhbz#2012802) -- The rebase also fixes the following bugs: - rhbz#1845468, rhbz#2017928, rhbz#2024419, rhbz#1953389, rhbz#1510237 - -* Wed Nov 3 2021 Jiri Denemark - 7.9.0-1 -- Rebased to libvirt-7.9.0 (rhbz#2012802) -- The rebase also fixes the following bugs: - rhbz#2011731, rhbz#2012385, rhbz#2013539 - -* Fri Oct 15 2021 Jiri Denemark - 7.8.0-1 -- Rebased to libvirt-7.8.0 (rhbz#2012802) -- The rebase also fixes the following bugs: - rhbz#1839070, rhbz#1942275, rhbz#1995865, rhbz#1806857, rhbz#1924616 - rhbz#1978574, rhbz#1989457, rhbz#1965589, rhbz#1677608, rhbz#1926508 - rhbz#1810863, rhbz#1845468, rhbz#1738392, rhbz#1965140 - -* Thu Sep 2 2021 Danilo C. L. de Paula - 7.6.0-2.fc34 -- Resolves: bz#2000225 - (Rebase virt:rhel module:stream based on AV-8.6) - -* Fri Aug 6 2021 Jiri Denemark - 6.0.0-37 -- security: fix SELinux label generation logic (CVE-2021-3631) -- storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath (CVE-2021-3667) - -* Tue Jun 1 2021 Jiri Denemark - 6.0.0-36 -- network: make it safe to call networkSetupPrivateChains() multiple times (rhbz#1942805) -- network: force re-creation of iptables private chains on firewalld restart (rhbz#1942805) -- hostdev: Update mdev pointer reference after checking device type (rhbz#1940449) -- hostdev: mdev: Lookup mdevs by sysfs path rather than mdev struct (rhbz#1940449) -- qemu_firmware: don't error out for unknown firmware features (rhbz#1961562) -- docs: improve description of secure attribute for loader element (rhbz#1929357) -- conf: introduce virDomainDefParseBootInitOptions (rhbz#1929357) -- conf: introduce virDomainDefParseBootKernelOptions (rhbz#1929357) -- conf: introduce virDomainDefParseBootFirmwareOptions (rhbz#1929357) -- conf: introduce virDomainDefParseBootLoaderOptions (rhbz#1929357) -- conf: introduce virDomainDefParseBootAcpiOptions (rhbz#1929357) -- conf: use switch in virDomainDefParseBootOptions (rhbz#1929357) -- conf: introduce support for firmware auto-selection feature filtering (rhbz#1929357) -- qemu: implement support for firmware auto-selection feature filtering (rhbz#1929357) -- domain_conf: Don't leak def->os.firmwareFeatures (rhbz#1929357) -- conf: remove duplicated firmware type attribute (rhbz#1929357) - -* Thu Mar 4 2021 Jiri Denemark - 6.0.0-35 -- vircgroupv2: properly detect placement of running VM (rhbz#1798463) -- virsystemd: export virSystemdHasMachined (rhbz#1798463) -- virsystemd: introduce virSystemdGetMachineByPID (rhbz#1798463) -- virsystemd: introduce virSystemdGetMachineUnitByPID (rhbz#1798463) -- vircgroup: use DBus call to systemd for some APIs (rhbz#1798463) -- vircgroupv1: refactor virCgroupV1DetectPlacement (rhbz#1798463) -- vircgroupv2: move task into cgroup before enabling controllers (rhbz#1798463) -- vircgroup: introduce virCgroupV1Exists and virCgroupV2Exists (rhbz#1798463) -- vircgroup: introduce nested cgroup to properly work with systemd (rhbz#1798463) -- tests: add cgroup nested tests (rhbz#1798463) -- vircgroup: correctly free nested virCgroupPtr (rhbz#1798463) -- qemu: Add virtio related options to vsock (rhbz#1931548) -- domain_validate: use defines for cpu period and quota limits (rhbz#1798463) -- docs: use proper cpu quota value in our documentation (rhbz#1798463) -- vircgroup: enforce range limit for cpu.shares (rhbz#1798463) -- cgroup: use virCgroupSetCpuShares instead of virCgroupSetupCpuShares (rhbz#1798463) -- cpumap: Add support for ibrs CPU feature (rhbz#1926864) -- cpumap: Add support for svme-addr-check CPU feature (rhbz#1926864) -- cpu_map: Add EPYC-Milan x86 CPU model (rhbz#1926864) -- cpu_map: Install x86_EPYC-Milan.xml (rhbz#1926864) -- cpu_map: Fix spelling of svme-addr-chk feature (rhbz#1926864) - -* Mon Feb 1 2021 Jiri Denemark - 6.0.0-34 -- qemu: move cgroup cpu period and quota defines to vircgroup.h (rhbz#1915733) -- vircgroupv1: use defines for cpu period and quota limits (rhbz#1915733) -- vircgroupv2: use defines for cpu period and quota limits (rhbz#1915733) -- vircgroup: fix cpu quota maximum limit (rhbz#1915733) -- util: add virNetDevGetPhysPortName (rhbz#1918708) -- util: avoid manual VIR_FREE of a g_autofree pointer in virPCIGetName() (rhbz#1918708) -- util: Add phys_port_name support on virPCIGetNetName (rhbz#1918708) - -* Thu Jan 21 2021 Jiri Denemark - 6.0.0-33 -- cpu_map: Fix Icelake Server model number (rhbz#1537734) -- cputestdata: Add test data for Snowridge (rhbz#1537734) -- cpu_map: Add support for fsrm CPU feature (rhbz#1537734) -- cpu_map: Add support for core-capability CPU feature (rhbz#1537734) -- cpu_map: Add support for split-lock-detect CPU feature (rhbz#1537734) -- cpu_map: Define and enable Snowridge model (rhbz#1537734) -- util: fix typo in VIR_MOCK_WRAP_RET_ARGS() (rhbz#1607929) -- util/tests: enable locking on iptables/ebtables commandlines in unit tests (rhbz#1607929) -- util/tests: enable locking on iptables/ebtables commandlines by default (rhbz#1607929) -- tests: fix iptables test case commandline options in virfirewalltest.c (rhbz#1607929) -- network: be more verbose about the reason for a firewall reload (rhbz#1607929) -- util: always check for ebtables/iptables binaries, even when using firewalld (rhbz#1607929) -- util: synchronize with firewalld before we start calling iptables directly (rhbz#1607929) -- util: call iptables directly rather than via firewalld (rhbz#1607929) -- util: virhostcpu: Fail when fetching CPU Stats for invalid cpu (rhbz#1915183) - -* Tue Dec 15 2020 Jiri Denemark - 6.0.0-32 -- util: replace macvtap name reservation bitmap with a simple counter (rhbz#1874304) -- util: assign tap device names using a monotonically increasing integer (rhbz#1874304) -- util: virNetDevTapCreate: initialize fd to -1 (rhbz#1874304) - -* Thu Dec 10 2020 Jiri Denemark - 6.0.0-31 -- conf: properly clear out autogenerated macvtap names when formatting/parsing (rhbz#1872610) -- qemu: format 'ramfb' attribute for mediated devices (rhbz#1876297) - -* Mon Nov 9 2020 Jiri Denemark - 6.0.0-30 -- cpu_map: Add missing x86 features in 0x7 CPUID leaf (rhbz#1861506) -- cpu_map: Add missing x86 features in 0x80000008 CPUID leaf (rhbz#1861506) -- cpu_map: Add missing AMD SVM features (rhbz#1861506) -- Add testdata for AMD EPYC 7502 (rhbz#1861506) -- cpu_map: Defined and enable EPYC-Rome model (rhbz#1861506) -- cpu_map: Remove monitor feature from EPYC-Rome (rhbz#1861506) -- tests: qemuxml2argv: Use existing machine type for 'numatune-distances' case (rhbz#1749518) -- qemuxml2xmltest: Add "numatune-distance" test case (rhbz#1749518) -- conf: Move and rename virDomainParseScaledValue() (rhbz#1749518) -- numa_conf: Drop CPU from name of two functions (rhbz#1749518) -- qemu_command: Rename qemuBuildNumaArgStr() (rhbz#1749518) -- qemuBuildMachineCommandLine: Drop needless check (rhbz#1749518) -- numa_conf: Make virDomainNumaSetNodeCpumask() return void (rhbz#1749518) -- Allow NUMA nodes without vCPUs (rhbz#1749518) -- conf: Parse and format HMAT (rhbz#1749518) -- conf: Validate NUMA HMAT configuration (rhbz#1749518) -- numa: expose HMAT APIs (rhbz#1749518) -- qemu: Introduce QEMU_CAPS_NUMA_HMAT capability (rhbz#1749518) -- qemu: Build HMAT command line (rhbz#1749518) -- qemuBuildNumaCommandLine: Fix @masterInitiator check (rhbz#1749518) -- numa_conf: Properly check for caches in virDomainNumaDefValidate() (rhbz#1749518) -- RNG: Allow interleaving of /domain/cpu/numa/cell children (rhbz#1749518) - -* Fri Oct 9 2020 Jiri Denemark - 6.0.0-29 -- qemu: substitute missing model name for host-passthrough (rhbz#1850680) -- rpc: gendispatch: handle empty flags (CVE-2020-25637) -- rpc: add support for filtering @acls by uint params (CVE-2020-25637) -- rpc: require write acl for guest agent in virDomainInterfaceAddresses (CVE-2020-25637) -- qemu: agent: set ifname to NULL after freeing (CVE-2020-25637) -- qemu: Fix domfsinfo for non-PCI device information from guest agent (rhbz#1858771) -- virDomainNetFindIdx: add support for CCW addresses (rhbz#1837495) -- check for NULL before calling g_regex_unref (rhbz#1861176) -- virhostcpu.c: fix 'die_id' parsing for Power hosts (rhbz#1876742) -- qemuFirmwareFillDomain: Fill NVRAM template on migration too (rhbz#1880418) -- node_device: refactor udevProcessCCW (rhbz#1853289, rhbz#1865932) -- node_device: detect CSS devices (rhbz#1853289, rhbz#1865932) -- virsh: nodedev: ability to filter CSS capabilities (rhbz#1853289, rhbz#1865932) -- node_device: detect DASD devices (rhbz#1853289, rhbz#1865932) -- udevProcessCSS: Check if def->driver is non-NULL (rhbz#1853289, rhbz#1865932) - -* Wed Aug 26 2020 Jiri Denemark - 6.0.0-28 -- virdevmapper: Don't cache device-mapper major (rhbz#1860421) -- virdevmapper: Handle kernel without device-mapper support (rhbz#1860421) -- virdevmapper: Ignore all errors when opening /dev/mapper/control (rhbz#1860421) - -* Fri Aug 7 2020 Jiri Denemark - 6.0.0-27 -- src: assume sys/sysmacros.h always exists on Linux (rhbz#1860421) -- virdevmapper.c: Join two WITH_DEVMAPPER sections together (rhbz#1860421) -- virDevMapperGetTargetsImpl: Use VIR_AUTOSTRINGLIST (rhbz#1860421) -- virdevmapper: Don't use libdevmapper to obtain dependencies (CVE-2020-14339, rhbz#1860421) -- virDevMapperGetTargets: Don't ignore EBADF (rhbz#1860421) - -* Fri Jul 24 2020 Jiri Denemark - 6.0.0-26 -- qemu: blockjob: Don't base bitmap handling of active-layer block commit on QEMU_CAPS_BLOCKDEV_REOPEN (rhbz#1857779) -- qemu: blockjob: Actually delete temporary bitmap on failed active commit (rhbz#1857779) -- qemu: block: Remove 'active-write' bitmap even if there are no bitmaps to merge (rhbz#1857779) -- qemuDomainBlockPivot: Rename 'actions' to 'bitmapactions' (rhbz#1857779) -- qemuDomainBlockPivot: Ignore failures of creating active layer bitmap (rhbz#1857779) - -* Wed Jun 24 2020 Jiri Denemark - 6.0.0-25 -- Upgrade components in virt:rhel module:stream for RHEL-8.3 release (rhbz#1828317) -- conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used (CVE-2020-14301) -- util: Introduce a parser for kernel cmdline arguments (rhbz#1848997) -- qemu: Check if s390 secure guest support is enabled (rhbz#1848997) -- qemu: Check if AMD secure guest support is enabled (rhbz#1848997) -- tools: Secure guest check on s390 in virt-host-validate (rhbz#1848997) -- tools: Secure guest check for AMD in virt-host-validate (rhbz#1848997) -- docs: Update AMD launch secure description (rhbz#1848997) -- docs: Describe protected virtualization guest setup (rhbz#1848997) - -* Fri Jun 19 2020 Danilo C. L. de Paula - 6.0.0 -- Resolves: bz#1828317 -(Upgrade components in virt:rhel module:stream for RHEL-8.3 release) - -* Tue Jun 09 2020 Danilo C. L. de Paula - 6.0.0 -- Resolves: bz#1810193 -(Upgrade components in virt:rhel module:stream for RHEL-8.3 release) - -* Fri Jun 05 2020 Danilo C. L. de Paula - 6.0.0 -- Resolves: bz#1810193 -(Upgrade components in virt:rhel module:stream for RHEL-8.3 release) - -* Mon Apr 27 2020 Danilo C. L. de Paula - 6.0.0 -- Resolves: bz#1810193 - (Upgrade components in virt:rhel module:stream for RHEL-8.3 release) - -* Mon Mar 16 2020 Jiri Denemark - 4.5.0-42 -- RHEL: virscsi: Check device type before getting it's /dev node name (rhbz#1808388) -- RHEL: virscsi: Support TAPEs in virSCSIDeviceGetDevName() (rhbz#1808388) -- RHEL: virscsi: Introduce and use virSCSIDeviceGetUnprivSGIOSysfsPath() (rhbz#1808388) -- RHEL: virutil: Accept non-block devices in virGetDeviceID() (rhbz#1808388) -- RHEL: qemuSetUnprivSGIO: Actually use calculated @sysfs_path to set unpriv_sgio (rhbz#1808388) -- RHEL: qemuCheckUnprivSGIO: use @sysfs_path to get unpriv_sgio (rhbz#1808399) - -* Wed Mar 4 2020 Jiri Denemark - 4.5.0-41 -- qemu: Translate features in virQEMUCapsGetCPUFeatures (rhbz#1804224) - -* Mon Feb 17 2020 Jiri Denemark - 4.5.0-40 -- process: wait longer on kill per assigned Hostdev (rhbz#1785338) -- process: wait longer 5->30s on hard shutdown (rhbz#1785338) - -* Mon Feb 10 2020 Jiri Denemark - 4.5.0-39 -- selinux: Do not report an error when not returning -1 (rhbz#1788096) -- qemu: Fix hyperv features with QEMU 4.1 (rhbz#1794868) -- qemu: Prefer dashes for hyperv features (rhbz#1794868) -- cpu: Drop KVM_ from hyperv feature macros (rhbz#1794868) -- cpu: Drop unused KVM features (rhbz#1794868) -- qemu: Fix KVM features with QEMU 4.1 (rhbz#1794868) -- cpu: Drop CPUID definition for hv-spinlocks (rhbz#1794868) - -* Tue Jan 14 2020 Jiri Denemark - 4.5.0-38 -- cpu_map/x86: Add support for BFLOAT16 data type (rhbz#1749516) - -* Fri Dec 13 2019 Jiri Denemark - 4.5.0-37 -- 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) - -* Thu Nov 21 2019 Jiri Denemark - 4.5.0-36 -- cpu_conf: Pass policy to CPU feature filtering callbacks (rhbz#1749672, rhbz#1756156, rhbz#1721608) -- qemuxml2*test: Add tests for Icelake-Server, -pconfig (rhbz#1749672, rhbz#1756156, rhbz#1721608) -- qemu: Drop disabled CPU features unknown to QEMU (rhbz#1749672, rhbz#1756156, rhbz#1721608) -- cputest: Add data for Ice Lake Server CPU (rhbz#1749672, rhbz#1756156, rhbz#1721608) -- cpu_map: Drop pconfig from Icelake-Server CPU model (rhbz#1749672, rhbz#1756156, rhbz#1721608) -- qemu: Fix NULL ptr dereference caused by qemuDomainDefFormatBufInternal (rhbz#1749672, rhbz#1756156, rhbz#1721608) - -* Mon Sep 16 2019 Jiri Denemark - 4.5.0-35 -- vircgroupv2: fix setting cpu.max period (rhbz#1749227) - -* Wed Sep 4 2019 Jiri Denemark - 4.5.0-34 -- vircgroupv2: fix abort in VIR_AUTOFREE (rhbz#1747440) - -* Mon Aug 26 2019 Jiri Denemark - 4.5.0-33 -- vircgroupv2: fix parsing multiple values in single file (rhbz#1741825) -- vircgroupv2: fix virCgroupV2GetCpuCfsQuota for "max" value (rhbz#1741837) - -* Mon Aug 19 2019 Jiri Denemark - 4.5.0-32 -- virDomainObjListAddLocked: Produce better error message than 'Duplicate key' (rhbz#1737790) -- virdbus: Grab a ref as long as the while loop is executed (rhbz#1741900) - -* Tue Jul 30 2019 Jiri Denemark - 4.5.0-31 -- virDomainObjListAddLocked: fix double free (rhbz#1728530) -- docs: schemas: Decouple the virtio options from each other (rhbz#1729675) -- util: command: use VIR_AUTOFREE instead of VIR_FREE for scalar types (rhbz#1721434) -- util: command: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC (rhbz#1721434) -- util: netdevopenvswitch: use VIR_AUTOFREE instead of VIR_FREE for scalar types (rhbz#1721434) -- util: virnetdevopenvswitch: Drop an unused variable @ovs_timeout (rhbz#1721434) -- util: netdevopenvswitch: use VIR_AUTOPTR for aggregate types (rhbz#1721434) -- util: suppress unimportant ovs-vsctl errors when getting interface stats (rhbz#1721434) -- virNetDevOpenvswitchInterfaceStats: Optimize for speed (rhbz#1721434) -- test: Introduce virnetdevopenvswitchtest (rhbz#1721434) -- vircommand: Separate mass FD closing into a function (rhbz#1721434) -- virCommand: use procfs to learn opened FDs (rhbz#1721434) -- util: command: Ignore bitmap errors when enumerating file descriptors to close (rhbz#1721434) -- util: Avoid possible error in virCommandMassClose (rhbz#1721434) -- vircgroup: fix cgroups v2 controllers detection (rhbz#1689297) -- vircgroupv2: store enabled controllers (rhbz#1689297) - -* Wed Jul 3 2019 Jiri Denemark - 4.5.0-30 -- virWaitForDevices: Drop confusing part of comment (rhbz#1710575) -- lib: Drop UDEVSETTLE (rhbz#1710575) -- m4: Provide default value fore UDEVADM (rhbz#1710575) -- m4: Drop needless string checks (rhbz#1710575) -- util: vircgroup: introduce virCgroup(Get|Set)ValueRaw (rhbz#1658890) -- util: vircgroup: move virCgroupGetValueStr out of virCgroupGetValueForBlkDev (rhbz#1658890) -- util: vircgroupv1: add support for BFQ blkio files (rhbz#1658890) -- util: vircgroupv2: add support for BFQ files (rhbz#1658890) -- Handle copying bitmaps to larger data buffers (rhbz#1703160) - -* Tue Jul 2 2019 Jiri Denemark - 4.5.0-29 -- cpu: allow include files for CPU definition (rhbz#1686895) -- cpu: fix cleanup when signature parsing fails (rhbz#1686895) -- cpu: push more parsing logic into common code (rhbz#1686895) -- cpu: simplify failure cleanup paths (rhbz#1686895) -- cpu_map: Add support for arch-capabilities feature (rhbz#1693433) -- cputest: Add data for Intel(R) Xeon(R) CPU E5-2630 v4 (rhbz#1686895) -- cputest: Add data for Intel(R) Core(TM) i7-7600U (rhbz#1686895) -- cputest: Add data for Intel(R) Xeon(R) CPU E7540 (rhbz#1686895) -- cputest: Add data for Intel(R) Xeon(R) CPU E5-2650 (rhbz#1686895) -- cputest: Add data for Intel(R) Core(TM) i7-8700 (rhbz#1686895) -- cpu_x86: Separate ancestor model parsing from x86ModelParse (rhbz#1686895) -- cpu_x86: Separate signature parsing from x86ModelParse (rhbz#1686895) -- cpu_x86: Separate vendor parsing from x86ModelParse (rhbz#1686895) -- cpu_x86: Separate feature list parsing from x86ModelParse (rhbz#1686895) -- cpu_x86: Make sure CPU model names are unique in cpu_map (rhbz#1686895) -- cpu_x86: Add x86ModelCopySignatures helper (rhbz#1686895) -- cpu_x86: Store CPU signature in an array (rhbz#1686895) -- cpu_x86: Allow multiple signatures for a CPU model (rhbz#1686895) -- cpu_x86: Log decoded CPU model and signatures (rhbz#1686895) -- qemu_capabilities: Inroduce virQEMUCapsGetCPUModelX86Data (rhbz#1686895) -- qemu_capabilities: Introduce virQEMUCapsGetCPUModelInfo (rhbz#1686895) -- qemu_capabilities: Use virQEMUCapsGetCPUModelInfo (rhbz#1686895) -- cpu_x86: Add virCPUx86DataGetSignature for tests (rhbz#1686895) -- cpu_map: Add hex representation of signatures (rhbz#1686895) -- cputest: Test CPU signatures (rhbz#1686895) -- cpu_map: Add more signatures for Conroe CPU model (rhbz#1686895) -- cpu_map: Add more signatures for Penryn CPU model (rhbz#1686895) -- cpu_map: Add more signatures for Nehalem CPU models (rhbz#1686895) -- cpu_map: Add more signatures for Westmere CPU model (rhbz#1686895) -- cpu_map: Add more signatures for SandyBridge CPU models (rhbz#1686895) -- cpu_map: Add more signatures for IvyBridge CPU models (rhbz#1686895) -- cpu_map: Add more signatures for Haswell CPU models (rhbz#1686895) -- cpu_map: Add more signatures for Broadwell CPU models (rhbz#1686895) -- cpu_map: Add more signatures for Skylake-Client CPU models (rhbz#1686895) -- cpu: Don't access invalid memory in virCPUx86Translate (rhbz#1686895) -- cpu_x86: Require within in CPU map (rhbz#1697627) -- cputest: Add data for Intel(R) Xeon(R) Platinum 8268 CPU (rhbz#1693433) -- cpu_map: Add Cascadelake-Server CPU model (rhbz#1693433) -- cpu_x86: Introduce virCPUx86DataItem container struct (rhbz#1697627) -- cpu_x86: Rename virCPUx86Vendor.cpuid (rhbz#1697627) -- cpu_x86: Rename virCPUx86DataItem variables (rhbz#1697627) -- cpu_x86: Rename x86DataCpuidNext function (rhbz#1697627) -- cpu_x86: Rename x86DataCpuid (rhbz#1697627) -- cpu_x86: Rename virCPUx86CPUIDSorter (rhbz#1697627) -- cpu_x86: Rename virCPUx86DataAddCPUIDInt (rhbz#1697627) -- cpu_x86: Rename virCPUx86DataAddCPUID (rhbz#1697627) -- cpu_x86: Rename virCPUx86VendorToCPUID (rhbz#1697627) -- cpu_x86: Simplify x86DataAdd (rhbz#1697627) -- cpu_x86: Introduce virCPUx86DataCmp (rhbz#1697627) -- cpu_x86: Make x86cpuidSetBits more general (rhbz#1697627) -- cpu_x86: Make x86cpuidClearBits more general (rhbz#1697627) -- cpu_x86: Make x86cpuidAndBits more general (rhbz#1697627) -- cpu_x86: Make x86cpuidMatchMasked more general (rhbz#1697627) -- cpu_x86: Make x86cpuidMatch more general (rhbz#1697627) -- cpu_x86: Store virCPUx86DataItem content in union (rhbz#1697627) -- cpu_x86: Add support for storing MSR features in CPU map (rhbz#1697627) -- cpu_x86: Move *CheckFeature functions (rhbz#1697627) -- cputest: Add support for MSR features to cpu-parse.sh (rhbz#1697627) -- util: file: introduce VIR_AUTOCLOSE macro to close fd of the file automatically (rhbz#1697627) -- vircpuhost: Add support for reading MSRs (rhbz#1697627) -- virhostcpu: Make virHostCPUGetMSR() work only on x86 (rhbz#1697627) -- cpu_x86: Fix placement of *CheckFeature functions (rhbz#1697627) -- cpu_conf: Introduce virCPUDefFilterFeatures (rhbz#1697627) -- qemu_command: Use consistent syntax for CPU features (rhbz#1697627) -- tests: Add QEMU caps data for future 4.1.0 (rhbz#1697627) -- tests: Add domain capabilities case for QEMU 4.1.0 (rhbz#1697627) -- qemuxml2argvtest: Add test for CPU features translation (rhbz#1697627) -- qemu: Add APIs for translating CPU features (rhbz#1697627) -- qemu: Probe for max-x86_64-cpu type (rhbz#1697627) -- qemu: Probe for "unavailable-features" CPU property (rhbz#1697627) -- qemu: Probe host CPU after capabilities (rhbz#1697627) -- qemu_command: Use canonical names of CPU features (rhbz#1697627) -- qemu: Translate feature names from query-cpu-model-expansion (rhbz#1697627) -- qemu: Don't use full CPU model expansion (rhbz#1697627) -- qemu: Make qemuMonitorGetGuestCPU usable on x86 only (rhbz#1697627) -- cpu: Introduce virCPUDataAddFeature (rhbz#1697627) -- qemu: Add type filter to qemuMonitorJSONParsePropsList (rhbz#1697627) -- util: string: Introduce macro for automatic string lists (rhbz#1697627) -- util: json: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC (rhbz#1697627) -- qemu: Introduce generic qemuMonitorGetGuestCPU (rhbz#1697627) -- qemu_process: Prefer generic qemuMonitorGetGuestCPU (rhbz#1697627) -- util: Rework virStringListAdd (rhbz#1697627) -- conf: Introduce virCPUDefCheckFeatures (rhbz#1697627) -- cpu_x86: Turn virCPUx86DataIteratorInit into a function (rhbz#1697627) -- cpu_x86: Introduce virCPUx86FeatureFilter*MSR (rhbz#1697627) -- cpu_x86: Read CPU features from IA32_ARCH_CAPABILITIES MSR (rhbz#1697627) -- cpu_map: Introduce IA32_ARCH_CAPABILITIES MSR features (rhbz#1697627) -- qemu: Forbid MSR features with old QEMU (rhbz#1697627) -- qemu: Drop MSR features from host-model with old QEMU (rhbz#1697627) -- cpu_x86: Fix memory leak - virCPUx86GetHost (rhbz#1697627) -- qemu: Use @tmpChr in qemuDomainDetachChrDevice to build device string (rhbz#1624204) -- qemu: Drop "user-" prefix for guestfwd netdev (rhbz#1624204) -- qemu_hotplug: Attach guestfwd using netdev_add (rhbz#1624204) -- qemu_hotplug: Detach guestfwd using netdev_del (rhbz#1624204) -- qemuhotplugtest: Test guestfwd attach and detach (rhbz#1624204) -- daemon: Register secret driver before storage driver (rhbz#1685151) -- bhyve: Move autostarting of domains into bhyveStateInitialize (rhbz#1685151) -- Revert "virStateDriver - Separate AutoStart from Initialize" (rhbz#1685151) -- Revert "Separate out StateAutoStart from StateInitialize" (rhbz#1685151) -- util: moving 'type' argument to avoid issues with mount() syscall. (rhbz#1689297) -- util: cgroup: use VIR_AUTOFREE instead of VIR_FREE for scalar types (rhbz#1689297) -- vircgroup: Rename structs to start with underscore (rhbz#1689297) -- vircgroup: Introduce standard set of typedefs and use them (rhbz#1689297) -- vircgroup: Extract file link resolving into separate function (rhbz#1689297) -- vircgroup: Remove unused function virCgroupKill() (rhbz#1689297) -- vircgroup: Unexport unused function virCgroupAddTaskController() (rhbz#1689297) -- vircgroup: Unexport unused function virCgroupRemoveRecursively (rhbz#1689297) -- vircgroup: Move function used in tests into vircgrouppriv.h (rhbz#1689297) -- vircgroup: Remove pointless bool parameter (rhbz#1689297) -- vircgroup: Extract mount options matching into function (rhbz#1689297) -- vircgroup: Use virCgroupMountOptsMatchController in virCgroupDetectPlacement (rhbz#1689297) -- vircgroup: Introduce virCgroupEnableMissingControllers (rhbz#1689297) -- vircgroup: machinename will never be NULL (rhbz#1689297) -- vircgroup: Remove virCgroupAddTaskController (rhbz#1689297) -- vircgroup: Introduce virCgroupGetMemoryStat (rhbz#1689297) -- lxc: Use virCgroupGetMemoryStat (rhbz#1689297) -- vircgroup: fix MinGW build (rhbz#1689297) -- vircgroup: Duplicate string before modifying (rhbz#1689297) -- vircgroup: Extract controller detection into function (rhbz#1689297) -- vircgroup: Extract placement validation into function (rhbz#1689297) -- vircgroup: Split virCgroupPathOfController into two functions (rhbz#1689297) -- vircgroup: Call virCgroupRemove inside virCgroupMakeGroup (rhbz#1689297) -- vircgroup: Simplify if conditions in virCgroupMakeGroup (rhbz#1689297) -- vircgroup: Remove obsolete sa_assert (rhbz#1689297) -- tests: Resolve possible overrun (rhbz#1689297) -- vircgroup: cleanup controllers not managed by systemd on error (rhbz#1689297) -- vircgroup: fix bug in virCgroupEnableMissingControllers (rhbz#1689297) -- vircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process (rhbz#1689297) -- vircgroup: introduce virCgroupTaskFlags (rhbz#1689297) -- vircgroup: introduce virCgroupAddThread (rhbz#1689297) -- vircgroupmock: cleanup unused cgroup files (rhbz#1689297) -- vircgroupmock: rewrite cgroup fopen mocking (rhbz#1689297) -- vircgrouptest: call virCgroupDetectMounts directly (rhbz#1689297) -- vircgrouptest: call virCgroupNewSelf instead virCgroupDetectMounts (rhbz#1689297) -- util: introduce vircgroupbackend files (rhbz#1689297) -- vircgroup: introduce cgroup v1 backend files (rhbz#1689297) -- vircgroup: extract virCgroupV1Available (rhbz#1689297) -- vircgroup: detect available backend for cgroup (rhbz#1689297) -- vircgroup: extract virCgroupV1ValidateMachineGroup (rhbz#1689297) -- vircgroup: extract virCgroupV1CopyMounts (rhbz#1689297) -- vircgroup: extract v1 detect functions (rhbz#1689297) -- vircgroup: extract virCgroupV1CopyPlacement (rhbz#1689297) -- vircgroup: extract virCgroupV1ValidatePlacement (rhbz#1689297) -- vircgroup: extract virCgroupV1StealPlacement (rhbz#1689297) -- vircgroup: extract virCgroupV1DetectControllers (rhbz#1689297) -- vircgroup: extract virCgroupV1HasController (rhbz#1689297) -- vircgroup: extract virCgroupV1GetAnyController (rhbz#1689297) -- vircgroup: extract virCgroupV1PathOfController (rhbz#1689297) -- vircgroup: extract virCgroupV1MakeGroup (rhbz#1689297) -- vircgroup: extract virCgroupV1Remove (rhbz#1689297) -- vircgroup: extract virCgroupV1AddTask (rhbz#1689297) -- vircgroup: extract virCgroupV1HasEmptyTasks (rhbz#1689297) -- vircgroup: extract virCgroupV1BindMount (rhbz#1689297) -- vircgroup: extract virCgroupV1SetOwner (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)BlkioWeight (rhbz#1689297) -- vircgroup: extract virCgroupV1GetBlkioIoServiced (rhbz#1689297) -- vircgroup: extract virCgroupV1GetBlkioIoDeviceServiced (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceWeight (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceReadIops (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceWriteIops (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceReadBps (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceWriteBps (rhbz#1689297) -- vircgroup: extract virCgroupV1SetMemory (rhbz#1689297) -- vircgroup: extract virCgroupV1GetMemoryStat (rhbz#1689297) -- vircgroup: extract virCgroupV1GetMemoryUsage (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)Memory*Limit (rhbz#1689297) -- vircgroup: extract virCgroupV1GetMemSwapUsage (rhbz#1689297) -- vircgroup: extract virCgroupV1(Allow|Deny)Device (rhbz#1689297) -- vircgroup: extract virCgroupV1(Allow|Deny)AllDevices (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)CpuShares (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)CpuCfsPeriod (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)CpuCfsQuota (rhbz#1689297) -- vircgroup: extract virCgroupV1SupportsCpuBW (rhbz#1689297) -- vircgroup: extract virCgroupV1GetCpuacct*Usage (rhbz#1689297) -- vircgroup: extract virCgroupV1GetCpuacctStat (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)FreezerState (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)CpusetMems (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)CpusetMemoryMigrate (rhbz#1689297) -- vircgroup: extract virCgroupV1(Set|Get)CpusetCpus (rhbz#1689297) -- vircgroup: rename virCgroupController into virCgroupV1Controller (rhbz#1689297) -- vircgroup: rename controllers to legacy (rhbz#1689297) -- vircgroup: remove VIR_CGROUP_SUPPORTED (rhbz#1689297) -- vircgroup: include system headers only on linux (rhbz#1689297) -- vircgroupv1: fix build on non-linux OSes (rhbz#1689297) -- Revert "vircgroup: cleanup controllers not managed by systemd on error" (rhbz#1689297) -- util: introduce cgroup v2 files (rhbz#1689297) -- vircgroup: introduce virCgroupV2Available (rhbz#1689297) -- vircgroup: introduce virCgroupV2ValidateMachineGroup (rhbz#1689297) -- vircgroup: introduce virCgroupV2CopyMounts (rhbz#1689297) -- vircgroup: introduce virCgroupV2CopyPlacement (rhbz#1689297) -- vircgroup: introduce virCgroupV2DetectMounts (rhbz#1689297) -- vircgroup: introduce virCgroupV2DetectPlacement (rhbz#1689297) -- vircgroup: introduce virCgroupV2ValidatePlacement (rhbz#1689297) -- vircgroup: introduce virCgroupV2StealPlacement (rhbz#1689297) -- vircgroup: introduce virCgroupV2DetectControllers (rhbz#1689297) -- vircgroup: introduce virCgroupV2HasController (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetAnyController (rhbz#1689297) -- vircgroup: introduce virCgroupV2PathOfController (rhbz#1689297) -- vircgroup: introduce virCgroupV2MakeGroup (rhbz#1689297) -- vircgroup: introduce virCgroupV2Remove (rhbz#1689297) -- vircgroup: introduce virCgroupV2AddTask (rhbz#1689297) -- vircgroup: introduce virCgroupV2HasEmptyTasks (rhbz#1689297) -- vircgroup: introduce virCgroupV2BindMount (rhbz#1689297) -- vircgroup: introduce virCgroupV2SetOwner (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)BlkioWeight (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetBlkioIoServiced (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetBlkioIoDeviceServiced (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)BlkioDeviceWeight (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)BlkioDeviceReadIops (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)BlkioDeviceWriteIops (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)BlkioDeviceReadBps (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)BlkioDeviceWriteBps (rhbz#1689297) -- vircgroup: introduce virCgroupV2SetMemory (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetMemoryStat (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetMemoryUsage (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)MemoryHardLimit (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)MemorySoftLimit (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)MemSwapHardLimit (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetMemSwapUsage (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)CpuShares (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)CpuCfsPeriod (rhbz#1689297) -- vircgroup: introduce virCgroupV2(Set|Get)CpuCfsQuota (rhbz#1689297) -- vircgroup: introduce virCgroupV2SupportsCpuBW (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetCpuacctUsage (rhbz#1689297) -- vircgroup: introduce virCgroupV2GetCpuacctStat (rhbz#1689297) -- vircgroup: register cgroup v2 backend (rhbz#1689297) -- vircgroup: add support for hybrid configuration (rhbz#1689297) -- vircgroupmock: change cgroup prefix (rhbz#1689297) -- vircgroupmock: add support to test cgroup v2 (rhbz#1689297) -- vircgrouptest: introduce initFakeFS and cleanupFakeFS helpers (rhbz#1689297) -- vircgrouptest: prepare testCgroupDetectMounts for cgroup v2 (rhbz#1689297) -- vircgrouptest: add detect mounts test for cgroup v2 (rhbz#1689297) -- vircgrouptest: add detect mounts test for hybrid cgroups (rhbz#1689297) -- vircgrouptest: prepare validateCgroup for cgroupv2 (rhbz#1689297) -- vircgrouptest: add cgroup v2 tests (rhbz#1689297) -- vircgrouptest: add hybrid tests (rhbz#1689297) -- virt-host-validate: rewrite cgroup detection to use util/vircgroup (rhbz#1689297) -- virt-host-validate: require freezer for LXC (rhbz#1689297) -- virt-host-validate: Fix build on non-Linux (rhbz#1689297) -- tests: Use correct function name in error path (rhbz#1689297) -- util: Fix virCgroupGetMemoryStat (rhbz#1689297) -- tests: Augment vcgrouptest to add virCgroupGetMemoryStat (rhbz#1689297) -- vircgroup: introduce virCgroupKillRecursiveCB (rhbz#1689297) -- vircgroupv2: fix virCgroupV2ValidateMachineGroup (rhbz#1689297) -- util: implement virCgroupV2(Set|Get)CpusetMems (rhbz#1689297) -- util: implement virCgroupV2(Set|Get)CpusetMemoryMigrate (rhbz#1689297) -- util: implement virCgroupV2(Set|Get)CpusetCpus (rhbz#1689297) -- util: enable cgroups v2 cpuset controller for threads (rhbz#1689297) -- util: vircgroup: pass parent cgroup into virCgroupDetectControllersCB (rhbz#1689297) -- internal: introduce a family of NULLSTR macros (rhbz#1689297) -- util: vircgroup: improve controller detection (rhbz#1689297) -- util: vircgroupv2: use any controller to create thread directory (rhbz#1689297) -- util: vircgroupv2: enable CPU controller only if it's available (rhbz#1689297) -- util: vircgroupv2: separate return values of virCgroupV2EnableController (rhbz#1689297) -- util: vircgroupv2: don't error out if enabling controller fails (rhbz#1689297) -- util: vircgroupv2: mark only requested controllers as available (rhbz#1689297) -- Revert "util: vircgroup: pass parent cgroup into virCgroupDetectControllersCB" (rhbz#1689297) -- util: vircgroupv2: stop enabling missing controllers with systemd (rhbz#1689297) - -* Fri Jun 28 2019 Danilo de Paula - 4.5.0-28 -- Rebuild all virt packages to fix RHEL's upgrade path -- Resolves: rhbz#1695587 - (Ensure modular RPM upgrade path) - -* Fri Jun 21 2019 Jiri Denemark - 4.5.0-27 -- RHEL: spec: Disable gluster on i686 (rhbz#1722668) -- rpc: virnetlibsshsession: update deprecated functions (rhbz#1722735) - -* Thu Jun 20 2019 Jiri Denemark - 4.5.0-26 -- api: disallow virDomainSaveImageGetXMLDesc on read-only connections (CVE-2019-10161) -- api: disallow virDomainManagedSaveDefineXML on read-only connections (CVE-2019-10166) -- api: disallow virConnectGetDomainCapabilities on read-only connections (CVE-2019-10167) -- api: disallow virConnect*HypervisorCPU on read-only connections (CVE-2019-10168) - -* Fri Jun 14 2019 Jiri Denemark - 4.5.0-25 -- admin: reject clients unless their UID matches the current UID (CVE-2019-10132) -- locking: restrict sockets to mode 0600 (CVE-2019-10132) -- logging: restrict sockets to mode 0600 (CVE-2019-10132) -- util: skip RDMA detection for non-PCI network devices (rhbz#1693299) -- virfile: Detect ceph as shared FS (rhbz#1698133) -- virfile: added GPFS as shared fs (rhbz#1698133) -- util: bitmap: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC (rhbz#1716943) -- qemu: Rework setting process affinity (rhbz#1716943) -- qemu: Set up EMULATOR thread and cpuset.mems before exec()-ing qemu (rhbz#1716943) -- conf: Add definitions for 'uid' and 'fid' PCI address attributes (rhbz#1508149) -- qemu: Introduce zPCI capability (rhbz#1508149) -- qemu: Enable PCI multi bus for S390 guests (rhbz#1508149) -- conf: Introduce extension flag and zPCI member for PCI address (rhbz#1508149) -- conf: Introduce address caching for PCI extensions (rhbz#1508149) -- qemu: Auto add pci-root for s390/s390x guests (rhbz#1508149) -- conf: use virXMLFormatElement() in virDomainDeviceInfoFormat() (rhbz#1508149) -- conf: Introduce parser, formatter for uid and fid (rhbz#1508149) -- qemu: Add zPCI address definition check (rhbz#1508149) -- conf: Allocate/release 'uid' and 'fid' in PCI address (rhbz#1508149) -- qemu: Generate and use zPCI device in QEMU command line (rhbz#1508149) -- qemu: Add hotpluging support for PCI devices on S390 guests (rhbz#1508149) -- qemuDomainRemoveRNGDevice: Remove associated chardev too (rhbz#1508149) -- qemu_hotplug: remove erroneous call to qemuDomainDetachExtensionDevice() (rhbz#1508149) -- qemu_hotplug: remove another erroneous qemuDomainDetachExtensionDevice() call (rhbz#1508149) -- util: Propagate numad failures correctly (rhbz#1716907) -- util: Introduce virBitmapUnion() (rhbz#1716908) -- util: Introduce virNumaNodesetToCPUset() (rhbz#1716908) -- qemu: Fix qemuProcessInitCpuAffinity() (rhbz#1716908) -- qemu: Fix leak in qemuProcessInitCpuAffinity() (rhbz#1716908) -- qemu: Drop cleanup label from qemuProcessInitCpuAffinity() (rhbz#1716908) -- qemu: Fix NULL pointer access in qemuProcessInitCpuAffinity() (rhbz#1716908) -- qemuBuildMemoryBackendProps: Pass @priv instead of its individual members (rhbz#1624223) -- qemu: Don't use -mem-prealloc among with .prealloc=yes (rhbz#1624223) -- nwfilter: fix adding std MAC and IP values to filter binding (rhbz#1691356) -- qemuProcessBuildDestroyMemoryPathsImpl: Don't overwrite error (rhbz#1658112) -- qemu_security: Fully implement qemuSecurityDomainSetPathLabel (rhbz#1658112) -- qemu: process: SEV: Assume libDir to be the directory to create files in (rhbz#1658112) -- qemu: process: SEV: Relabel guest owner's SEV files created before start (rhbz#1658112) - -* Tue May 14 2019 Jiri Denemark - 4.5.0-24 -- tests: qemuxml2argv: add CAPS_ARCH_LATEST macro (rhbz#1698855) -- qemu: Add ccw support for vhost-vsock (rhbz#1698855) -- qemu: Allow creating ppc64 guests with graphics and no USB mouse (rhbz#1683681) -- conf: Expose virDomainSCSIDriveAddressIsUsed (rhbz#1692354) -- qemuhotplugtest: Don't plug a SCSI disk at unit 7 (rhbz#1692354) -- qemu_hotplug: Check for duplicate drive addresses (rhbz#1692354) -- cpu_map: Add support for cldemote CPU feature (rhbz#1537731) -- util: alloc: add macros for implementing automatic cleanup functionality (rhbz#1505998) -- qemu: domain: Simplify non-VFIO memLockLimit calculation for PPC64 (rhbz#1505998) -- qemu_domain: add a PPC64 memLockLimit helper (rhbz#1505998) -- qemu_domain: NVLink2 bridge detection function for PPC64 (rhbz#1505998) -- PPC64 support for NVIDIA V100 GPU with NVLink2 passthrough (rhbz#1505998) -- cpu_x86: Do not cache microcode version (CVE-2018-12127, CVE-2019-11091, CVE-2018-12126, CVE-2018-12130) -- qemu: Don't cache microcode version (CVE-2018-12127, CVE-2019-11091, CVE-2018-12126, CVE-2018-12130) -- cputest: Add data for Intel(R) Xeon(R) CPU E3-1225 v5 (CVE-2018-12127, CVE-2019-11091, CVE-2018-12126, CVE-2018-12130) -- cpu_map: Define md-clear CPUID bit (CVE-2018-12127, CVE-2019-11091, CVE-2018-12126, CVE-2018-12130) - -* Fri Feb 15 2019 Jiri Denemark - 4.5.0-23 -- network: explicitly allow icmp/icmpv6 in libvirt zonefile (rhbz#1650320) - -* Fri Feb 15 2019 Jiri Denemark - 4.5.0-22 -- util: fix memory leak in virFirewallDInterfaceSetZone() (rhbz#1650320) - -* Fri Feb 8 2019 Jiri Denemark - 4.5.0-21 -- docs: Drop /dev/net/tun from the list of shared devices (rhbz#1665400) -- qemu: conf: Remove /dev/sev from the default cgroup device acl list (rhbz#1665400) -- qemu: cgroup: Expose /dev/sev/ only to domains that require SEV (rhbz#1665400) -- qemu: domain: Add /dev/sev into the domain mount namespace selectively (rhbz#1665400) -- security: dac: Relabel /dev/sev in the namespace (rhbz#1665400) -- qemu: caps: Use CAP_DAC_OVERRIDE for probing to avoid permission issues (rhbz#1665400) -- qemu: caps: Don't try to ask for CAP_DAC_OVERRIDE if non-root (rhbz#1665400) -- Revert "RHEL: Require firewalld-filesystem for firewalld rpm macros" (rhbz#1650320) -- Revert "RHEL: network: regain guest network connectivity after firewalld switch to nftables" (rhbz#1650320) -- configure: change HAVE_FIREWALLD to WITH_FIREWALLD (rhbz#1650320) -- util: move all firewalld-specific stuff into its own files (rhbz#1650320) -- util: new virFirewallD APIs + docs (rhbz#1650320) -- configure: selectively install a firewalld 'libvirt' zone (rhbz#1650320) -- network: set firewalld zone of bridges to "libvirt" zone when appropriate (rhbz#1650320) -- network: allow configuring firewalld zone for virtual network bridge device (rhbz#1650320) -- util: remove test code accidentally committed to virFirewallDZoneExists (rhbz#1650320) -- qemu: command: Don't skip 'readonly' and throttling info for empty drive (rhbz#1670337) - -* Mon Jan 28 2019 Jiri Denemark - 4.5.0-20 -- RHEL: qemu: Fix crash trying to use iSCSI hostdev (rhbz#1669424) - -* Thu Jan 24 2019 Jiri Denemark - 4.5.0-19 -- qemu: Fix logic error in qemuSetUnprivSGIO (rhbz#1666605) -- tests: qemuxml2argv: Add test case for empty CDROM with cache mode (rhbz#1553255) -- qemu: command: Don't format image properties for empty -drive (rhbz#1553255) - -* Mon Jan 14 2019 Jiri Denemark - 4.5.0-18 -- conf: correct false boot order error during domain parse (rhbz#1630393) -- qemu: Remove duplicated qemuAgentCheckError (rhbz#1665000) -- qemu: require reply from guest agent in qemuAgentGetInterfaces (rhbz#1665000) -- qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices (rhbz#1665244) -- util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback() (rhbz#1583131) -- util: add a function to insert new interfaces to IPv6CheckForwarding list (rhbz#1583131) -- util: use nlmsg_find_attr() instead of an open-coded loop (rhbz#1583131) -- util: check accept_ra for all nexthop interfaces of multipath routes (rhbz#1583131) -- util: make forgotten changes suggested during review of commit d40b820c (rhbz#1583131) - -* Mon Jan 7 2019 Jiri Denemark - 4.5.0-17 -- virsh: Strip XML declaration when extracting CPU XMLs (rhbz#1659048) -- RHEL: qemu: Add ability to set sgio values for hostdev (rhbz#1582424) -- RHEL: qemu: Add check for unpriv sgio for SCSI generic host device (rhbz#1582424) -- qemu: Alter @val usage in qemuSetUnprivSGIO (rhbz#1656362) -- qemu: Alter qemuSetUnprivSGIO hostdev shareable logic (rhbz#1656362) - -* Mon Dec 17 2018 Jiri Denemark - 4.5.0-16 -- util: Don't overflow in virRandomBits (rhbz#1655586) -- virrandom: Avoid undefined behaviour in virRandomBits (rhbz#1655586) -- spec: remove libcgroup and cgconfig (rhbz#1602407) -- qemu: Drop duplicated code from qemuDomainDefValidateFeatures() (rhbz#1647822) -- tests: Add capabilities data for QEMU 3.1.0 on ppc64 (rhbz#1647822) -- qemu: Introduce QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV (rhbz#1647822) -- conf: Parse and format nested-hv feature (rhbz#1647822) -- qemu: Format nested-hv feature on the command line (rhbz#1647822) -- qemu: Add check for whether KVM nesting is enabled (rhbz#1645139) -- secret: Add check/validation for correct usage when LookupByUUID (rhbz#1656255) -- cpu: Add support for "stibp" x86_64 feature (rhbz#1655032) - -* Mon Dec 3 2018 Jiri Denemark - 4.5.0-15 -- virfile: Take symlink into account in virFileIsSharedFixFUSE (rhbz#1634782) -- qemu: Ignore nwfilter binding instantiation issues during reconnect (rhbz#1648544) -- qemu: Set identity for the reconnect all thread (rhbz#1648546) -- Revert "access: Modify the VIR_ERR_ACCESS_DENIED to include driverName" (rhbz#1631608) -- access: Modify the VIR_ERR_ACCESS_DENIED to include driverName (rhbz#1631608) -- qemu: add vfio-ap capability (rhbz#1508146) -- qemu: vfio-ap device support (rhbz#1508146) -- qemu: Extract MDEV VFIO PCI validation code into a separate helper (rhbz#1508146) -- conf: Move VFIO AP validation from post parse to QEMU validation code (rhbz#1508146) -- qemu: Fix post-copy migration on the source (rhbz#1649169) - -* Fri Nov 9 2018 Jiri Denemark - 4.5.0-14 -- storage: Remove secretPath from _virStorageBackendQemuImgInfo (rhbz#1645459) -- storage: Allow for inputvol to have any format for encryption (rhbz#1645459) -- storage: Allow inputvol to be encrypted (rhbz#1645459) -- access: Modify the VIR_ERR_ACCESS_DENIED to include driverName (rhbz#1631608) -- docs: Enhance polkit documentation to describe secondary connection (rhbz#1631608) -- qemu: Don't ignore resume events (rhbz#1634758, rhbz#1643338) - -* Thu Nov 1 2018 Jiri Denemark - 4.5.0-13 -- Revert "spec: Temporarily drop gluster support" (rhbz#1599339) - -* Wed Oct 17 2018 Jiri Denemark - 4.5.0-12 -- RHEL: Require firewalld-filesystem for firewalld rpm macros (rhbz#1639932) - -* Tue Oct 16 2018 Jiri Denemark - 4.5.0-11 -- virfile: fix cast-align error (rhbz#1634782) -- virfiletest: Fix test name prefix for virFileInData test (rhbz#1634782) -- virfiletst: Test virFileIsSharedFS (rhbz#1634782) -- virFileIsSharedFSType: Detect direct mount points (rhbz#1634782) -- virfile: Rework virFileIsSharedFixFUSE (rhbz#1634782) -- RHEL: network: regain guest network connectivity after firewalld switch to nftables (rhbz#1638864) - -* Mon Oct 8 2018 Jiri Denemark - 4.5.0-10 -- conf: Fix check for chardev source path (rhbz#1609723) -- tests: Reuse qemucapabilities data for qemucaps2xml (rhbz#1629862) -- tests: Add more tests to qemucaps2xml (rhbz#1629862) -- qemu: Drop QEMU_CAPS_ENABLE_KVM (rhbz#1629862) -- qemu: Avoid probing non-native binaries all the time (rhbz#1629862) -- qemu: Clarify QEMU_CAPS_KVM (rhbz#1629862) -- qemu: Don't check for /dev/kvm presence (rhbz#1629862) -- tests: Follow up on qemucaps2xmldata rename (rhbz#1629862) -- security: dac: also label listen UNIX sockets (rhbz#1634775) -- spec: Set correct TLS priority (rhbz#1632269) -- spec: Build ceph and gluster support everywhere (rhbz#1599546) -- virsh: Require explicit --domain for domxml-to-native (rhbz#1634769) -- virFileIsSharedFSType: Check for fuse.glusterfs too (rhbz#1634782) -- qemu: fix up permissions for pre-created UNIX sockets (rhbz#1634775) -- cpu_map: Add features for Icelake CPUs (rhbz#1527657, rhbz#1526625) -- cpu_map: Add Icelake CPU models (rhbz#1526625) -- qemu: Properly report VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT (rhbz#1634758) -- qemu: Report more appropriate running reasons (rhbz#1634758) -- qemu: Pass running reason to RESUME event handler (rhbz#1634758) -- qemu: Map running reason to resume event detail (rhbz#1634758) -- qemu: Avoid duplicate resume events and state changes (rhbz#1634758) -- conf: qemu: add support for Hyper-V frequency MSRs (rhbz#1589702) -- conf: qemu: add support for Hyper-V reenlightenment notifications (rhbz#1589702) -- conf: qemu: add support for Hyper-V PV TLB flush (rhbz#1589702) - -* Wed Sep 5 2018 Jiri Denemark - 4.5.0-9 -- RHEL: Fix virConnectGetMaxVcpus output (rhbz#1582222) -- storage: Add --shrink to qemu-img command when shrinking vol (rhbz#1622534) -- access: Fix nwfilter-binding ACL access API name generation (rhbz#1622540) -- conf: Add validation of input devices (rhbz#1591240) -- tests: qemu: Remove disk from graphics-vnc-tls (rhbz#1598167) -- tests: qemu: test more versions for graphics-vnc-tls (rhbz#1598167) -- qemu: vnc: switch to tls-creds-x509 (rhbz#1598167) -- qemu: mdev: Use vfio-pci 'display' property only with vfio-pci mdevs (rhbz#1624740) -- virDomainDefCompatibleDevice: Relax alias change check (rhbz#1603133) -- virDomainDetachDeviceFlags: Clarify update semantics (rhbz#1603133) -- virDomainNetDefCheckABIStability: Check for MTU change too (rhbz#1623158) -- RHEL: spec: Require python3-devel on RHEL-8 (rhbz#1518446) -- qemu: monitor: Remove qemuMonitorJSONExtractCPUArchInfo wrapper (rhbz#1598829) -- qemu: monitor: Use 'target' instead of 'arch' in reply of 'query-cpus-fast' (rhbz#1598829) - -* Tue Aug 21 2018 Jiri Denemark - 4.5.0-8 -- tests: Add missing thread_siblings_list files (rhbz#1608479) -- util: Rewrite virHostCPUCountThreadSiblings() (rhbz#1608479) -- utils: Remove arbitrary limit on socket_id/core_id (rhbz#1608479) -- tests: Add linux-high-ids test (rhbz#1608479) -- qemu: hotplug: Fix asynchronous unplug of 'shmem' (rhbz#1618680) -- tests: rename hugepages to hugepages-default (rhbz#1615461) -- tests: extract hugepages-numa-default-dimm out of hugepages-numa (rhbz#1615461) -- tests: rename hugepages-numa into hugepages-numa-default (rhbz#1615461) -- tests: remove unnecessary XML elements from hugepages-numa-default (rhbz#1615461) -- tests: extract pages-discard out of hugepages-pages (rhbz#1615461) -- tests: rename hugepages-pages into hugepages-numa-nodeset (rhbz#1615461) -- tests: rename hugepages-pages2 into hugepages-numa-default-2M (rhbz#1615461) -- tests: extract pages-discard-hugepages out of hugepages-pages3 (rhbz#1615461) -- tests: rename hugepages-pages3 into hugepages-numa-nodeset-part (rhbz#1615461) -- tests: rename hugepages-pages4 into hugepages-numa-nodeset-nonexist (rhbz#1615461) -- tests: rename hugepages-pages5 into hugepages-default-2M (rhbz#1615461) -- tests: rename hugepages-pages6 into hugepages-default-system-size (rhbz#1615461) -- tests: rename hugepages-pages7 into pages-dimm-discard (rhbz#1615461) -- tests: rename hugepages-pages8 into hugepages-nodeset-nonexist (rhbz#1615461) -- tests: introduce hugepages-default-1G-nodeset-2M (rhbz#1615461) -- tests: introduce hugepages-nodeset (rhbz#1615461) -- conf: Move hugepage XML validation check out of qemu_command (rhbz#1615461) -- conf: Move hugepages validation out of XML parser (rhbz#1615461) -- conf: Introduce virDomainDefPostParseMemtune (rhbz#1615461) -- tests: sev: Test launch-security with specific QEMU version (rhbz#1619150) -- qemu: Fix probing of AMD SEV support (rhbz#1619150) -- qemu: caps: Format SEV platform data into qemuCaps cache (rhbz#1619150) -- conf: Parse guestfwd channel device info again (rhbz#1610072) - -* Thu Aug 16 2018 Jiri Denemark - 4.5.0-7 -- qemu_migration: Avoid writing to freed memory (rhbz#1615854) - -* Thu Aug 2 2018 Jiri Denemark - 4.5.0-6 -- qemu: Exempt video model 'none' from getting a PCI address on Q35 -- conf: Fix a error msg typo in virDomainVideoDefValidate - -* Tue Jul 31 2018 Jiri Denemark - 4.5.0-5 -- esx storage: Fix typo lsilogic -> lsiLogic -- networkGetDHCPLeases: Don't always report error if unable to read leases file -- nwfilter: Resolve SEGV for NWFilter Snoop processing -- qemu: Remove unused bypassSecurityDriver from qemuOpenFileAs -- qemuDomainSaveMemory: Don't enforce dynamicOwnership -- domain_nwfilter: Return early if net has no name in virDomainConfNWFilterTeardownImpl -- examples: Add clean-traffic-gateway into nwfilters - -* Mon Jul 23 2018 Jiri Denemark - 4.5.0-4 -- qemu: hotplug: don't overwrite error message in qemuDomainAttachNetDevice -- qemu: hotplug: report error when changing rom enabled attr for net iface -- qemu: Fix setting global_period cputune element -- tests: qemucaps: Add test data for upcoming qemu 3.0.0 -- qemu: capabilities: Add capability for werror/rerror for 'usb-device' frontend -- qemu: command: Move graphics iteration to its own function -- qemu: address: Handle all the video devices within a single loop -- conf: Introduce virDomainVideoDefClear helper -- conf: Introduce virDomainDefPostParseVideo helper -- qemu: validate: Enforce compile time switch type checking for videos -- tests: Add capabilities data for QEMU 2.11 x86_64 -- tests: Update capabilities data for QEMU 3.0.0 x86_64 -- qemu: qemuBuildHostdevCommandLine: Use a helper variable mdevsrc -- qemu: caps: Introduce a capability for egl-headless -- qemu: Introduce a new graphics display type 'headless' -- qemu: caps: Add vfio-pci.display capability -- conf: Introduce virDomainGraphicsDefHasOpenGL helper -- conf: Replace 'error' with 'cleanup' in virDomainHostdevDefParseXMLSubsys -- conf: Introduce new attribute 'display' -- qemu: command: Enable formatting vfio-pci.display option onto cmdline -- docs: Rephrase the mediated devices hostdev section a bit -- conf: Introduce new video type 'none' -- virt-xml-validate: Add schema for nwfilterbinding -- tools: Fix typo generating adapter_wwpn field -- src: Fix memory leak in virNWFilterBindingDispose - -* Mon Jul 23 2018 Jiri Denemark - 4.5.0-3 -- qemu: hotplug: Do not try to add secret object for TLS if it does not exist -- qemu: monitor: Make qemuMonitorAddObject more robust against programming errors -- spec: Explicitly require matching libvirt-libs -- virDomainConfNWFilterInstantiate: initialize @xml to avoid random crash -- qemuProcessStartPRDaemonHook: Try to set NS iff domain was started with one -- qemuDomainValidateStorageSource: Relax PR validation -- virStoragePRDefFormat: Suppress path formatting for migratable XML -- qemu: Wire up PR_MANAGER_STATUS_CHANGED event -- qemu_monitor: Introduce qemuMonitorJSONGetPRManagerInfo -- qemu: Fetch pr-helper process info on reconnect -- qemu: Fix ATTRIBUTE_NONNULL for qemuMonitorAddObject -- virsh.pod: Fix a command name typo in nwfilter-binding-undefine -- docs: schema: Add missing to vsock device -- virnetdevtap: Don't crash on !ifname in virNetDevTapInterfaceStats -- tests: fix TLS handshake failure with TLS 1.3 - -* Mon Jul 9 2018 Jiri Denemark - 4.5.0-2 -- qemu: Add capability for the HTM pSeries feature -- conf: Parse and format the HTM pSeries feature -- qemu: Format the HTM pSeries feature -- qemu: hotplug: Don't access srcPriv when it's not allocated -- qemuDomainNestedJobAllowed: Allow QEMU_JOB_NONE -- src: Mention DEVICE_REMOVAL_FAILED event in virDomainDetachDeviceAlias docs -- virsh.pod: Drop --persistent for detach-device-alias -- qemu: don't use chardev FD passing with standalone args -- qemu: remove chardevStdioLogd param from vhostuser code path -- qemu: consolidate parameters of qemuBuildChrChardevStr into flags -- qemu: don't use chardev FD passing for vhostuser backend -- qemu: fix UNIX socket chardevs operating in client mode -- qemuDomainDeviceDefValidateNetwork: Check for range only if IP prefix set -- spec: Temporarily drop gluster support - -* Tue Jul 3 2018 Jiri Denemark - 4.5.0-1 -- Rebased to libvirt-4.5.0 - -* Fri May 25 2018 Jiri Denemark - 4.3.0-1 -- Rebased to libvirt-4.3.0 - -* Wed Mar 21 2018 Daniel P. Berrangé - 4.1.0-2 -- Fix systemd macro argument with line continuations (rhbz#1558648) - -* Mon Mar 5 2018 Daniel Berrange - 4.1.0-1 -- Rebase to version 4.1.0 - -* Wed Feb 07 2018 Fedora Release Engineering - 4.0.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Fri Jan 19 2018 Daniel P. Berrange - 4.0.0-1 -- Rebase to version 4.0.0 - -* Wed Dec 20 2017 Cole Robinson - 3.10.0-2 -- Rebuild for xen 4.10 - -* Tue Dec 5 2017 Daniel P. Berrange - 3.10.0-1 -- Rebase to version 3.10.0 - -* Fri Nov 3 2017 Daniel P. Berrange - 3.9.0-1 -- Rebase to version 3.9.0 - -* Wed Oct 4 2017 Daniel P. Berrange - 3.8.0-1 -- Rebase to version 3.8.0 - -* Mon Sep 4 2017 Daniel P. Berrange - 3.7.0-1 -- Rebase to version 3.7.0 - -* Wed Aug 2 2017 Daniel P. Berrange - 3.6.0-1 -- Rebase to version 3.6.0 - -* Sun Jul 30 2017 Florian Weimer - 3.5.0-4 -- Rebuild with binutils fix for ppc64le (#1475636) - -* Tue Jul 25 2017 Daniel P. Berrange - 3.5.0-3 -- Disabled RBD on i386, arm, ppc64 (rhbz #1474743) - -* Mon Jul 17 2017 Cole Robinson - 3.5.0-2 -- Rebuild for xen 4.9 - -* Thu Jul 6 2017 Daniel P. Berrange - 3.5.0-1 -- Rebase to version 3.5.0 - -* Fri Jun 2 2017 Daniel P. Berrange - 3.4.0-1 -- Rebase to version 3.4.0 - -* Mon May 8 2017 Daniel P. Berrange - 3.3.0-1 -- Rebase to version 3.3.0 - -* Mon Apr 3 2017 Daniel P. Berrange - 3.2.0-1 -- Rebase to version 3.2.0 - -* Fri Mar 3 2017 Daniel P. Berrange - 3.1.0-1 -- Rebase to version 3.1.0 - -* Fri Feb 10 2017 Fedora Release Engineering - 3.0.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 19 2017 Daniel P. Berrange - 3.0.0-1 -- Rebase to version 3.0.0 diff --git a/libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch b/libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch new file mode 100644 index 0000000..a630ae1 --- /dev/null +++ b/libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch @@ -0,0 +1,124 @@ +From 53b691e4d85f8a442f14ecf4b3bf0b17d607fb2b Mon Sep 17 00:00:00 2001 +Message-ID: <53b691e4d85f8a442f14ecf4b3bf0b17d607fb2b.1720800605.git.jdenemar@redhat.com> +From: Jiri Denemark +Date: Thu, 11 Jul 2024 13:49:09 +0200 +Subject: [PATCH] qemu: Don't leave beingDestroyed=true on inactive domain + +Recent commit v10.4.0-87-gd9935a5c4f made a reasonable change to only +reset beingDestroyed back to false when vm->def->id is reset to make +sure other code can detect a domain is (about to become) inactive. It +even added a comment saying any caller of qemuProcessBeginStopJob is +supposed to call qemuProcessStop to clear beingDestroyed. But not every +caller really does so because they first call qemuProcessBeginStopJob +and then check whether a domain is still running. If not the +qemuProcessStop call is skipped leaving beingDestroyed=true. In case of +a persistent domain this may block incoming migrations of such domain as +the migration code would think the domain died unexpectedly (even though +it's still running). + +The qemuProcessBeginStopJob function is a wrapper around +virDomainObjBeginJob, but virDomainObjEndJob was used directly for +cleanup. This patch introduces a new qemuProcessEndStopJob wrapper +around virDomainObjEndJob to properly undo everything +qemuProcessBeginStopJob did. + +https://issues.redhat.com/browse/RHEL-43309 + +Signed-off-by: Jiri Denemark +Reviewed-by: Peter Krempa +(cherry picked from commit bec903cae84c21850d47a1b4d3ab57ca81189519) +Signed-off-by: Jiri Denemark +--- + src/qemu/qemu_driver.c | 4 ++-- + src/qemu/qemu_process.c | 20 ++++++++++++++++---- + src/qemu/qemu_process.h | 1 + + 3 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c +index fc1704f4fc..d9073b2154 100644 +--- a/src/qemu/qemu_driver.c ++++ b/src/qemu/qemu_driver.c +@@ -2115,7 +2115,7 @@ qemuDomainDestroyFlags(virDomainPtr dom, + endjob: + if (ret == 0) + qemuDomainRemoveInactive(driver, vm, 0, false); +- virDomainObjEndJob(vm); ++ qemuProcessEndStopJob(vm); + + cleanup: + virDomainObjEndAPI(&vm); +@@ -3901,7 +3901,7 @@ processMonitorEOFEvent(virQEMUDriver *driver, + + endjob: + qemuDomainRemoveInactive(driver, vm, 0, false); +- virDomainObjEndJob(vm); ++ qemuProcessEndStopJob(vm); + } + + +diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c +index b9b6ccf1de..bea42d38c6 100644 +--- a/src/qemu/qemu_process.c ++++ b/src/qemu/qemu_process.c +@@ -8422,7 +8422,8 @@ qemuProcessKill(virDomainObj *vm, unsigned int flags) + * qemuProcessBeginStopJob: + * + * Stop all current jobs by killing the domain and start a new one for +- * qemuProcessStop. ++ * qemuProcessStop. The caller has to make sure qemuProcessEndStopJob is ++ * called to properly cleanup the job. + */ + int + qemuProcessBeginStopJob(virDomainObj *vm, +@@ -8449,8 +8450,9 @@ qemuProcessBeginStopJob(virDomainObj *vm, + goto error; + + /* priv->beingDestroyed is deliberately left set to 'true' here. Caller +- * is supposed to call qemuProcessStop, which will reset it after +- * 'vm->def->id' is set to -1 */ ++ * is supposed to call qemuProcessStop (which will reset it after ++ * 'vm->def->id' is set to -1) and/or qemuProcessEndStopJob to do proper ++ * cleanup. */ + return 0; + + error: +@@ -8459,6 +8461,16 @@ qemuProcessBeginStopJob(virDomainObj *vm, + } + + ++void ++qemuProcessEndStopJob(virDomainObj *vm) ++{ ++ if (!virDomainObjIsActive(vm)) ++ QEMU_DOMAIN_PRIVATE(vm)->beingDestroyed = false; ++ ++ virDomainObjEndJob(vm); ++} ++ ++ + void qemuProcessStop(virQEMUDriver *driver, + virDomainObj *vm, + virDomainShutoffReason reason, +@@ -8801,7 +8813,7 @@ qemuProcessAutoDestroy(virDomainObj *dom, + + qemuDomainRemoveInactive(driver, dom, 0, false); + +- virDomainObjEndJob(dom); ++ qemuProcessEndStopJob(dom); + + virObjectEventStateQueue(driver->domainEventState, event); + } +diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h +index c1ea949215..cb67bfcd2d 100644 +--- a/src/qemu/qemu_process.h ++++ b/src/qemu/qemu_process.h +@@ -169,6 +169,7 @@ typedef enum { + int qemuProcessBeginStopJob(virDomainObj *vm, + virDomainJob job, + bool forceKill); ++void qemuProcessEndStopJob(virDomainObj *vm); + void qemuProcessStop(virQEMUDriver *driver, + virDomainObj *vm, + virDomainShutoffReason reason, +-- +2.45.2 diff --git a/libvirt-qemu-do-not-use-deprecated-options-for-new-virtiofsd.patch b/libvirt-qemu-do-not-use-deprecated-options-for-new-virtiofsd.patch new file mode 100644 index 0000000..269e75f --- /dev/null +++ b/libvirt-qemu-do-not-use-deprecated-options-for-new-virtiofsd.patch @@ -0,0 +1,128 @@ +From c30b3dd904c094c478c5b362de6b3580379edd8b Mon Sep 17 00:00:00 2001 +Message-ID: +From: =?UTF-8?q?J=C3=A1n=20Tomko?= +Date: Thu, 4 Jul 2024 15:54:29 +0200 +Subject: [PATCH] qemu: do not use deprecated options for new virtiofsd +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use the to-be-introduced virtiofsd capability to mark whether +new options are safe to use. + +Depends on: +https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/231 + +https://issues.redhat.com/browse/RHEL-7108 + +Signed-off-by: Ján Tomko +Reviewed-by: Michal Privoznik +(cherry picked from commit 8dc04cafecd2432c071c73366e4c6eb3b7bff495) + +https://issues.redhat.com/browse/RHEL-7108 + +Signed-off-by: Ján Tomko +--- + src/qemu/qemu_virtiofs.c | 83 +++++++++++++++++++++++++++------------- + 1 file changed, 57 insertions(+), 26 deletions(-) + +diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c +index 0df8d67b1b..0e3c7dbb58 100644 +--- a/src/qemu/qemu_virtiofs.c ++++ b/src/qemu/qemu_virtiofs.c +@@ -139,36 +139,67 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg, + virCommandPassFD(cmd, *fd, VIR_COMMAND_PASS_FD_CLOSE_PARENT); + *fd = -1; + +- virCommandAddArg(cmd, "-o"); +- virBufferAddLit(&opts, "source="); +- virQEMUBuildBufferEscapeComma(&opts, fs->src->path); +- if (fs->cache) +- virBufferAsprintf(&opts, ",cache=%s", virDomainFSCacheModeTypeToString(fs->cache)); +- if (fs->sandbox) +- virBufferAsprintf(&opts, ",sandbox=%s", virDomainFSSandboxModeTypeToString(fs->sandbox)); +- +- if (fs->xattr == VIR_TRISTATE_SWITCH_ON) +- virBufferAddLit(&opts, ",xattr"); +- else if (fs->xattr == VIR_TRISTATE_SWITCH_OFF) +- virBufferAddLit(&opts, ",no_xattr"); +- +- if (fs->flock == VIR_TRISTATE_SWITCH_ON) +- virBufferAddLit(&opts, ",flock"); +- else if (fs->flock == VIR_TRISTATE_SWITCH_OFF) +- virBufferAddLit(&opts, ",no_flock"); +- +- if (fs->posix_lock == VIR_TRISTATE_SWITCH_ON) +- virBufferAddLit(&opts, ",posix_lock"); +- else if (fs->posix_lock == VIR_TRISTATE_SWITCH_OFF) +- virBufferAddLit(&opts, ",no_posix_lock"); +- +- virCommandAddArgBuffer(cmd, &opts); ++ if (virBitmapIsBitSet(fs->caps, QEMU_VHOST_USER_FS_FEATURE_SEPARATE_OPTIONS)) { ++ /* Note that this option format is used by the Rust version of the daemon ++ * since v1.0.0, which is way longer than the capability existed. ++ * The -o style of options can be removed once we bump the minimal ++ * QEMU version to 8.0.0, which dropped the C virtiofsd daemon */ ++ virCommandAddArg(cmd, "--shared-dir"); ++ virCommandAddArg(cmd, fs->src->path); ++ ++ if (fs->cache) { ++ virCommandAddArg(cmd, "--cache"); ++ virCommandAddArg(cmd, virDomainFSCacheModeTypeToString(fs->cache)); ++ } ++ if (fs->sandbox) { ++ virCommandAddArg(cmd, "--sandbox"); ++ virCommandAddArg(cmd, virDomainFSSandboxModeTypeToString(fs->sandbox)); ++ } ++ ++ if (fs->xattr == VIR_TRISTATE_SWITCH_ON) ++ virCommandAddArg(cmd, "--xattr"); ++ ++ if (fs->posix_lock != VIR_TRISTATE_SWITCH_ABSENT || ++ fs->flock != VIR_TRISTATE_SWITCH_ABSENT) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("locking options are not supported by this virtiofsd")); ++ return NULL; ++ } ++ } else { ++ virCommandAddArg(cmd, "-o"); ++ virBufferAddLit(&opts, "source="); ++ virQEMUBuildBufferEscapeComma(&opts, fs->src->path); ++ if (fs->cache) ++ virBufferAsprintf(&opts, ",cache=%s", virDomainFSCacheModeTypeToString(fs->cache)); ++ if (fs->sandbox) ++ virBufferAsprintf(&opts, ",sandbox=%s", virDomainFSSandboxModeTypeToString(fs->sandbox)); ++ ++ if (fs->xattr == VIR_TRISTATE_SWITCH_ON) ++ virBufferAddLit(&opts, ",xattr"); ++ else if (fs->xattr == VIR_TRISTATE_SWITCH_OFF) ++ virBufferAddLit(&opts, ",no_xattr"); ++ ++ if (fs->flock == VIR_TRISTATE_SWITCH_ON) ++ virBufferAddLit(&opts, ",flock"); ++ else if (fs->flock == VIR_TRISTATE_SWITCH_OFF) ++ virBufferAddLit(&opts, ",no_flock"); ++ ++ if (fs->posix_lock == VIR_TRISTATE_SWITCH_ON) ++ virBufferAddLit(&opts, ",posix_lock"); ++ else if (fs->posix_lock == VIR_TRISTATE_SWITCH_OFF) ++ virBufferAddLit(&opts, ",no_posix_lock"); ++ ++ virCommandAddArgBuffer(cmd, &opts); ++ } + + if (fs->thread_pool_size >= 0) + virCommandAddArgFormat(cmd, "--thread-pool-size=%i", fs->thread_pool_size); + +- if (cfg->virtiofsdDebug) +- virCommandAddArg(cmd, "-d"); ++ if (cfg->virtiofsdDebug) { ++ if (virBitmapIsBitSet(fs->caps, QEMU_VHOST_USER_FS_FEATURE_SEPARATE_OPTIONS)) ++ virCommandAddArgList(cmd, "--log-level", "debug", NULL); ++ else ++ virCommandAddArg(cmd, "-d"); ++ } + + for (i = 0; i < fs->idmap.nuidmap; i++) { + virCommandAddArgFormat(cmd, "--uid-map=:%u:%u:%u:", +-- +2.45.2 diff --git a/libvirt-qemu-fill-capabilities-for-virtiofsd.patch b/libvirt-qemu-fill-capabilities-for-virtiofsd.patch new file mode 100644 index 0000000..915c1ab --- /dev/null +++ b/libvirt-qemu-fill-capabilities-for-virtiofsd.patch @@ -0,0 +1,208 @@ +From 26c0a729f2ae6dcd932a42bd437fc76da9e6b2cc Mon Sep 17 00:00:00 2001 +Message-ID: <26c0a729f2ae6dcd932a42bd437fc76da9e6b2cc.1720800605.git.jdenemar@redhat.com> +From: =?UTF-8?q?J=C3=A1n=20Tomko?= +Date: Thu, 4 Jul 2024 15:54:28 +0200 +Subject: [PATCH] qemu: fill capabilities for virtiofsd +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Run the daemon with --print-capabilities first, to see what it supports. + +Signed-off-by: Ján Tomko +Reviewed-by: Michal Privoznik +(cherry picked from commit 730eaafaace6b9202f9f694b732196299a0baec2) + +https://issues.redhat.com/browse/RHEL-7108 +https://issues.redhat.com/browse/RHEL-40135 + +Signed-off-by: Ján Tomko +--- + src/conf/domain_conf.c | 1 + + src/conf/domain_conf.h | 1 + + src/qemu/qemu_vhost_user.c | 58 +++++++++++++++++++ + src/qemu/qemu_vhost_user.h | 11 ++++ + src/qemu/qemu_virtiofs.c | 9 ++- + .../qemu/vhost-user/50-qemu-virtiofsd.json | 2 +- + tests/qemuxmlconftest.c | 2 + + 7 files changed, 81 insertions(+), 3 deletions(-) + +diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c +index 8a3c63b1fc..1523341b34 100644 +--- a/src/conf/domain_conf.c ++++ b/src/conf/domain_conf.c +@@ -2600,6 +2600,7 @@ void virDomainFSDefFree(virDomainFSDef *def) + g_free(def->sock); + g_free(def->idmap.uidmap); + g_free(def->idmap.gidmap); ++ virBitmapFree(def->caps); + + g_free(def); + } +diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h +index 2818a9f1f5..b3a0d26cde 100644 +--- a/src/conf/domain_conf.h ++++ b/src/conf/domain_conf.h +@@ -899,6 +899,7 @@ struct _virDomainFSDef { + virDomainIdMapDef idmap; + virDomainVirtioOptions *virtio; + virObject *privateData; ++ virBitmap *caps; + }; + + +diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c +index 0294daab80..de3ef640a3 100644 +--- a/src/qemu/qemu_vhost_user.c ++++ b/src/qemu/qemu_vhost_user.c +@@ -22,6 +22,7 @@ + + #include "qemu_vhost_user.h" + #include "qemu_interop_config.h" ++#include "virbitmap.h" + #include "virjson.h" + #include "virlog.h" + #include "viralloc.h" +@@ -90,6 +91,12 @@ VIR_ENUM_IMPL(qemuVhostUserGPUFeature, + "render-node", + ); + ++VIR_ENUM_IMPL(qemuVhostUserFSFeature, ++ QEMU_VHOST_USER_FS_FEATURE_LAST, ++ "migrate-precopy", ++ "separate-options", ++); ++ + typedef struct _qemuVhostUserGPU qemuVhostUserGPU; + struct _qemuVhostUserGPU { + size_t nfeatures; +@@ -414,6 +421,52 @@ qemuVhostUserFillDomainGPU(virQEMUDriver *driver, + return ret; + } + ++int ++qemuVhostUserFillFSCapabilities(virBitmap **caps, ++ const char *binary) ++{ ++ g_autoptr(virJSONValue) doc = NULL; ++ g_autofree char *output = NULL; ++ g_autoptr(virCommand) cmd = NULL; ++ virJSONValue *featuresJSON; ++ size_t nfeatures; ++ size_t i; ++ g_autoptr(virBitmap) features = NULL; ++ ++ cmd = virCommandNewArgList(binary, "--print-capabilities", NULL); ++ virCommandSetOutputBuffer(cmd, &output); ++ if (virCommandRun(cmd, NULL) < 0) ++ return -2; ++ ++ if (!(doc = virJSONValueFromString(output))) { ++ virReportError(VIR_ERR_INTERNAL_ERROR, ++ _("unable to parse json capabilities '%1$s'"), ++ binary); ++ return -1; ++ } ++ ++ /* Older virtiofsd did not print any features */ ++ if (!(featuresJSON = virJSONValueObjectGetArray(doc, "features"))) ++ return 0; ++ ++ features = virBitmapNew(0); ++ nfeatures = virJSONValueArraySize(featuresJSON); ++ ++ for (i = 0; i < nfeatures; i++) { ++ virJSONValue *item = virJSONValueArrayGet(featuresJSON, i); ++ const char *tmpStr = virJSONValueGetString(item); ++ int tmp; ++ ++ if ((tmp = qemuVhostUserFSFeatureTypeFromString(tmpStr)) < 0) { ++ VIR_DEBUG("ignoring unknown virtiofs feature '%s'", tmpStr); ++ continue; ++ } ++ virBitmapSetBitExpand(features, tmp); ++ } ++ ++ *caps = g_steal_pointer(&features); ++ return 0; ++} + + int + qemuVhostUserFillDomainFS(virQEMUDriver *driver, +@@ -435,6 +488,11 @@ qemuVhostUserFillDomainFS(virQEMUDriver *driver, + continue; + + fs->binary = g_strdup(vu->binary); ++ ++ /* skip binaries that can't report their capabilities */ ++ if (qemuVhostUserFillFSCapabilities(&fs->caps, ++ vu->binary) == -1) ++ continue; + break; + } + +diff --git a/src/qemu/qemu_vhost_user.h b/src/qemu/qemu_vhost_user.h +index d1aa6ca189..c39fbfebe8 100644 +--- a/src/qemu/qemu_vhost_user.h ++++ b/src/qemu/qemu_vhost_user.h +@@ -46,3 +46,14 @@ qemuVhostUserFillDomainGPU(virQEMUDriver *driver, + int + qemuVhostUserFillDomainFS(virQEMUDriver *driver, + virDomainFSDef *fs); ++ ++int ++qemuVhostUserFillFSCapabilities(virBitmap **caps, ++ const char *binary); ++typedef enum { ++ QEMU_VHOST_USER_FS_FEATURE_MIGRATE_PRECOPY = 0, ++ QEMU_VHOST_USER_FS_FEATURE_SEPARATE_OPTIONS, ++ QEMU_VHOST_USER_FS_FEATURE_LAST ++} qemuVhostUserFSFeature; ++ ++VIR_ENUM_DECL(qemuVhostUserFSFeature); +diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c +index 78897d8177..0df8d67b1b 100644 +--- a/src/qemu/qemu_virtiofs.c ++++ b/src/qemu/qemu_virtiofs.c +@@ -446,8 +446,13 @@ qemuVirtioFSPrepareDomain(virQEMUDriver *driver, + if (fs->sock) + return 0; + +- if (!fs->binary && qemuVhostUserFillDomainFS(driver, fs) < 0) +- return -1; ++ if (fs->binary) { ++ if (qemuVhostUserFillFSCapabilities(&fs->caps, fs->binary) < 0) ++ return -1; ++ } else { ++ if (qemuVhostUserFillDomainFS(driver, fs) < 0) ++ return -1; ++ } + + if (!driver->privileged && !fs->idmap.uidmap) { + if (qemuVirtioFSPrepareIdMap(fs) < 0) +diff --git a/tests/qemuvhostuserdata/usr/share/qemu/vhost-user/50-qemu-virtiofsd.json b/tests/qemuvhostuserdata/usr/share/qemu/vhost-user/50-qemu-virtiofsd.json +index b908bc6b30..5cf2c986f8 100644 +--- a/tests/qemuvhostuserdata/usr/share/qemu/vhost-user/50-qemu-virtiofsd.json ++++ b/tests/qemuvhostuserdata/usr/share/qemu/vhost-user/50-qemu-virtiofsd.json +@@ -1,5 +1,5 @@ + { + "description": "virtiofsd vhost-user-fs", + "type": "fs", +- "binary": "/usr/libexec/qemu/vhost-user/test-vhost-user-gpu" ++ "binary": "/usr/libexec/qemu/vhost-user/test-virtiofsd" + } +diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c +index 8e0d47c6fd..a3a399e16c 100644 +--- a/tests/qemuxmlconftest.c ++++ b/tests/qemuxmlconftest.c +@@ -1079,6 +1079,8 @@ mymain(void) + + virFileWrapperAddPrefix("/usr/libexec/qemu/vhost-user", + abs_srcdir "/qemuvhostuserdata/usr/libexec/qemu/vhost-user"); ++ virFileWrapperAddPrefix("/usr/libexec/virtiofsd", ++ abs_srcdir "/qemuvhostuserdata/usr/libexec/qemu/vhost-user/test-virtiofsd"); + + if (!(conn = virGetConnect())) + return EXIT_FAILURE; +-- +2.45.2 diff --git a/libvirt-qemu-migration-allow-migration-for-virtiofs.patch b/libvirt-qemu-migration-allow-migration-for-virtiofs.patch new file mode 100644 index 0000000..d54da10 --- /dev/null +++ b/libvirt-qemu-migration-allow-migration-for-virtiofs.patch @@ -0,0 +1,52 @@ +From 5f73e98cc870b13a053fd99d4d2707fed50e57d0 Mon Sep 17 00:00:00 2001 +Message-ID: <5f73e98cc870b13a053fd99d4d2707fed50e57d0.1720800605.git.jdenemar@redhat.com> +From: =?UTF-8?q?J=C3=A1n=20Tomko?= +Date: Thu, 4 Jul 2024 15:54:30 +0200 +Subject: [PATCH] qemu: migration: allow migration for virtiofs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Allow migration if the "migrate-precopy" capability is present or +libvirt is not the one running the virtiofs daemon. + +Signed-off-by: Ján Tomko +Reviewed-by: Michal Privoznik +(cherry picked from commit d94b31a68ab94f27f8a1d6d216817b49881c38ae) + +https://issues.redhat.com/browse/RHEL-40135 + +Signed-off-by: Ján Tomko +--- + src/qemu/qemu_migration.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c +index 26c082fc08..4fd7a0aafb 100644 +--- a/src/qemu/qemu_migration.c ++++ b/src/qemu/qemu_migration.c +@@ -39,6 +39,7 @@ + #include "qemu_slirp.h" + #include "qemu_block.h" + #include "qemu_tpm.h" ++#include "qemu_vhost_user.h" + + #include "domain_audit.h" + #include "virlog.h" +@@ -1576,8 +1577,12 @@ qemuMigrationSrcIsAllowed(virDomainObj *vm, + virDomainFSDef *fs = vm->def->fss[i]; + + if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS) { +- virReportError(VIR_ERR_OPERATION_INVALID, "%s", +- _("migration with virtiofs device is not supported")); ++ if (fs->sock || ++ virBitmapIsBitSet(fs->caps, QEMU_VHOST_USER_FS_FEATURE_MIGRATE_PRECOPY)) ++ continue; ++ ++ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", ++ _("migration with this virtiofs device is not supported")); + return false; + } + } +-- +2.45.2 diff --git a/libvirt-qemu-virtiofs-cache-use-never-instead-of-none.patch b/libvirt-qemu-virtiofs-cache-use-never-instead-of-none.patch new file mode 100644 index 0000000..ef29da5 --- /dev/null +++ b/libvirt-qemu-virtiofs-cache-use-never-instead-of-none.patch @@ -0,0 +1,49 @@ +From d7285cb688e4f6b61dd842be7d0a2e773ad7d21b Mon Sep 17 00:00:00 2001 +Message-ID: +From: =?UTF-8?q?J=C3=A1n=20Tomko?= +Date: Tue, 23 Jul 2024 14:14:13 +0200 +Subject: [PATCH] qemu: virtiofs: cache: use 'never' instead of 'none' +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The new option style renamed one of the cache modes. + +https://issues.redhat.com/browse/RHEL-50329 + +Signed-off-by: Ján Tomko +Reviewed-by: Michal Privoznik +(cherry picked from commit 8d3b2397372111d15d6b79138c5c5a80203f85f5) +Signed-off-by: Ján Tomko +--- + src/qemu/qemu_virtiofs.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c +index 0e3c7dbb58..c7be2766a2 100644 +--- a/src/qemu/qemu_virtiofs.c ++++ b/src/qemu/qemu_virtiofs.c +@@ -147,10 +147,20 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg, + virCommandAddArg(cmd, "--shared-dir"); + virCommandAddArg(cmd, fs->src->path); + +- if (fs->cache) { ++ switch (fs->cache) { ++ case VIR_DOMAIN_FS_CACHE_MODE_DEFAULT: ++ case VIR_DOMAIN_FS_CACHE_MODE_LAST: ++ break; ++ case VIR_DOMAIN_FS_CACHE_MODE_NONE: ++ virCommandAddArg(cmd, "--cache"); ++ virCommandAddArg(cmd, "never"); ++ break; ++ case VIR_DOMAIN_FS_CACHE_MODE_ALWAYS: + virCommandAddArg(cmd, "--cache"); + virCommandAddArg(cmd, virDomainFSCacheModeTypeToString(fs->cache)); ++ break; + } ++ + if (fs->sandbox) { + virCommandAddArg(cmd, "--sandbox"); + virCommandAddArg(cmd, virDomainFSSandboxModeTypeToString(fs->sandbox)); +-- +2.46.0 diff --git a/libvirt-qemu_domain-Strip-acpi-from-s390-x-definitions.patch b/libvirt-qemu_domain-Strip-acpi-from-s390-x-definitions.patch new file mode 100644 index 0000000..9666ca8 --- /dev/null +++ b/libvirt-qemu_domain-Strip-acpi-from-s390-x-definitions.patch @@ -0,0 +1,105 @@ +From f34372c108e5b4f1e37c333a7ff2c50faa9f534e Mon Sep 17 00:00:00 2001 +Message-ID: +From: Peter Krempa +Date: Wed, 31 Jul 2024 11:34:59 +0200 +Subject: [PATCH] qemu_domain: Strip from s390(x) definitions + +The s390(x) machines never supported ACPI. That didn't stop users +enabling ACPI in their config. As of libvirt-9.2 (98c4e3d073) with new +enough qemu we reject configs which require ACPI, but qemu can't satisfy +it. + +This breaks migration of existing VMs with the old wrong configs to new +libvirt installations. + +To address this introduce a post-parse fixup removing the ACPI flag +specifically for s390 machines which do enable it in the definition. + +The advantage of doing it in post-parse, rather than simply relaxing the +ABI stability check to allow users providing an fixed XML when migrating +(allowing change of the ACPI flag for s390 in ABI stability check, as it + doesn't impact ABI), is that only the destination installation needs to +be patched in order to preserve migration. + +To mitigate the disadvantage of simply stripping it from all s390(x) +configs the hack is not applied when defining or starting a new domain +from the XML, to preserve the error about unsupported configuration. + +Resolves: https://issues.redhat.com/browse/RHEL-49516 +Signed-off-by: Peter Krempa +Reviewed-by: Andrea Bolognani +Reviewed-by: Boris Fiuczynski +(cherry picked from commit 4ba4f659e42a30c3fa8ece414616a23a992acfaa) +--- + src/qemu/qemu_domain.c | 49 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 49 insertions(+) + +diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c +index 1a90311ca5..1bafe3708a 100644 +--- a/src/qemu/qemu_domain.c ++++ b/src/qemu/qemu_domain.c +@@ -5013,6 +5013,53 @@ qemuDomainDefPostParseBasic(virDomainDef *def, + } + + ++/** ++ * qemuDomainDefACPIPostParse: ++ * @def: domain definition ++ * @qemuCaps: qemu capabilities object ++ * ++ * Fixup the use of ACPI flag on certain architectures that never supported it ++ * and users for some reason used it, which would break migration to newer ++ * libvirt versions which check whether given machine type supports ACPI. ++ * ++ * The fixup is done in post-parse as it's hard to update the ABI stability ++ * check on source of the migration. ++ */ ++static void ++qemuDomainDefACPIPostParse(virDomainDef *def, ++ virQEMUCaps *qemuCaps, ++ unsigned int parseFlags) ++{ ++ /* Only cases when ACPI is enabled need to be fixed up */ ++ if (def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) ++ return; ++ ++ /* Strip the feature only for non-fresh configs, in order to still ++ * produce an error if the feature is present in a newly defined one. ++ * ++ * The use of the VIR_DOMAIN_DEF_PARSE_ABI_UPDATE looks counter-intuitive, ++ * but it's used only in qemuDomainCreateXML/qemuDomainDefineXMLFlags APIs ++ * */ ++ if (parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE) ++ return; ++ ++ /* This fixup is applicable _only_ on architectures which were present as of ++ * libvirt-9.2 and *never* supported ACPI. The fixup is currently done only ++ * for existing users of s390(x) to fix migration for configs which had ++ * despite being ignored. ++ */ ++ if (def->os.arch != VIR_ARCH_S390 && ++ def->os.arch != VIR_ARCH_S390X) ++ return; ++ ++ /* To be sure, we only strip ACPI if given machine type doesn't support it */ ++ if (virQEMUCapsMachineSupportsACPI(qemuCaps, def->virtType, def->os.machine) != VIR_TRISTATE_BOOL_NO) ++ return; ++ ++ def->features[VIR_DOMAIN_FEATURE_ACPI] = VIR_TRISTATE_SWITCH_ABSENT; ++} ++ ++ + static int + qemuDomainDefPostParse(virDomainDef *def, + unsigned int parseFlags, +@@ -5033,6 +5080,8 @@ qemuDomainDefPostParse(virDomainDef *def, + if (qemuDomainDefMachinePostParse(def, qemuCaps) < 0) + return -1; + ++ qemuDomainDefACPIPostParse(def, qemuCaps, parseFlags); ++ + if (qemuDomainDefBootPostParse(def, driver, parseFlags) < 0) + return -1; + +-- +2.46.0 diff --git a/libvirt-qemuxmlconftest-Add-tests-for-the-ACPI-stripping-hack-on-s390.patch b/libvirt-qemuxmlconftest-Add-tests-for-the-ACPI-stripping-hack-on-s390.patch new file mode 100644 index 0000000..46a1466 --- /dev/null +++ b/libvirt-qemuxmlconftest-Add-tests-for-the-ACPI-stripping-hack-on-s390.patch @@ -0,0 +1,435 @@ +From 94915522e99b56933fd792dfd801f70a188f3534 Mon Sep 17 00:00:00 2001 +Message-ID: <94915522e99b56933fd792dfd801f70a188f3534.1723213495.git.jdenemar@redhat.com> +From: Peter Krempa +Date: Wed, 31 Jul 2024 12:38:23 +0200 +Subject: [PATCH] qemuxmlconftest: Add tests for the ACPI stripping hack on + s390 + +Replace the 'misc-acpi' case by testing a bunch of architectures for how +ACPI is handled including a test for the s390 ACPI strip hack added in +previous commit. + +The input files are adapted from the corresponding '-minimal.xml' files. + +Signed-off-by: Peter Krempa +Reviewed-by: Andrea Bolognani +Reviewed-by: Boris Fiuczynski +(cherry picked from commit 432e442ca8eeb4ed8c0dcc3a3c7d723f85b38c40) +https://issues.redhat.com/browse/RHEL-49516 +--- + .../aarch64-noacpi-acpi.aarch64-latest.err | 1 + + tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml | 18 ++++++++ + .../misc-acpi.x86_64-latest.args | 34 --------------- + .../misc-acpi.x86_64-latest.xml | 41 ------------------- + tests/qemuxmlconfdata/misc-acpi.xml | 33 --------------- + .../riscv64-virt-acpi.riscv64-latest.args | 33 +++++++++++++++ + .../riscv64-virt-acpi.riscv64-latest.xml | 36 ++++++++++++++++ + tests/qemuxmlconfdata/riscv64-virt-acpi.xml | 15 +++++++ + ...s390x-ccw-acpi.s390x-latest.abi-update.err | 1 + + .../s390x-ccw-acpi.s390x-latest.args | 32 +++++++++++++++ + .../s390x-ccw-acpi.s390x-latest.xml | 27 ++++++++++++ + tests/qemuxmlconfdata/s390x-ccw-acpi.xml | 15 +++++++ + tests/qemuxmlconftest.c | 18 +++++++- + 13 files changed, 195 insertions(+), 109 deletions(-) + create mode 100644 tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err + create mode 100644 tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml + delete mode 100644 tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args + delete mode 100644 tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml + delete mode 100644 tests/qemuxmlconfdata/misc-acpi.xml + create mode 100644 tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.args + create mode 100644 tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.xml + create mode 100644 tests/qemuxmlconfdata/riscv64-virt-acpi.xml + create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.abi-update.err + create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.args + create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.xml + create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.xml + +diff --git a/tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err +new file mode 100644 +index 0000000000..5f379d56ce +--- /dev/null ++++ b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err +@@ -0,0 +1 @@ ++unsupported configuration: machine type 'borzoi' does not support ACPI +diff --git a/tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml +new file mode 100644 +index 0000000000..10dbeabd6d +--- /dev/null ++++ b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml +@@ -0,0 +1,18 @@ ++ ++ aarch64test ++ 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f ++ 1048576 ++ 1 ++ ++ ++ hvm ++ ++ ++ ++ ++ ++ ++ /usr/bin/qemu-system-aarch64 ++ ++ ++ +diff --git a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args b/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args +deleted file mode 100644 +index c4e09c0af2..0000000000 +--- a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args ++++ /dev/null +@@ -1,34 +0,0 @@ +-LC_ALL=C \ +-PATH=/bin \ +-HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +-USER=test \ +-LOGNAME=test \ +-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +-/usr/bin/qemu-system-x86_64 \ +--name guest=QEMUGuest1,debug-threads=on \ +--S \ +--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +--machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \ +--accel tcg \ +--cpu qemu64 \ +--m size=219136k \ +--object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +--overcommit mem-lock=off \ +--smp 1,sockets=1,cores=1,threads=1 \ +--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +--display none \ +--no-user-config \ +--nodefaults \ +--chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +--mon chardev=charmonitor,id=monitor,mode=control \ +--rtc base=utc \ +--no-shutdown \ +--boot strict=on \ +--device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +--blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \ +--device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \ +--audiodev '{"id":"audio1","driver":"none"}' \ +--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +--msg timestamp=on +diff --git a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml b/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml +deleted file mode 100644 +index 176926bb60..0000000000 +--- a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml ++++ /dev/null +@@ -1,41 +0,0 @@ +- +- QEMUGuest1 +- c7a5fdbd-edaf-9455-926a-d65c16db1809 +- 219136 +- 219136 +- 1 +- +- hvm +- +- +- +- +- +- +- qemu64 +- +- +- destroy +- restart +- destroy +- +- /usr/bin/qemu-system-x86_64 +- +- +- +- +-
+- +- +-
+- +- +-
+- +- +- +- +-