From 6fe456789bfbd18dfc56e75f2343dd272b2f2f90 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 27 Oct 2021 22:32:57 +0000 Subject: [PATCH] import libvirt-7.8.0-1.module+el8.6.0+12978+7d7a0321 --- .gitignore | 2 +- .libvirt.metadata | 2 +- ...e-types-to-qemuDomainMachineNeedsFDC.patch | 31 ++- ...EL-Enable-usage-of-x-blockdev-reopen.patch | 76 +++--- ...HEL-Fix-virConnectGetMaxVcpus-output.patch | 8 +- ...round-changed-Broadwell-Haswell-CPUs.patch | 54 ++-- ...ility-to-set-sgio-values-for-hostdev.patch | 6 +- ...iv-sgio-for-SCSI-generic-host-device.patch | 6 +- ...pe-before-getting-it-s-dev-node-name.patch | 8 +- ...-virSCSIDeviceGetUnprivSGIOSysfsPath.patch | 20 +- ...ort-TAPEs-in-virSCSIDeviceGetDevName.patch | 23 +- ...-non-block-devices-in-virGetDeviceID.patch | 10 +- ...irtiofs-kill-the-whole-process-group.patch | 41 --- ...ion-check-for-interface-type-hostdev.patch | 56 ---- ...t-util-Introduce-virProcessGroupKill.patch | 78 ------ ...rt-util-introduce-virProcessGroupGet.patch | 78 ------ ...eForceCleanupPath-add-group-argument.patch | 179 ------------- SOURCES/libvirt-vmx-Parse-vm.genid.patch | 97 ------- SOURCES/symlinks | 11 + SPECS/libvirt.spec | 252 +++++++++++++++--- 20 files changed, 347 insertions(+), 691 deletions(-) delete mode 100644 SOURCES/libvirt-qemu-virtiofs-kill-the-whole-process-group.patch delete mode 100644 SOURCES/libvirt-qemu_migration-check-for-interface-type-hostdev.patch delete mode 100644 SOURCES/libvirt-util-Introduce-virProcessGroupKill.patch delete mode 100644 SOURCES/libvirt-util-introduce-virProcessGroupGet.patch delete mode 100644 SOURCES/libvirt-util-virPidFileForceCleanupPath-add-group-argument.patch delete mode 100644 SOURCES/libvirt-vmx-Parse-vm.genid.patch diff --git a/.gitignore b/.gitignore index 26f35cf..1802ae0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libvirt-7.6.0.tar.xz +SOURCES/libvirt-7.8.0.tar.xz diff --git a/.libvirt.metadata b/.libvirt.metadata index 0b015ea..ed7a714 100644 --- a/.libvirt.metadata +++ b/.libvirt.metadata @@ -1 +1 @@ -d80c78e465ed9af0c745141e323fa312656e8ff6 SOURCES/libvirt-7.6.0.tar.xz +21ae34a57183c3918d65d2a1fbd5f2bea002fb24 SOURCES/libvirt-7.8.0.tar.xz diff --git a/SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch b/SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch index 30b5089..4643dee 100644 --- a/SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch +++ b/SOURCES/libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch @@ -1,5 +1,5 @@ -From 7d799ffd509381fc863983cbf4869fc329e7a784 Mon Sep 17 00:00:00 2001 -Message-Id: <7d799ffd509381fc863983cbf4869fc329e7a784@dist-git> +From 8f2d2f7f26df5e62807f4fd53a1774086ea2c564 Mon Sep 17 00:00:00 2001 +Message-Id: <8f2d2f7f26df5e62807f4fd53a1774086ea2c564@dist-git> 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 @@ -13,24 +13,31 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1227880 Signed-off-by: Jiri Denemark --- - src/qemu/qemu_domain.c | 4 ++++ - 1 file changed, 4 insertions(+) + src/qemu/qemu_domain.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c -index 7e2efc8168..7b4447dc81 100644 +index 584bf5003f..604d0521b0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c -@@ -8834,6 +8834,10 @@ qemuDomainMachineNeedsFDC(const char *machine, +@@ -8666,10 +8666,16 @@ static bool + qemuDomainMachineNeedsFDC(const char *machine, + const virArch arch) + { ++ const char *p = STRSKIP(machine, "pc-q35-"); ++ + if (!ARCH_IS_X86(arch)) return false; - } -+ if (STRPREFIX(p, "rhel7.0.0") || -+ STRPREFIX(p, "rhel7.1.0")) +- if (!STRPREFIX(machine, "pc-q35-")) ++ if (!p) + return false; + - return true; - } ++ if (STRPREFIX(p, "rhel7.0.0") || ++ STRPREFIX(p, "rhel7.1.0")) + return false; + return true; -- -2.32.0 +2.33.0 diff --git a/SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch b/SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch index d680e49..90804f7 100644 --- a/SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch +++ b/SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch @@ -1,5 +1,5 @@ -From a732080685a349e4ab2709e33ac3e99aa9771161 Mon Sep 17 00:00:00 2001 -Message-Id: +From 924bdbd5323c48dfc7b8c5e36346c0d7ca083885 Mon Sep 17 00:00:00 2001 +Message-Id: <924bdbd5323c48dfc7b8c5e36346c0d7ca083885@dist-git> From: Peter Krempa Date: Wed, 28 Jul 2021 17:37:21 +0200 Subject: [PATCH] RHEL: Enable usage of x-blockdev-reopen @@ -29,20 +29,20 @@ Reviewed-by: Ján Tomko --- src/qemu/qemu_block.c | 24 +++++++++++++++--------- src/qemu/qemu_block.h | 3 ++- - src/qemu/qemu_capabilities.c | 11 +++++++++++ - src/qemu/qemu_capabilities.h | 1 + + 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, 46 insertions(+), 18 deletions(-) + 9 files changed, 50 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c -index 4691dff4f7..1f731fff3d 100644 +index 393d3f44d7..d4a5315ec6 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c -@@ -3289,7 +3289,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc, +@@ -3281,7 +3281,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc, int qemuBlockReopenFormatMon(qemuMonitor *mon, @@ -52,7 +52,7 @@ index 4691dff4f7..1f731fff3d 100644 { g_autoptr(virJSONValue) reopenprops = NULL; g_autoptr(virJSONValue) srcprops = NULL; -@@ -3298,15 +3299,19 @@ qemuBlockReopenFormatMon(qemuMonitor *mon, +@@ -3290,15 +3291,19 @@ qemuBlockReopenFormatMon(qemuMonitor *mon, if (!(srcprops = qemuBlockStorageSourceGetBlockdevProps(src, src->backingStore))) return -1; @@ -79,7 +79,7 @@ index 4691dff4f7..1f731fff3d 100644 return -1; return 0; -@@ -3330,6 +3335,7 @@ qemuBlockReopenFormat(virDomainObj *vm, +@@ -3322,6 +3327,7 @@ qemuBlockReopenFormat(virDomainObj *vm, { qemuDomainObjPrivate *priv = vm->privateData; virQEMUDriver *driver = priv->driver; @@ -87,7 +87,7 @@ index 4691dff4f7..1f731fff3d 100644 int rc; /* If we are lacking the object here, qemu might have opened an image with -@@ -3343,7 +3349,7 @@ qemuBlockReopenFormat(virDomainObj *vm, +@@ -3335,7 +3341,7 @@ qemuBlockReopenFormat(virDomainObj *vm, if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) return -1; @@ -111,26 +111,28 @@ index 54601a48a9..88fc9974c4 100644 int qemuBlockReopenReadWrite(virDomainObj *vm, diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c -index 9558938866..6734ed213d 100644 +index a1be0cb74e..bd8da54d03 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c -@@ -637,6 +637,7 @@ VIR_ENUM_IMPL(virQEMUCaps, - "confidential-guest-support", - "query-display-options", - "s390-pv-guest", -+ "blockdev-reopen.__com.redhat_rhel-av-8_2_0-api", +@@ -639,6 +639,9 @@ VIR_ENUM_IMPL(virQEMUCaps, + "s390-pv-guest", /* QEMU_CAPS_S390_PV_GUEST */ + "set-action", /* QEMU_CAPS_SET_ACTION */ + "virtio-blk.queue-size", /* QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE */ ++ ++ /* 410 */ ++ "blockdev-reopen.__com.redhat_rhel-av-8_2_0-api", /* QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API */ ); -@@ -1551,6 +1552,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVhostUserFS[] = - +@@ -1550,6 +1553,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}, -@@ -5204,6 +5206,15 @@ virQEMUCapsInitProcessCaps(virQEMUCaps *qemuCaps) +@@ -5144,6 +5148,15 @@ virQEMUCapsInitProcessCaps(virQEMUCaps *qemuCaps) qemuCaps->arch == VIR_ARCH_MIPS) virQEMUCapsSet(qemuCaps, QEMU_CAPS_SCSI_NCR53C90); @@ -147,22 +149,24 @@ index 9558938866..6734ed213d 100644 } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h -index 2b1bb57a49..def0dd2030 100644 +index b0fa1eec35..d2da311010 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h -@@ -617,6 +617,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ - QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT, /* -machine confidential-guest-support */ - QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp command present */ - QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */ -+ QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API, /* downstream support for blockdev reopen in rhel-av-8.2.0 */ +@@ -620,6 +620,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ + QEMU_CAPS_SET_ACTION, /* 'set-action' QMP command */ + QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, /* virtio-blk-*.queue-size */ ++ /* 410 */ ++ 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 6e2d8010c5..7ebaa7b099 100644 +index 42846349c4..065ed59336 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c -@@ -4339,14 +4339,15 @@ qemuMonitorBlockdevAdd(qemuMonitor *mon, +@@ -4331,14 +4331,15 @@ qemuMonitorBlockdevAdd(qemuMonitor *mon, int qemuMonitorBlockdevReopen(qemuMonitor *mon, @@ -181,10 +185,10 @@ index 6e2d8010c5..7ebaa7b099 100644 diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h -index 1491c1297c..5a93447e23 100644 +index 2f08357c0c..d1eb8f1b26 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h -@@ -1366,7 +1366,8 @@ int qemuMonitorBlockdevAdd(qemuMonitor *mon, +@@ -1405,7 +1405,8 @@ int qemuMonitorBlockdevAdd(qemuMonitor *mon, virJSONValue **props); int qemuMonitorBlockdevReopen(qemuMonitor *mon, @@ -195,10 +199,10 @@ index 1491c1297c..5a93447e23 100644 int qemuMonitorBlockdevDel(qemuMonitor *mon, const char *nodename); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c -index ca2c3bb6cf..8ecd5f3bbd 100644 +index 37e9c05d27..6b8c13527b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c -@@ -8687,13 +8687,19 @@ qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, +@@ -8620,13 +8620,19 @@ qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, int qemuMonitorJSONBlockdevReopen(qemuMonitor *mon, @@ -222,10 +226,10 @@ index ca2c3bb6cf..8ecd5f3bbd 100644 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 01a3ba25f1..90792c9939 100644 +index c8cf734a1c..1c93645fda 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h -@@ -601,7 +601,8 @@ int qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, +@@ -598,7 +598,8 @@ int qemuMonitorJSONBlockdevAdd(qemuMonitor *mon, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int qemuMonitorJSONBlockdevReopen(qemuMonitor *mon, @@ -236,10 +240,10 @@ index 01a3ba25f1..90792c9939 100644 int qemuMonitorJSONBlockdevDel(qemuMonitor *mon, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c -index 2122d9d999..c20287afee 100644 +index 1e4c2fd14e..72bcbb8c5e 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c -@@ -2820,7 +2820,7 @@ testQemuMonitorJSONBlockdevReopen(const void *opaque) +@@ -2794,7 +2794,7 @@ testQemuMonitorJSONBlockdevReopen(const void *opaque) if (qemuMonitorTestAddItem(test, "blockdev-reopen", "{\"return\":{}}") < 0) return -1; @@ -249,5 +253,5 @@ index 2122d9d999..c20287afee 100644 return 0; -- -2.32.0 +2.33.0 diff --git a/SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch b/SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch index 36198db..84d1980 100644 --- a/SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch +++ b/SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch @@ -1,5 +1,5 @@ -From ce1f2d4397f1c3fe3bf87e8b49736bf3c5000de8 Mon Sep 17 00:00:00 2001 -Message-Id: +From 540233361294459596ec2e4ccef089662945ac5c Mon Sep 17 00:00:00 2001 +Message-Id: <540233361294459596ec2e4ccef089662945ac5c@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 @@ -26,7 +26,7 @@ Reviewed-by: Andrea Bolognani 1 file changed, 5 insertions(+) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c -index 7aa92ad11d..337f03b41b 100644 +index 5dd2baf2df..6811c498f9 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -1192,6 +1192,11 @@ virHostCPUGetKVMMaxVCPUs(void) @@ -42,5 +42,5 @@ index 7aa92ad11d..337f03b41b 100644 /* 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.32.0 +2.33.0 diff --git a/SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch b/SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch index f7c6f50..b692a05 100644 --- a/SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch +++ b/SOURCES/libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch @@ -1,5 +1,5 @@ -From 0c42b50b3f2e3cb84d704268fcb267a5b0fabdec Mon Sep 17 00:00:00 2001 -Message-Id: <0c42b50b3f2e3cb84d704268fcb267a5b0fabdec@dist-git> +From fa6027e1ad6ead4c4b6a13f1f5359b63fec2e23c Mon Sep 17 00:00:00 2001 +Message-Id: From: Jiri Denemark Date: Fri, 27 Mar 2015 12:48:40 +0100 Subject: [PATCH] RHEL: Hack around changed Broadwell/Haswell CPUs @@ -30,10 +30,10 @@ Signed-off-by: Jiri Denemark 9 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c -index 156af4caee..b37d693c72 100644 +index 48df8818a6..a1072f74cf 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c -@@ -6343,6 +6343,8 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, +@@ -6242,6 +6242,8 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, { size_t i; virCPUDef *cpu = def->cpu; @@ -42,7 +42,7 @@ index 156af4caee..b37d693c72 100644 switch ((virCPUMode) cpu->mode) { case VIR_CPU_MODE_HOST_PASSTHROUGH: -@@ -6407,6 +6409,11 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, +@@ -6306,6 +6308,11 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, virBufferAsprintf(buf, ",vendor=%s", cpu->vendor_id); for (i = 0; i < cpu->nfeatures; i++) { @@ -54,7 +54,7 @@ index 156af4caee..b37d693c72 100644 switch ((virCPUFeaturePolicy) cpu->features[i].policy) { case VIR_CPU_FEATURE_FORCE: case VIR_CPU_FEATURE_REQUIRE: -@@ -6424,6 +6431,20 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, +@@ -6323,6 +6330,20 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, } } @@ -76,12 +76,12 @@ index 156af4caee..b37d693c72 100644 } diff --git a/tests/qemuxml2argvdata/cpu-Haswell.args b/tests/qemuxml2argvdata/cpu-Haswell.args -index 8bbd6277fd..55b66b343d 100644 +index 6441a4c1eb..110017cf0e 100644 --- a/tests/qemuxml2argvdata/cpu-Haswell.args +++ b/tests/qemuxml2argvdata/cpu-Haswell.args -@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ - -name QEMUGuest1 \ +@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ + -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -machine pc,accel=kvm,usb=off,dump-guest-core=off \ --cpu Haswell \ +-cpu Haswell,+rtm,+hle \ @@ -89,12 +89,12 @@ index 8bbd6277fd..55b66b343d 100644 -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 e21a889bee..5092e9f43a 100644 +index ffa9236a47..c859978e02 100644 --- a/tests/qemuxml2argvdata/cpu-host-model-cmt.args +++ b/tests/qemuxml2argvdata/cpu-host-model-cmt.args -@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ - -name QEMUGuest1 \ +@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ + -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -machine pc,accel=tcg,usb=off,dump-guest-core=off \ --cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm \ +-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+rtm,+hle \ @@ -128,25 +128,25 @@ index bb6b5c9986..f4a9fde2bf 100644 -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 0f6f79653e..207ac0a0bb 100644 +index 3a7d69d6b7..3b30aa92f8 100644 --- a/tests/qemuxml2argvdata/cpu-tsc-frequency.args +++ b/tests/qemuxml2argvdata/cpu-tsc-frequency.args -@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ - -name QEMUGuest1 \ +@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ + -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -machine pc,accel=kvm,usb=off,dump-guest-core=off \ ---cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+invtsc,tsc-frequency=3504000000 \ -+-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+invtsc,+rtm,+hle,tsc-frequency=3504000000 \ +--cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+invtsc,tsc-frequency=4567890000 \ ++-cpu Haswell,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+dtes64,+monitor,+ds_cpl,+vmx,+smx,+est,+tm2,+xtpr,+pdcm,+f16c,+rdrand,+pdpe1gb,+abm,+lahf_lm,+invtsc,+rtm,+hle,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 f3d255e76e..bdb94c6fb5 100644 +index 956ee3b6b7..55222293d0 100644 --- a/tests/qemuxml2argvdata/q35-acpi-nouefi.args +++ b/tests/qemuxml2argvdata/q35-acpi-nouefi.args -@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ - -name guest \ +@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ + -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \ -machine q35,accel=tcg,usb=off,dump-guest-core=off \ --cpu Haswell \ +-cpu Haswell,+rtm,+hle \ @@ -154,12 +154,12 @@ index f3d255e76e..bdb94c6fb5 100644 -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 b51a102e01..3ca8ac98a9 100644 +index 272369de22..ea03a2ac33 100644 --- a/tests/qemuxml2argvdata/q35-acpi-uefi.args +++ b/tests/qemuxml2argvdata/q35-acpi-uefi.args -@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ - -name guest \ +@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ + -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \ -machine q35,accel=tcg,usb=off,dump-guest-core=off \ --cpu Haswell \ +-cpu Haswell,+rtm,+hle \ @@ -167,12 +167,12 @@ index b51a102e01..3ca8ac98a9 100644 -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 0cee789ad1..39f28e8c6d 100644 +index c6cffeea89..ce556db8e9 100644 --- a/tests/qemuxml2argvdata/q35-noacpi-nouefi.args +++ b/tests/qemuxml2argvdata/q35-noacpi-nouefi.args -@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \ - -name guest \ +@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \ -S \ + -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \ -machine q35,accel=tcg,usb=off,dump-guest-core=off \ --cpu Haswell \ +-cpu Haswell,+rtm,+hle \ @@ -180,5 +180,5 @@ index 0cee789ad1..39f28e8c6d 100644 -realtime mlock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -- -2.32.0 +2.33.0 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 index 5cc8dbd..0215e0d 100644 --- 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 @@ -1,5 +1,5 @@ -From e290c6907c1d478724b8d7f178715db6cf4bd278 Mon Sep 17 00:00:00 2001 -Message-Id: +From 1701b2edd17266113200a87a7bb92bdace556fa6 Mon Sep 17 00:00:00 2001 +Message-Id: <1701b2edd17266113200a87a7bb92bdace556fa6@dist-git> From: John Ferlan Date: Mon, 17 Dec 2018 20:42:30 -0500 Subject: [PATCH] RHEL: qemu: Add ability to set sgio values for hostdev @@ -77,5 +77,5 @@ index 916a3d36ee..a749fc1bbc 100644 /* 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.32.0 +2.33.0 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 index f47399f..4906cff 100644 --- 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 @@ -1,5 +1,5 @@ -From 5a3113135bcbf5170033c9ef11cbbc320ad47d7d Mon Sep 17 00:00:00 2001 -Message-Id: <5a3113135bcbf5170033c9ef11cbbc320ad47d7d@dist-git> +From c7881fb84209f897f2bd92e13ba4942ba24a87a6 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 @@ -62,5 +62,5 @@ index a749fc1bbc..2beef89cd1 100644 qemuDriverLock(driver); -- -2.32.0 +2.33.0 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 index 0367ce9..20d777c 100644 --- 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 @@ -1,5 +1,5 @@ -From 5488481a03dc8dfcbb99df263b3206e65fa8f4fa Mon Sep 17 00:00:00 2001 -Message-Id: <5488481a03dc8dfcbb99df263b3206e65fa8f4fa@dist-git> +From 42244a9ec8cf97a6384aa2c9be85dc29f99ce5c6 Mon Sep 17 00:00:00 2001 +Message-Id: <42244a9ec8cf97a6384aa2c9be85dc29f99ce5c6@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 @@ -24,7 +24,7 @@ Reviewed-by: Jiri Denemark create mode 100644 tests/virscsidata/1-0-0-0/type diff --git a/src/util/virscsi.c b/src/util/virscsi.c -index b1f202eef1..3d68f829e4 100644 +index 6a90d9002f..770f727cac 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -47,6 +47,32 @@ struct _virUsedByInfo { @@ -211,5 +211,5 @@ index 0000000000..573541ac97 @@ -0,0 +1 @@ +0 -- -2.32.0 +2.33.0 diff --git a/SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch b/SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch index 41272ea..f24980c 100644 --- a/SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch +++ b/SOURCES/libvirt-RHEL-virscsi-Introduce-and-use-virSCSIDeviceGetUnprivSGIOSysfsPath.patch @@ -1,5 +1,5 @@ -From 27dee7b5a4152ceea00662a6f112c994d7f2b818 Mon Sep 17 00:00:00 2001 -Message-Id: <27dee7b5a4152ceea00662a6f112c994d7f2b818@dist-git> +From 021beedb6ddc77f8ceadb589ae9d1d7c9aacf363 Mon Sep 17 00:00:00 2001 +Message-Id: <021beedb6ddc77f8ceadb589ae9d1d7c9aacf363@dist-git> From: Michal Privoznik Date: Fri, 6 Mar 2020 15:52:23 +0100 Subject: [PATCH] RHEL: virscsi: Introduce and use @@ -30,10 +30,10 @@ Reviewed-by: Jiri Denemark 6 files changed, 49 insertions(+), 31 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 43493ea76e..0f701ed1ae 100644 +index 6de9d9aef1..1efdb0f881 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms -@@ -3168,6 +3168,7 @@ virSCSIDeviceGetSgName; +@@ -3187,6 +3187,7 @@ virSCSIDeviceGetSgName; virSCSIDeviceGetShareable; virSCSIDeviceGetTarget; virSCSIDeviceGetUnit; @@ -120,7 +120,7 @@ index 2beef89cd1..90ff7f56f0 100644 return 0; diff --git a/src/util/virscsi.c b/src/util/virscsi.c -index d6c10c0667..7a8e6b3b23 100644 +index 6165196423..b437fdcac0 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -302,6 +302,25 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix, @@ -166,10 +166,10 @@ index 65ad15ed76..5721985939 100644 virSCSIDevice *virSCSIDeviceNew(const char *sysfs_prefix, const char *adapter, diff --git a/src/util/virutil.c b/src/util/virutil.c -index 00cd56e2b2..d0fc49c39f 100644 +index c9de043c40..a916f30aa9 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c -@@ -1382,18 +1382,13 @@ virGetUnprivSGIOSysfsPath(const char *path, +@@ -1377,18 +1377,13 @@ virGetUnprivSGIOSysfsPath(const char *path, int virSetDeviceUnprivSGIO(const char *path, @@ -189,7 +189,7 @@ index 00cd56e2b2..d0fc49c39f 100644 virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("unpriv_sgio is not supported by this kernel")); goto cleanup; -@@ -1401,38 +1396,32 @@ virSetDeviceUnprivSGIO(const char *path, +@@ -1396,38 +1391,32 @@ virSetDeviceUnprivSGIO(const char *path, val = g_strdup_printf("%d", unpriv_sgio); @@ -232,7 +232,7 @@ index 00cd56e2b2..d0fc49c39f 100644 goto cleanup; if ((tmp = strchr(buf, '\n'))) -@@ -1440,13 +1429,12 @@ virGetDeviceUnprivSGIO(const char *path, +@@ -1435,13 +1424,12 @@ virGetDeviceUnprivSGIO(const char *path, if (virStrToLong_i(buf, NULL, 10, unpriv_sgio) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -263,5 +263,5 @@ index 854b494890..da267c6446 100644 char *virGetUnprivSGIOSysfsPath(const char *path, const char *sysfs_dir); -- -2.32.0 +2.33.0 diff --git a/SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch b/SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch index b46151a..05e9827 100644 --- a/SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch +++ b/SOURCES/libvirt-RHEL-virscsi-Support-TAPEs-in-virSCSIDeviceGetDevName.patch @@ -1,5 +1,5 @@ -From 172cd449d1c757219cbea6e9d94dbff54f28b833 Mon Sep 17 00:00:00 2001 -Message-Id: <172cd449d1c757219cbea6e9d94dbff54f28b833@dist-git> +From 6f3aeca3a5458f59d13138cc03d9c79a85502757 Mon Sep 17 00:00:00 2001 +Message-Id: <6f3aeca3a5458f59d13138cc03d9c79a85502757@dist-git> From: Michal Privoznik Date: Fri, 6 Mar 2020 15:52:22 +0100 Subject: [PATCH] RHEL: virscsi: Support TAPEs in virSCSIDeviceGetDevName() @@ -34,7 +34,7 @@ Reviewed-by: Jiri Denemark create mode 100644 tests/virscsidata/sg3 diff --git a/src/util/virscsi.c b/src/util/virscsi.c -index 3d68f829e4..d6c10c0667 100644 +index 770f727cac..6165196423 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -224,6 +224,31 @@ virSCSIDeviceGetDevNameBlock(const char *prefix, @@ -125,10 +125,10 @@ 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 0d7c35a261..0647bb4841 100644 +index c96699e157..924b77af08 100644 --- a/tests/virscsitest.c +++ b/tests/virscsitest.c -@@ -33,18 +33,34 @@ VIR_LOG_INIT("tests.scsitest"); +@@ -33,17 +33,33 @@ VIR_LOG_INIT("tests.scsitest"); static char *virscsi_prefix; @@ -145,8 +145,7 @@ index 0d7c35a261..0647bb4841 100644 +testGetDevName(const void *opaque) { + const testGetDevNameData *data = opaque; - char *name = NULL; - int ret = -1; + g_autofree char *name = NULL; if (!(name = virSCSIDeviceGetDevName(virscsi_prefix, - "scsi_host1", 0, 0, 0))) @@ -161,12 +160,12 @@ index 0d7c35a261..0647bb4841 100644 + fprintf(stderr, + "SCSI dev name mismatch, expected %s got %s", + data->expectedName, name); - goto cleanup; + return -1; + } - ret = 0; - cleanup: -@@ -213,15 +229,27 @@ mymain(void) + 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"); @@ -197,5 +196,5 @@ index 0d7c35a261..0647bb4841 100644 ret = -1; -- -2.32.0 +2.33.0 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 index dd87c87..77cfae3 100644 --- a/SOURCES/libvirt-RHEL-virutil-Accept-non-block-devices-in-virGetDeviceID.patch +++ b/SOURCES/libvirt-RHEL-virutil-Accept-non-block-devices-in-virGetDeviceID.patch @@ -1,5 +1,5 @@ -From 7da0de5b5de0b43e7da21844cad3c643f9f19997 Mon Sep 17 00:00:00 2001 -Message-Id: <7da0de5b5de0b43e7da21844cad3c643f9f19997@dist-git> +From b8e065b82b1497217863e6288ef4b5f486370e9c 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() @@ -19,10 +19,10 @@ Reviewed-by: Jiri Denemark 1 file changed, 3 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c -index d0fc49c39f..0b8d763584 100644 +index a916f30aa9..3396b3da9d 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c -@@ -1338,9 +1338,6 @@ virGetDeviceID(const char *path, int *maj, int *min) +@@ -1333,9 +1333,6 @@ virGetDeviceID(const char *path, int *maj, int *min) if (stat(path, &sb) < 0) return -errno; @@ -33,5 +33,5 @@ index d0fc49c39f..0b8d763584 100644 *maj = major(sb.st_rdev); if (min) -- -2.32.0 +2.33.0 diff --git a/SOURCES/libvirt-qemu-virtiofs-kill-the-whole-process-group.patch b/SOURCES/libvirt-qemu-virtiofs-kill-the-whole-process-group.patch deleted file mode 100644 index 512d1f4..0000000 --- a/SOURCES/libvirt-qemu-virtiofs-kill-the-whole-process-group.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 1584be12f2ec36b56b014843179b80eb72d99804 Mon Sep 17 00:00:00 2001 -Message-Id: <1584be12f2ec36b56b014843179b80eb72d99804@dist-git> -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Thu, 5 Aug 2021 13:49:47 +0200 -Subject: [PATCH] qemu: virtiofs: kill the whole process group -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Send TERM/KILL to virtiofsd and its child processes too -and do not exit until they are all dead. - -https://bugzilla.redhat.com/show_bug.cgi?id=1940276 - -Signed-off-by: Ján Tomko -Reviewed-by: Michal Privoznik -Tested-by: Masayoshi Mizuma -(cherry picked from commit ca43a5198a84e592d9e2e844cdb39b24a0c8732b) -Signed-off-by: Ján Tomko -Message-Id: <1af2b57ee80f752ac84f23893f229e2d09e5d475.1628164129.git.jtomko@redhat.com> -Reviewed-by: Michal Privoznik ---- - src/qemu/qemu_virtiofs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c -index edaedf0304..15c05479c8 100644 ---- a/src/qemu/qemu_virtiofs.c -+++ b/src/qemu/qemu_virtiofs.c -@@ -281,7 +281,7 @@ qemuVirtioFSStop(virQEMUDriver *driver G_GNUC_UNUSED, - if (!(pidfile = qemuVirtioFSCreatePidFilename(vm, fs->info.alias))) - goto cleanup; - -- if (virPidFileForceCleanupPath(pidfile) < 0) { -+ if (virPidFileForceCleanupPathFull(pidfile, true) < 0) { - VIR_WARN("Unable to kill virtiofsd process"); - } else { - if (QEMU_DOMAIN_FS_PRIVATE(fs)->vhostuser_fs_sock) --- -2.32.0 - diff --git a/SOURCES/libvirt-qemu_migration-check-for-interface-type-hostdev.patch b/SOURCES/libvirt-qemu_migration-check-for-interface-type-hostdev.patch deleted file mode 100644 index d298280..0000000 --- a/SOURCES/libvirt-qemu_migration-check-for-interface-type-hostdev.patch +++ /dev/null @@ -1,56 +0,0 @@ -From c0a4688a4754715e90a1b127c080917be48ee14a Mon Sep 17 00:00:00 2001 -Message-Id: -From: Kristina Hanicova -Date: Thu, 5 Aug 2021 13:42:15 +0200 -Subject: [PATCH] qemu_migration: check for interface type 'hostdev' -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When we try to migrate vm, we check if it contains only devices -that are able to migrate. If a hostdev device is not able to -migrate we raise an error with , but it can actually be -, so we need to check if hostdev device was created -by us from interface and show the right error message. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1942315 - -Signed-off-by: Kristina Hanicova -Signed-off-by: Michal Privoznik -Reviewed-by: Michal Privoznik -(cherry picked from commit 814a8aaeeb51fa0fd65a030853cc86bc6d29b9d8) -Signed-off-by: Kristina Hanicova -Message-Id: <3b763f29bb5978cdb4f826ac9d4d632c7631e083.1628163625.git.khanicov@redhat.com> -Reviewed-by: Ján Tomko ---- - src/qemu/qemu_migration.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c -index 4d651aeb1a..b441d0226c 100644 ---- a/src/qemu/qemu_migration.c -+++ b/src/qemu/qemu_migration.c -@@ -1272,9 +1272,17 @@ qemuMigrationSrcIsAllowedHostdev(const virDomainDef *def) - } - - /* all other PCI hostdevs can't be migrated */ -- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, -- _("cannot migrate a domain with "), -- virDomainHostdevSubsysTypeToString(hostdev->source.subsys.type)); -+ if (hostdev->parentnet) { -+ virDomainNetType actualType = virDomainNetGetActualType(hostdev->parentnet); -+ -+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, -+ _("cannot migrate a domain with "), -+ virDomainNetTypeToString(actualType)); -+ } else { -+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, -+ _("cannot migrate a domain with "), -+ virDomainHostdevSubsysTypeToString(hostdev->source.subsys.type)); -+ } - return false; - - case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST: --- -2.32.0 - diff --git a/SOURCES/libvirt-util-Introduce-virProcessGroupKill.patch b/SOURCES/libvirt-util-Introduce-virProcessGroupKill.patch deleted file mode 100644 index 47a5c3b..0000000 --- a/SOURCES/libvirt-util-Introduce-virProcessGroupKill.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 5d90f461a7356560361dab522273ff5aabbfeefe Mon Sep 17 00:00:00 2001 -Message-Id: <5d90f461a7356560361dab522273ff5aabbfeefe@dist-git> -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Thu, 5 Aug 2021 13:49:44 +0200 -Subject: [PATCH] util: Introduce virProcessGroupKill -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ján Tomko -Reviewed-by: Michal Privoznik -(cherry picked from commit fc180c741f27fb24419a69f53ef682fade699b52) -Signed-off-by: Ján Tomko - -https://bugzilla.redhat.com/show_bug.cgi?id=1940276 -Message-Id: -Reviewed-by: Michal Privoznik ---- - src/libvirt_private.syms | 1 + - src/util/virprocess.c | 17 +++++++++++++++++ - src/util/virprocess.h | 1 + - 3 files changed, 19 insertions(+) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 0f701ed1ae..b5e86019a5 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -3069,6 +3069,7 @@ virProcessGetMaxMemLock; - virProcessGetNamespaces; - virProcessGetPids; - virProcessGetStartTime; -+virProcessGroupKill; - virProcessKill; - virProcessKillPainfully; - virProcessKillPainfullyDelay; -diff --git a/src/util/virprocess.c b/src/util/virprocess.c -index 67dd599b3e..5f01dd1f67 100644 ---- a/src/util/virprocess.c -+++ b/src/util/virprocess.c -@@ -361,6 +361,23 @@ int virProcessKill(pid_t pid, int sig) - } - - -+/* send signal to a process group */ -+int virProcessGroupKill(pid_t pid, int sig G_GNUC_UNUSED) -+{ -+ if (pid <= 1) { -+ errno = ESRCH; -+ return -1; -+ } -+ -+#ifdef WIN32 -+ errno = ENOSYS; -+ return -1; -+#else -+ return killpg(pid, sig); -+#endif -+} -+ -+ - /* - * Try to kill the process and verify it has exited - * -diff --git a/src/util/virprocess.h b/src/util/virprocess.h -index d16e8b23bb..0359d7fd9f 100644 ---- a/src/util/virprocess.h -+++ b/src/util/virprocess.h -@@ -52,6 +52,7 @@ virProcessWait(pid_t pid, int *exitstatus, bool raw) - G_GNUC_WARN_UNUSED_RESULT; - - int virProcessKill(pid_t pid, int sig); -+int virProcessGroupKill(pid_t pid, int sig); - - int virProcessKillPainfully(pid_t pid, bool force); - int virProcessKillPainfullyDelay(pid_t pid, --- -2.32.0 - diff --git a/SOURCES/libvirt-util-introduce-virProcessGroupGet.patch b/SOURCES/libvirt-util-introduce-virProcessGroupGet.patch deleted file mode 100644 index d9c1181..0000000 --- a/SOURCES/libvirt-util-introduce-virProcessGroupGet.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 463d3a6b9b960410d4a0304209f4e660d7f1faf2 Mon Sep 17 00:00:00 2001 -Message-Id: <463d3a6b9b960410d4a0304209f4e660d7f1faf2@dist-git> -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Thu, 5 Aug 2021 13:49:45 +0200 -Subject: [PATCH] util: introduce virProcessGroupGet -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ján Tomko -Reviewed-by: Michal Privoznik -(cherry picked from commit 4b39c2aa2e840c9f0c51cf5a7a0d93de51ba8439) -Signed-off-by: Ján Tomko - -https://bugzilla.redhat.com/show_bug.cgi?id=1940276 -Message-Id: <365bb0eb78d11505a2b0d6be798462e667074404.1628164129.git.jtomko@redhat.com> -Reviewed-by: Michal Privoznik ---- - src/libvirt_private.syms | 1 + - src/util/virprocess.c | 17 +++++++++++++++++ - src/util/virprocess.h | 1 + - 3 files changed, 19 insertions(+) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index b5e86019a5..8b892cf255 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -3069,6 +3069,7 @@ virProcessGetMaxMemLock; - virProcessGetNamespaces; - virProcessGetPids; - virProcessGetStartTime; -+virProcessGroupGet; - virProcessGroupKill; - virProcessKill; - virProcessKillPainfully; -diff --git a/src/util/virprocess.c b/src/util/virprocess.c -index 5f01dd1f67..1bc840120a 100644 ---- a/src/util/virprocess.c -+++ b/src/util/virprocess.c -@@ -378,6 +378,23 @@ int virProcessGroupKill(pid_t pid, int sig G_GNUC_UNUSED) - } - - -+/* get process group from a pid */ -+pid_t virProcessGroupGet(pid_t pid) -+{ -+ if (pid <= 1) { -+ errno = ESRCH; -+ return -1; -+ } -+ -+#ifdef WIN32 -+ errno = ENOSYS; -+ return -1; -+#else -+ return getpgid(pid); -+#endif -+} -+ -+ - /* - * Try to kill the process and verify it has exited - * -diff --git a/src/util/virprocess.h b/src/util/virprocess.h -index 0359d7fd9f..9d7c0f479a 100644 ---- a/src/util/virprocess.h -+++ b/src/util/virprocess.h -@@ -53,6 +53,7 @@ virProcessWait(pid_t pid, int *exitstatus, bool raw) - - int virProcessKill(pid_t pid, int sig); - int virProcessGroupKill(pid_t pid, int sig); -+pid_t virProcessGroupGet(pid_t pid); - - int virProcessKillPainfully(pid_t pid, bool force); - int virProcessKillPainfullyDelay(pid_t pid, --- -2.32.0 - diff --git a/SOURCES/libvirt-util-virPidFileForceCleanupPath-add-group-argument.patch b/SOURCES/libvirt-util-virPidFileForceCleanupPath-add-group-argument.patch deleted file mode 100644 index 43203bb..0000000 --- a/SOURCES/libvirt-util-virPidFileForceCleanupPath-add-group-argument.patch +++ /dev/null @@ -1,179 +0,0 @@ -From aef9198f67350910494edb38b64b1c5e71a32e4e Mon Sep 17 00:00:00 2001 -Message-Id: -From: =?UTF-8?q?J=C3=A1n=20Tomko?= -Date: Thu, 5 Aug 2021 13:49:46 +0200 -Subject: [PATCH] util: virPidFileForceCleanupPath: add group argument -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add a version of virPidFileForceCleanupPath that takes -a 'group' bool argument and propagate it all the way -down to virProcessKillPainfullyDelay. - -Signed-off-by: Ján Tomko -Reviewed-by: Michal Privoznik -(cherry picked from commit ff7b8043b68ff8e03008a9328dccb0b310d8f7a2) -Signed-off-by: Ján Tomko - -https://bugzilla.redhat.com/show_bug.cgi?id=1940276 -Message-Id: -Reviewed-by: Michal Privoznik ---- - src/libvirt_private.syms | 1 + - src/qemu/qemu_process.c | 3 ++- - src/util/virpidfile.c | 15 +++++++++++++-- - src/util/virpidfile.h | 2 ++ - src/util/virprocess.c | 17 ++++++++++++----- - src/util/virprocess.h | 3 ++- - 6 files changed, 32 insertions(+), 9 deletions(-) - -diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms -index 8b892cf255..c80e690da4 100644 ---- a/src/libvirt_private.syms -+++ b/src/libvirt_private.syms -@@ -3037,6 +3037,7 @@ virPidFileConstructPath; - virPidFileDelete; - virPidFileDeletePath; - virPidFileForceCleanupPath; -+virPidFileForceCleanupPathFull; - virPidFileRead; - virPidFileReadIfAlive; - virPidFileReadPath; -diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c -index 521fda57da..6ef8ebd83e 100644 ---- a/src/qemu/qemu_process.c -+++ b/src/qemu/qemu_process.c -@@ -7700,7 +7700,8 @@ qemuProcessKill(virDomainObj *vm, unsigned int flags) - * to be safe against stalls by the kernel freeing up the resources */ - return virProcessKillPainfullyDelay(vm->pid, - !!(flags & VIR_QEMU_PROCESS_KILL_FORCE), -- vm->def->nhostdevs * 2); -+ vm->def->nhostdevs * 2, -+ false); - } - - -diff --git a/src/util/virpidfile.c b/src/util/virpidfile.c -index c6389c1869..7069f8343d 100644 ---- a/src/util/virpidfile.c -+++ b/src/util/virpidfile.c -@@ -514,7 +514,7 @@ virPidFileConstructPath(bool privileged, - * Returns 0 if the pidfile was successfully cleaned up, -1 otherwise. - */ - int --virPidFileForceCleanupPath(const char *path) -+virPidFileForceCleanupPathFull(const char *path, bool group) - { - pid_t pid = 0; - int fd = -1; -@@ -529,10 +529,15 @@ virPidFileForceCleanupPath(const char *path) - if (fd < 0) { - virResetLastError(); - -+ if (pid > 1 && group) -+ pid = virProcessGroupGet(pid); -+ - /* Only kill the process if the pid is valid one. 0 means - * there is somebody else doing the same pidfile cleanup - * machinery. */ -- if (pid) -+ if (group) -+ virProcessKillPainfullyDelay(pid, true, 0, true); -+ else if (pid) - virProcessKillPainfully(pid, true); - - if (virPidFileDeletePath(path) < 0) -@@ -544,3 +549,9 @@ virPidFileForceCleanupPath(const char *path) - - return 0; - } -+ -+int -+virPidFileForceCleanupPath(const char *path) -+{ -+ return virPidFileForceCleanupPathFull(path, false); -+} -diff --git a/src/util/virpidfile.h b/src/util/virpidfile.h -index 370a59892e..fd8013c41e 100644 ---- a/src/util/virpidfile.h -+++ b/src/util/virpidfile.h -@@ -73,4 +73,6 @@ int virPidFileConstructPath(bool privileged, - const char *progname, - char **pidfile); - -+int virPidFileForceCleanupPathFull(const char *path, -+ bool group) ATTRIBUTE_NONNULL(1); - int virPidFileForceCleanupPath(const char *path) ATTRIBUTE_NONNULL(1); -diff --git a/src/util/virprocess.c b/src/util/virprocess.c -index 1bc840120a..0b57522936 100644 ---- a/src/util/virprocess.c -+++ b/src/util/virprocess.c -@@ -406,15 +406,15 @@ pid_t virProcessGroupGet(pid_t pid) - * wait longer than the default. - */ - int --virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay) -+virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay, bool group) - { - size_t i; - /* This is in 1/5th seconds since polling is on a 0.2s interval */ - unsigned int polldelay = (force ? 200 : 75) + (extradelay*5); - const char *signame = "TERM"; - -- VIR_DEBUG("vpid=%lld force=%d extradelay=%u", -- (long long)pid, force, extradelay); -+ VIR_DEBUG("vpid=%lld force=%d extradelay=%u group=%d", -+ (long long)pid, force, extradelay, group); - - /* This loop sends SIGTERM, then waits a few iterations (10 seconds) - * to see if it dies. If the process still hasn't exited, and -@@ -429,6 +429,8 @@ virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay) - */ - for (i = 0; i < polldelay; i++) { - int signum; -+ int rc; -+ - if (i == 0) { - signum = SIGTERM; /* kindly suggest it should exit */ - } else if (i == 50 && force) { -@@ -447,7 +449,12 @@ virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay) - signum = 0; /* Just check for existence */ - } - -- if (virProcessKill(pid, signum) < 0) { -+ if (group) -+ rc = virProcessGroupKill(pid, signum); -+ else -+ rc = virProcessKill(pid, signum); -+ -+ if (rc < 0) { - if (errno != ESRCH) { - virReportSystemError(errno, - _("Failed to terminate process %lld with SIG%s"), -@@ -470,7 +477,7 @@ virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay) - - int virProcessKillPainfully(pid_t pid, bool force) - { -- return virProcessKillPainfullyDelay(pid, force, 0); -+ return virProcessKillPainfullyDelay(pid, force, 0, false); - } - - #if WITH_SCHED_GETAFFINITY -diff --git a/src/util/virprocess.h b/src/util/virprocess.h -index 9d7c0f479a..9910331a0c 100644 ---- a/src/util/virprocess.h -+++ b/src/util/virprocess.h -@@ -58,7 +58,8 @@ pid_t virProcessGroupGet(pid_t pid); - int virProcessKillPainfully(pid_t pid, bool force); - int virProcessKillPainfullyDelay(pid_t pid, - bool force, -- unsigned int extradelay); -+ unsigned int extradelay, -+ bool group); - - int virProcessSetAffinity(pid_t pid, virBitmap *map, bool quiet); - --- -2.32.0 - diff --git a/SOURCES/libvirt-vmx-Parse-vm.genid.patch b/SOURCES/libvirt-vmx-Parse-vm.genid.patch deleted file mode 100644 index 84d92df..0000000 --- a/SOURCES/libvirt-vmx-Parse-vm.genid.patch +++ /dev/null @@ -1,97 +0,0 @@ -From fa8ad24ae3ff0e43c22b5045a6b99bbddf750121 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Privoznik -Date: Tue, 3 Aug 2021 16:04:36 +0200 -Subject: [PATCH] vmx: Parse vm.genid -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The VMware metadata file contains genid but we are not parsing -and thus reporting it in domain XML. However, it's not as -straightforward as one might think. The UUID reported by VMware -is not in its usual string form, but split into two signed long -longs. That means, we have to do a bit of trickery when parsing. -But looking around it's the same magic that libguestfs does: - -https://github.com/libguestfs/virt-v2v/blob/master/v2v/input_vmx.ml#L421 - -It's also explained by Rich on qemu-devel: - -https://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg02019.html - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1598348 -Signed-off-by: Michal Privoznik -Reviewed-by: Richard W.M. Jones -(cherry picked from commit 7d661d6e20fe82e5472d5ab6dcd97ed76291f256) -Signed-off-by: Michal Privoznik -Message-Id: <5f6ef3e615301e5d318234949f707bedf9112f85.1627998922.git.mprivozn@redhat.com> -Reviewed-by: Ján Tomko ---- - src/vmx/vmx.c | 30 +++++++++++++++++++ - .../vmx2xml-esx-in-the-wild-10.xml | 1 + - 2 files changed, 31 insertions(+) - -diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c -index 1cd5a82227..04eabff18a 100644 ---- a/src/vmx/vmx.c -+++ b/src/vmx/vmx.c -@@ -1337,6 +1337,32 @@ virVMXConfigScanResultsCollector(const char* name, - } - - -+static int -+virVMXParseGenID(virConf *conf, -+ virDomainDef *def) -+{ -+ long long vmid[2] = { 0 }; -+ g_autofree char *uuidstr = NULL; -+ -+ if (virVMXGetConfigLong(conf, "vm.genid", &vmid[0], 0, true) < 0 || -+ virVMXGetConfigLong(conf, "vm.genidX", &vmid[1], 0, true) < 0) -+ return -1; -+ -+ if (vmid[0] == 0 && vmid[1] == 0) -+ return 0; -+ -+ uuidstr = g_strdup_printf("%.16llx%.16llx", vmid[0], vmid[1]); -+ if (virUUIDParse(uuidstr, def->genid) < 0) { -+ virReportError(VIR_ERR_INTERNAL_ERROR, -+ _("Could not parse UUID from string '%s'"), uuidstr); -+ return -1; -+ } -+ def->genidRequested = true; -+ -+ return 0; -+} -+ -+ - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * VMX -> Domain XML -@@ -1466,6 +1492,10 @@ virVMXParseConfig(virVMXContext *ctx, - } - } - -+ /* vmx:vm.genid + vm.genidX -> def:genid */ -+ if (virVMXParseGenID(conf, def) < 0) -+ goto cleanup; -+ - /* vmx:annotation -> def:description */ - if (virVMXGetConfigString(conf, "annotation", &def->description, - true) < 0) { -diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.xml -index b8c522af1f..47ed637920 100644 ---- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.xml -+++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.xml -@@ -1,6 +1,7 @@ - - w2019biosvmware - 421a6177-5aa9-abb7-5924-fc376c18a1b4 -+ 13c67c91-9f47-526f-b0d6-e4dd2e4bb4f9 - 4194304 - 4194304 - 2 --- -2.32.0 - diff --git a/SOURCES/symlinks b/SOURCES/symlinks index d79e9ed..1582e83 100644 --- a/SOURCES/symlinks +++ b/SOURCES/symlinks @@ -49,6 +49,7 @@ tests/nodedevxml2xmlout/usb_device_1d6b_1_0000_00_1d_0.xml ../nodedevschemadata/ 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 @@ -154,6 +155,7 @@ tests/qemuxml2xmloutdata/clock-realtime.xml ../qemuxml2argvdata/clock-realtime.x 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-queues.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 @@ -1096,3 +1098,12 @@ 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 index fb831d5..fded47d 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -24,7 +24,7 @@ %define arches_vbox %{arches_x86} %define arches_ceph %{arches_64bit} %define arches_zfs %{arches_x86} %{power64} %{arm} -%define arches_numactl %{arches_x86} %{power64} aarch64 +%define arches_numactl %{arches_x86} %{power64} aarch64 s390x %define arches_numad %{arches_x86} %{power64} aarch64 # The hypervisor drivers that run in libvirtd @@ -181,6 +181,11 @@ %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 @@ -200,8 +205,8 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 7.6.0 -Release: 2%{?dist}%{?extra_release} +Version: 7.8.0 +Release: 1%{?dist}%{?extra_release} License: LGPLv2+ URL: https://libvirt.org/ @@ -221,12 +226,6 @@ 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-vmx-Parse-vm.genid.patch -Patch12: libvirt-qemu_migration-check-for-interface-type-hostdev.patch -Patch13: libvirt-util-Introduce-virProcessGroupKill.patch -Patch14: libvirt-util-introduce-virProcessGroupGet.patch -Patch15: libvirt-util-virPidFileForceCleanupPath-add-group-argument.patch -Patch16: libvirt-qemu-virtiofs-kill-the-whole-process-group.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -1115,6 +1114,12 @@ exit 1 %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} @@ -1145,7 +1150,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec) -Ddriver_vz=disabled \ -Ddriver_bhyve=disabled \ -Ddriver_ch=disabled \ - -Dremote_default_mode=legacy \ + %{?arg_remote_mode} \ -Ddriver_interface=enabled \ -Ddriver_network=enabled \ -Dstorage_fs=enabled \ @@ -1287,6 +1292,29 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ # 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 + +%define libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1.service + +%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() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1.socket + +%define libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.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 @@ -1296,30 +1324,25 @@ getent group libvirt >/dev/null || groupadd -r libvirt exit 0 %post daemon -%global post_units \\\ - virtlockd.socket virtlockd-admin.socket \\\ - virtlogd.socket virtlogd-admin.socket \\\ - libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket \\\ - libvirtd-tcp.socket libvirtd-tls.socket \\\ - libvirtd.service \\\ - libvirt-guests.service +%libvirt_daemon_systemd_post virtlogd +%libvirt_daemon_systemd_post virtlockdd +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post_inet virtproxyd +%else +%libvirt_daemon_systemd_post_inet libvirtd +%endif -%systemd_post %post_units +%systemd_post libvirt-guests.service -# request daemon restart in posttrans -mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : -touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : +%libvirt_daemon_schedule_restart libvirtd %preun daemon -%global preun_units \\\ - libvirtd.service \\\ - libvirtd-tcp.socket libvirtd-tls.socket \\\ - libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket \\\ - virtlogd.socket virtlogd-admin.socket virtlogd.service \\\ - virtlockd.socket virtlockd-admin.socket virtlockd.service \\\ - libvirt-guests.service +%systemd_preun libvirt-guests.service -%systemd_preun %preun_units +%libvirt_daemon_systemd_preun_inet libvirtd +%libvirt_daemon_systemd_preun_inet virtproxyd +%libvirt_daemon_systemd_preun virtlogd +%libvirt_daemon_systemd_preun virtlockdd %postun daemon /bin/systemctl daemon-reload >/dev/null 2>&1 || : @@ -1341,7 +1364,8 @@ if [ $1 -ge 1 ] ; then fi %posttrans daemon -if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then +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 @@ -1377,18 +1401,156 @@ if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then fi fi fi -rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : + +%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 +%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} +%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, @@ -1427,15 +1589,13 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml # Make sure libvirt picks up the new network defininiton - mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : - touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : + %libvirt_daemon_schedule_restart libvirtd + %libvirt_daemon_schedule_restart virtnetworkd fi %posttrans daemon-config-network -if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -fi -rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : +%libvirt_daemon_perform_restart libvirtd +%libvirt_daemon_perform_restart virtnetworkd %post daemon-config-nwfilter for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do @@ -1446,15 +1606,12 @@ for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do fi done # Make sure libvirt picks up the new nwfilter defininitons -mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : -touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : +%libvirt_daemon_schedule_restart libvirtd +%libvirt_daemon_schedule_restart virtnwfilterd %posttrans daemon-config-nwfilter -if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -fi -rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : - +%libvirt_daemon_perform_restart libvirtd +%libvirt_daemon_perform_restart virtnwfilterd %if %{with_qemu} %pre daemon-driver-qemu @@ -1941,6 +2098,13 @@ exit 0 %changelog +* 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)