diff --git a/.gitignore b/.gitignore index 5ab37f0..3878653 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libvirt-8.5.0.tar.xz +SOURCES/libvirt-9.5.0.tar.xz diff --git a/.libvirt.metadata b/.libvirt.metadata index 047ffb5..ad362aa 100644 --- a/.libvirt.metadata +++ b/.libvirt.metadata @@ -1 +1 @@ -d5fc6173368e7c32cd87d6c8e3c9cfd9d5622860 SOURCES/libvirt-8.5.0.tar.xz +472f6871651d8d3b41b2a2602adfcdb18629049d SOURCES/libvirt-9.5.0.tar.xz diff --git a/SOURCES/libvirt-Revert-qemu_passt-Actually-use-logfd.patch b/SOURCES/libvirt-Revert-qemu_passt-Actually-use-logfd.patch new file mode 100644 index 0000000..9644786 --- /dev/null +++ b/SOURCES/libvirt-Revert-qemu_passt-Actually-use-logfd.patch @@ -0,0 +1,38 @@ +From f3e5bf77bc6f591e5799ae9de36498df5c2a1811 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Michal Privoznik +Date: Tue, 1 Aug 2023 16:18:47 +0200 +Subject: [PATCH] Revert "qemu_passt: Actually use @logfd" + +This reverts commit 83686f1eea1a001a37a92f2c054ffb2689c43a40. + +This is needed only so that the next revert is clean. + +Signed-off-by: Michal Privoznik +Reviewed-by: Martin Kletzander +(cherry picked from commit bc9a254dc72b6904e8368c3fea3ab49b7238ff34) +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2209191 +Signed-off-by: Michal Privoznik +--- + src/qemu/qemu_passt.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c +index 3679bf75fc..25b22d8ad9 100644 +--- a/src/qemu/qemu_passt.c ++++ b/src/qemu/qemu_passt.c +@@ -204,9 +204,9 @@ qemuPasstStart(virDomainObj *vm, + /* The logFile location is not restricted to a per-domain directory. It + * can be anywhere. Pre-create it as passt may not have enough perms to + * do so. */ +- if ((logfd = qemuDomainOpenFile(cfg, vm->def, net->backend.logFile, +- O_CREAT | O_TRUNC | O_APPEND | O_RDWR, +- &needUnlink)) < 0) { ++ if (qemuDomainOpenFile(cfg, vm->def, net->backend.logFile, ++ O_CREAT | O_TRUNC | O_APPEND | O_RDWR, ++ &needUnlink) < 0) { + return -1; + } + +-- +2.41.0 diff --git a/SOURCES/libvirt-Revert-qemu_passt-Precreate-passt-logfile.patch b/SOURCES/libvirt-Revert-qemu_passt-Precreate-passt-logfile.patch new file mode 100644 index 0000000..32c2d6b --- /dev/null +++ b/SOURCES/libvirt-Revert-qemu_passt-Precreate-passt-logfile.patch @@ -0,0 +1,148 @@ +From 8897c7d63f763bf9b59f7e79ec6b2f9caf84823b Mon Sep 17 00:00:00 2001 +Message-ID: <8897c7d63f763bf9b59f7e79ec6b2f9caf84823b.1691014499.git.jdenemar@redhat.com> +From: Michal Privoznik +Date: Tue, 1 Aug 2023 16:20:58 +0200 +Subject: [PATCH] Revert "qemu_passt: Precreate passt logfile" + +This reverts commit 8511b96a319836700b4829816cdae27c3630060d. + +Turns out, we need to do a bit more than just plain +qemuSecurityDomainSetPathLabel() which sets svirt_image_t. Passt +has its own SELinux policy and as a part of that they invent +passt_log_t for log files. Right now, I don't know how libvirt +could query that and even if I did, passt SELinux policy would +need to permit relabelling from svirt_t to passt_log_t, which it +doesn't [1]. + +Until these problems are addressed we shouldn't be pre-creating +the file as it puts users into way worse position - even +scenarios that used to work don't work. But then again - using +log file for passt is usually valuable for developers only and +not regular users. + +1: https://bugzilla.redhat.com/show_bug.cgi?id=2209191#c10 +Signed-off-by: Michal Privoznik +Reviewed-by: Martin Kletzander +(cherry picked from commit 99349ba18e726465215a71f28d2146a0a2adb65d) +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2209191 +Signed-off-by: Michal Privoznik +--- + src/qemu/qemu_passt.c | 40 +++++----------------------------------- + 1 file changed, 5 insertions(+), 35 deletions(-) + +diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c +index 25b22d8ad9..99636a3a49 100644 +--- a/src/qemu/qemu_passt.c ++++ b/src/qemu/qemu_passt.c +@@ -20,8 +20,6 @@ + + #include + +-#include +- + #include "qemu_dbus.h" + #include "qemu_extdevice.h" + #include "qemu_security.h" +@@ -138,13 +136,9 @@ void + qemuPasstStop(virDomainObj *vm, + virDomainNetDef *net) + { +- qemuDomainObjPrivate *priv = vm->privateData; +- virQEMUDriver *driver = priv->driver; + g_autofree char *pidfile = qemuPasstCreatePidFilename(vm, net); + g_autofree char *passtSocketName = qemuPasstCreateSocketPath(vm, net); + +- qemuSecurityDomainRestorePathLabel(driver, vm, net->backend.logFile); +- + qemuPasstKill(pidfile, passtSocketName); + } + +@@ -172,12 +166,10 @@ qemuPasstStart(virDomainObj *vm, + { + qemuDomainObjPrivate *priv = vm->privateData; + virQEMUDriver *driver = priv->driver; +- g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); + g_autofree char *passtSocketName = qemuPasstCreateSocketPath(vm, net); + g_autoptr(virCommand) cmd = NULL; + g_autofree char *pidfile = qemuPasstCreatePidFilename(vm, net); + char macaddr[VIR_MAC_STRING_BUFLEN]; +- bool needUnlink = false; + size_t i; + + cmd = virCommandNew(PASST); +@@ -199,25 +191,8 @@ qemuPasstStart(virDomainObj *vm, + if (net->sourceDev) + virCommandAddArgList(cmd, "--interface", net->sourceDev, NULL); + +- if (net->backend.logFile) { +- VIR_AUTOCLOSE logfd = -1; +- /* The logFile location is not restricted to a per-domain directory. It +- * can be anywhere. Pre-create it as passt may not have enough perms to +- * do so. */ +- if (qemuDomainOpenFile(cfg, vm->def, net->backend.logFile, +- O_CREAT | O_TRUNC | O_APPEND | O_RDWR, +- &needUnlink) < 0) { +- return -1; +- } +- +- if (qemuSecurityDomainSetPathLabel(driver, vm, +- net->backend.logFile, false) < 0) { +- goto error; +- } +- +- /* Worse, passt deliberately doesn't support FD passing. */ ++ if (net->backend.logFile) + virCommandAddArgList(cmd, "--log-file", net->backend.logFile, NULL); +- } + + /* Add IP address info */ + for (i = 0; i < net->guestIP.nips; i++) { +@@ -228,7 +203,7 @@ qemuPasstStart(virDomainObj *vm, + * a single IPv4 and single IPv6 address + */ + if (!(addr = virSocketAddrFormat(&ip->address))) +- goto error; ++ return -1; + + virCommandAddArgList(cmd, "--address", addr, NULL); + +@@ -256,14 +231,14 @@ qemuPasstStart(virDomainObj *vm, + /* validation guarantees this will never happen */ + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Invalid portForward proto value %1$u"), pf->proto); +- goto error; ++ return -1; + } + + if (VIR_SOCKET_ADDR_VALID(&pf->address)) { + g_autofree char *addr = NULL; + + if (!(addr = virSocketAddrFormat(&pf->address))) +- goto error; ++ return -1; + + virBufferAddStr(&buf, addr); + emitsep = true; +@@ -309,7 +284,7 @@ qemuPasstStart(virDomainObj *vm, + + + if (qemuExtDeviceLogCommand(driver, vm, cmd, "passt") < 0) +- goto error; ++ return -1; + + if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, true, NULL) < 0) + goto error; +@@ -317,11 +292,6 @@ qemuPasstStart(virDomainObj *vm, + return 0; + + error: +- if (needUnlink && unlink(net->backend.logFile) < 0) { +- VIR_WARN("Unable to unlink '%s': %s", +- net->backend.logFile, g_strerror(errno)); +- } +- + qemuPasstKill(pidfile, passtSocketName); + return -1; + } +-- +2.41.0 diff --git a/SOURCES/libvirt-conf-Don-t-default-to-raw-format-for-loader-NVRAM.patch b/SOURCES/libvirt-conf-Don-t-default-to-raw-format-for-loader-NVRAM.patch new file mode 100644 index 0000000..47f23ed --- /dev/null +++ b/SOURCES/libvirt-conf-Don-t-default-to-raw-format-for-loader-NVRAM.patch @@ -0,0 +1,392 @@ +From 7708f08af4581f11d9bc3c3cdf858e55ebdb5a6c Mon Sep 17 00:00:00 2001 +Message-ID: <7708f08af4581f11d9bc3c3cdf858e55ebdb5a6c.1692951632.git.jdenemar@redhat.com> +From: Andrea Bolognani +Date: Tue, 16 May 2023 19:50:50 +0200 +Subject: [PATCH] conf: Don't default to raw format for loader/NVRAM + +Due to the way the information is stored by the XML parser, we've +had this quirk where specifying any information about the loader +or NVRAM would implicitly set its format to raw. That is, + + /path/to/guest_VARS.fd + +would effectively be interpreted as + + /path/to/guest_VARS.fd + +forcing the use of raw format firmware even when qcow2 format +would normally be preferred based on the ordering of firmware +descriptors. This behavior can be worked around in a number of +ways, but it's fairly unintuitive. + +In order to remove this quirk, move the selection of the default +firmware format from the parser down to the individual drivers. + +Most drivers only support raw firmware images, so they can +unconditionally set the format early and be done with it; the +QEMU driver, however, supports multiple formats and so in that +case we want this default to be applied as late as possible, +when we have already ruled out the possibility of using qcow2 +formatted firmware images. + +Signed-off-by: Andrea Bolognani +Reviewed-by: Michal Privoznik +(cherry picked from commit 10a8997cbb402f7edb9f970af70feee2fc256a1c) + +https://bugzilla.redhat.com/show_bug.cgi?id=2196178 + +Signed-off-by: Andrea Bolognani +--- + src/bhyve/bhyve_firmware.c | 3 ++ + src/conf/domain_conf.c | 21 ++++++---- + src/libxl/libxl_conf.c | 15 +++++--- + src/libxl/xen_xl.c | 2 + + src/libxl/xen_xm.c | 1 + + src/qemu/qemu_firmware.c | 27 +++++++++++-- + ...uto-efi-format-mismatch.x86_64-latest.args | 38 +++++++++++++++++++ + ...auto-efi-format-mismatch.x86_64-latest.err | 1 - + .../firmware-auto-efi-format-mismatch.xml | 2 +- + ...oader-secure-abi-update.x86_64-latest.args | 8 ++-- + tests/qemuxml2argvtest.c | 2 +- + ...loader-secure-abi-update.x86_64-latest.xml | 4 +- + 12 files changed, 98 insertions(+), 26 deletions(-) + create mode 100644 tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.args + delete mode 100644 tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.err + +diff --git a/src/bhyve/bhyve_firmware.c b/src/bhyve/bhyve_firmware.c +index 57ab9c7a82..8aaf05dc62 100644 +--- a/src/bhyve/bhyve_firmware.c ++++ b/src/bhyve/bhyve_firmware.c +@@ -80,6 +80,9 @@ bhyveFirmwareFillDomain(bhyveConn *driver, + if (!def->os.loader) + def->os.loader = virDomainLoaderDefNew(); + ++ if (!def->os.loader->format) ++ def->os.loader->format = VIR_STORAGE_FILE_RAW; ++ + if (def->os.loader->format != VIR_STORAGE_FILE_RAW) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Unsupported loader format '%1$s'"), +diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c +index 5ac5c0b771..8fa0a6dc73 100644 +--- a/src/conf/domain_conf.c ++++ b/src/conf/domain_conf.c +@@ -3728,7 +3728,6 @@ virDomainLoaderDefNew(void) + virDomainLoaderDef *def = NULL; + + def = g_new0(virDomainLoaderDef, 1); +- def->format = VIR_STORAGE_FILE_RAW; + + return def; + } +@@ -16771,10 +16770,11 @@ virDomainLoaderDefParseXMLNvram(virDomainLoaderDef *loader, + + if (virXMLPropEnumDefault(nvramNode, "format", + virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE, +- &format, VIR_STORAGE_FILE_RAW) < 0) { ++ &format, VIR_STORAGE_FILE_NONE) < 0) { + return -1; + } +- if (format != VIR_STORAGE_FILE_RAW && ++ if (format && ++ format != VIR_STORAGE_FILE_RAW && + format != VIR_STORAGE_FILE_QCOW2) { + virReportError(VIR_ERR_XML_ERROR, + _("Unsupported nvram format '%1$s'"), +@@ -16860,10 +16860,11 @@ virDomainLoaderDefParseXMLLoader(virDomainLoaderDef *loader, + + if (virXMLPropEnumDefault(loaderNode, "format", + virStorageFileFormatTypeFromString, VIR_XML_PROP_NONE, +- &format, VIR_STORAGE_FILE_RAW) < 0) { ++ &format, VIR_STORAGE_FILE_NONE) < 0) { + return -1; + } +- if (format != VIR_STORAGE_FILE_RAW && ++ if (format && ++ format != VIR_STORAGE_FILE_RAW && + format != VIR_STORAGE_FILE_QCOW2) { + virReportError(VIR_ERR_XML_ERROR, + _("Unsupported loader format '%1$s'"), +@@ -16894,7 +16895,9 @@ virDomainLoaderDefParseXML(virDomainLoaderDef *loader, + loaderNode) < 0) + return -1; + +- if (loader->nvram && loader->format != loader->nvram->format) { ++ if (loader->nvram && ++ loader->format && loader->nvram->format && ++ loader->format != loader->nvram->format) { + virReportError(VIR_ERR_XML_ERROR, + _("Format mismatch: loader.format='%1$s' nvram.format='%2$s'"), + virStorageFileFormatTypeToString(loader->format), +@@ -26224,7 +26227,8 @@ virDomainLoaderDefFormatNvram(virBuffer *buf, + return -1; + } + +- if (src->format != VIR_STORAGE_FILE_RAW) { ++ if (src->format && ++ src->format != VIR_STORAGE_FILE_RAW) { + virBufferEscapeString(&attrBuf, " format='%s'", + virStorageFileFormatTypeToString(src->format)); + } +@@ -26262,7 +26266,8 @@ virDomainLoaderDefFormat(virBuffer *buf, + virTristateBoolTypeToString(loader->stateless)); + } + +- if (loader->format != VIR_STORAGE_FILE_RAW) { ++ if (loader->format && ++ loader->format != VIR_STORAGE_FILE_RAW) { + virBufferEscapeString(&loaderAttrBuf, " format='%s'", + virStorageFileFormatTypeToString(loader->format)); + } +diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c +index a1c76935b6..14ad320023 100644 +--- a/src/libxl/libxl_conf.c ++++ b/src/libxl/libxl_conf.c +@@ -654,11 +654,16 @@ libxlMakeDomBuildInfo(virDomainDef *def, + b_info->u.hvm.system_firmware = g_strdup(def->os.loader->path); + } + +- if (def->os.loader && def->os.loader->format != VIR_STORAGE_FILE_RAW) { +- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, +- _("Unsupported loader format '%1$s'"), +- virStorageFileFormatTypeToString(def->os.loader->format)); +- return -1; ++ if (def->os.loader) { ++ if (!def->os.loader->format) ++ def->os.loader->format = VIR_STORAGE_FILE_RAW; ++ ++ if (def->os.loader->format != VIR_STORAGE_FILE_RAW) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, ++ _("Unsupported loader format '%1$s'"), ++ virStorageFileFormatTypeToString(def->os.loader->format)); ++ return -1; ++ } + } + + if (def->emulator) { +diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c +index 1cc42fa59f..ab1941454d 100644 +--- a/src/libxl/xen_xl.c ++++ b/src/libxl/xen_xl.c +@@ -115,6 +115,7 @@ xenParseXLOS(virConf *conf, virDomainDef *def, virCaps *caps) + + if (bios && STREQ(bios, "ovmf")) { + def->os.loader = virDomainLoaderDefNew(); ++ def->os.loader->format = VIR_STORAGE_FILE_RAW; + def->os.loader->type = VIR_DOMAIN_LOADER_TYPE_PFLASH; + def->os.loader->readonly = VIR_TRISTATE_BOOL_YES; + if (bios_path) +@@ -126,6 +127,7 @@ xenParseXLOS(virConf *conf, virDomainDef *def, virCaps *caps) + if (caps->guests[i]->ostype == VIR_DOMAIN_OSTYPE_HVM && + caps->guests[i]->arch.id == def->os.arch) { + def->os.loader = virDomainLoaderDefNew(); ++ def->os.loader->format = VIR_STORAGE_FILE_RAW; + def->os.loader->path = g_strdup(caps->guests[i]->arch.defaultInfo.loader); + } + } +diff --git a/src/libxl/xen_xm.c b/src/libxl/xen_xm.c +index 0031d6cbc6..5705a5ec0c 100644 +--- a/src/libxl/xen_xm.c ++++ b/src/libxl/xen_xm.c +@@ -43,6 +43,7 @@ xenParseXMOS(virConf *conf, virDomainDef *def) + g_autofree char *boot = NULL; + + def->os.loader = virDomainLoaderDefNew(); ++ def->os.loader->format = VIR_STORAGE_FILE_RAW; + + if (xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0) + return -1; +diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c +index ebaf32cf71..3dcd139a47 100644 +--- a/src/qemu/qemu_firmware.c ++++ b/src/qemu/qemu_firmware.c +@@ -1082,6 +1082,11 @@ qemuFirmwareEnsureNVRAM(virDomainDef *def, + if (loader->stateless == VIR_TRISTATE_BOOL_YES) + return; + ++ /* If the NVRAM format hasn't been set yet, inherit the same as ++ * the loader */ ++ if (loader->nvram && !loader->nvram->format) ++ loader->nvram->format = loader->format; ++ + /* If the source already exists and is fully specified, including + * the path, leave it alone */ + if (loader->nvram && loader->nvram->path) +@@ -1328,7 +1333,7 @@ qemuFirmwareMatchDomain(const virDomainDef *def, + flash->executable.format); + return false; + } +- if (loader && ++ if (loader && loader->format && + STRNEQ(flash->executable.format, virStorageFileFormatTypeToString(loader->format))) { + VIR_DEBUG("Discarding loader with mismatching flash format '%s' != '%s'", + flash->executable.format, +@@ -1342,7 +1347,7 @@ qemuFirmwareMatchDomain(const virDomainDef *def, + flash->nvram_template.format); + return false; + } +- if (loader && loader->nvram && ++ if (loader && loader->nvram && loader->nvram->format && + STRNEQ(flash->nvram_template.format, virStorageFileFormatTypeToString(loader->nvram->format))) { + VIR_DEBUG("Discarding loader with mismatching nvram template format '%s' != '%s'", + flash->nvram_template.format, +@@ -1630,7 +1635,8 @@ qemuFirmwareFillDomainLegacy(virQEMUDriver *driver, + return 1; + } + +- if (loader->format != VIR_STORAGE_FILE_RAW) { ++ if (loader->format && ++ loader->format != VIR_STORAGE_FILE_RAW) { + VIR_DEBUG("Ignoring legacy entries for loader with flash format '%s'", + virStorageFileFormatTypeToString(loader->format)); + return 1; +@@ -1793,6 +1799,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, + return -1; + + if (loader && ++ loader->format && + loader->format != VIR_STORAGE_FILE_RAW && + loader->format != VIR_STORAGE_FILE_QCOW2) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, +@@ -1801,6 +1808,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, + return -1; + } + if (nvram && ++ nvram->format && + nvram->format != VIR_STORAGE_FILE_RAW && + nvram->format != VIR_STORAGE_FILE_QCOW2) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, +@@ -1831,8 +1839,19 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, + * CODE:NVRAM pairs that might have been provided at build + * time */ + if (!autoSelection) { +- if (qemuFirmwareFillDomainLegacy(driver, def) < 0) ++ if ((ret = qemuFirmwareFillDomainLegacy(driver, def)) < 0) + return -1; ++ ++ /* If we've gotten this far without finding a match, it ++ * means that we're dealing with a set of completely ++ * custom paths. In that case, unless the user has ++ * specified otherwise, we have to assume that they're in ++ * raw format */ ++ if (ret == 1) { ++ if (loader && !loader->format) { ++ loader->format = VIR_STORAGE_FILE_RAW; ++ } ++ } + } else { + virReportError(VIR_ERR_OPERATION_FAILED, + _("Unable to find any firmware to satisfy '%1$s'"), +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.args +new file mode 100644 +index 0000000000..e8d7d580f7 +--- /dev/null ++++ b/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.args +@@ -0,0 +1,38 @@ ++LC_ALL=C \ ++PATH=/bin \ ++HOME=/var/lib/libvirt/qemu/domain--1-guest \ ++USER=test \ ++LOGNAME=test \ ++XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ ++XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ ++XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ ++/usr/bin/qemu-system-x86_64 \ ++-name guest=guest,debug-threads=on \ ++-S \ ++-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ ++-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ ++-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \ ++-blockdev '{"driver":"file","filename":"/path/to/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ ++-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \ ++-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ ++-accel kvm \ ++-cpu qemu64 \ ++-global driver=cfi.pflash01,property=secure,value=on \ ++-m size=1048576k \ ++-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ ++-overcommit mem-lock=off \ ++-smp 1,sockets=1,cores=1,threads=1 \ ++-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ ++-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 \ ++-audiodev '{"id":"audio1","driver":"none"}' \ ++-global ICH9-LPC.noreboot=off \ ++-watchdog-action reset \ ++-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ ++-msg timestamp=on +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.err +deleted file mode 100644 +index abfdfc4357..0000000000 +--- a/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.x86_64-latest.err ++++ /dev/null +@@ -1 +0,0 @@ +-XML error: Format mismatch: loader.format='qcow2' nvram.format='raw' +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.xml b/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.xml +index 6613d9e9a9..75fa44fd20 100644 +--- a/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.xml ++++ b/tests/qemuxml2argvdata/firmware-auto-efi-format-mismatch.xml +@@ -6,7 +6,7 @@ + + hvm + +- /path/to/guest_VARS.fd ++ /path/to/guest_VARS.qcow2 + + + +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.args +index 48f357cbf9..790fb619e8 100644 +--- a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.args ++++ b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.args +@@ -10,10 +10,10 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ + -name guest=guest,debug-threads=on \ + -S \ + -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +--blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +--blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ ++-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ ++-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' \ ++-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ ++-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' \ + -machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ + -accel kvm \ + -cpu qemu64 \ +diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c +index 370b26a023..9439a5a1e6 100644 +--- a/tests/qemuxml2argvtest.c ++++ b/tests/qemuxml2argvtest.c +@@ -1117,7 +1117,7 @@ mymain(void) + DO_TEST_CAPS_LATEST("firmware-auto-efi-format-nvram-qcow2-network-nbd"); + DO_TEST_CAPS_ARCH_LATEST("firmware-auto-efi-format-loader-raw", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("firmware-auto-efi-format-loader-raw-abi-update", "aarch64"); +- DO_TEST_CAPS_LATEST_PARSE_ERROR("firmware-auto-efi-format-mismatch"); ++ DO_TEST_CAPS_LATEST("firmware-auto-efi-format-mismatch"); + + DO_TEST_NOCAPS("clock-utc"); + DO_TEST_NOCAPS("clock-localtime"); +diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.xml +index 332d931ba1..f4ff7a0fc2 100644 +--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.xml ++++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure-abi-update.x86_64-latest.xml +@@ -10,8 +10,8 @@ + + + +- /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd +- /var/lib/libvirt/qemu/nvram/guest_VARS.fd ++ /usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2 ++ /var/lib/libvirt/qemu/nvram/guest_VARS.qcow2 + + + +-- +2.42.0 diff --git a/SOURCES/libvirt-conf-domcaps-Add-async-teardown-domain-capability.patch b/SOURCES/libvirt-conf-domcaps-Add-async-teardown-domain-capability.patch new file mode 100644 index 0000000..ab6ada5 --- /dev/null +++ b/SOURCES/libvirt-conf-domcaps-Add-async-teardown-domain-capability.patch @@ -0,0 +1,1011 @@ +From f2c5bbfda0b2fb54cf65917f6c5b72d27c9a9813 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Boris Fiuczynski +Date: Mon, 17 Jul 2023 17:12:08 +0200 +Subject: [PATCH] conf: domcaps: Add 'async-teardown' domain capability + +Add async-teardown to the features list in domain capabilities allowing +high level management to introspect the availability of the asynchronous +teardown feature. + +Signed-off-by: Boris Fiuczynski +Reviewed-by: Michal Privoznik +(cherry picked from commit aece25f66517a327c2a6bde4d06b432d415ed7da) + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2168499 + +Signed-off-by: Boris Fiuczynski +--- + docs/formatdomaincaps.rst | 6 ++++++ + src/conf/domain_capabilities.c | 1 + + src/conf/domain_capabilities.h | 1 + + src/conf/schemas/domaincaps.rng | 9 +++++++++ + src/qemu/qemu_capabilities.c | 1 + + tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml | 1 + + tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 1 + + tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 1 + + tests/domaincapsdata/qemu_4.2.0.s390x.xml | 1 + + tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0-tcg-virt.riscv64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0-virt.riscv64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.1.0.sparc.xml | 1 + + tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 + + tests/domaincapsdata/qemu_5.2.0.s390x.xml | 1 + + tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml | 1 + + tests/domaincapsdata/qemu_6.0.0.aarch64.xml | 1 + + tests/domaincapsdata/qemu_6.0.0.s390x.xml | 1 + + tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml | 1 + + tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 1 + + tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 + + tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml | 1 + + tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml | 1 + + tests/domaincapsdata/qemu_7.0.0.aarch64.xml | 1 + + tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 + + tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.1.0.ppc64.xml | 1 + + tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml | 1 + + tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml | 1 + + tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_7.2.0.ppc.xml | 1 + + tests/domaincapsdata/qemu_7.2.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml | 1 + + tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml | 1 + + tests/domaincapsdata/qemu_8.0.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_8.1.0.s390x.xml | 1 + + tests/domaincapsdata/qemu_8.1.0.x86_64.xml | 1 + + 74 files changed, 87 insertions(+) + +diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst +index 9dae941d18..0f8015d4dd 100644 +--- a/docs/formatdomaincaps.rst ++++ b/docs/formatdomaincaps.rst +@@ -647,6 +647,7 @@ capabilities. All features occur as children of the main ``features`` element. + + + ++ + + 47 + 1 +@@ -711,6 +712,11 @@ presence of the ``backup`` element even if ``supported='no'`` implies that the + ``VIR_DOMAIN_UNDEFINE_CHECKPOINTS_METADATA`` flag for ``virDomainUndefine`` is + supported. + ++async-teardown ++^^^^^^^^^^^^^^ ++ ++Reports whether the asynchronous teardown feature can be enabled. ++ + s390-pv capability + ^^^^^^^^^^^^^^^^^^ + +diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c +index c076af7808..2fa5756184 100644 +--- a/src/conf/domain_capabilities.c ++++ b/src/conf/domain_capabilities.c +@@ -40,6 +40,7 @@ VIR_ENUM_IMPL(virDomainCapsFeature, + "genid", + "backingStoreInput", + "backup", ++ "async-teardown", + "s390-pv", + ); + +diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h +index 2624269eab..01bcfa2e39 100644 +--- a/src/conf/domain_capabilities.h ++++ b/src/conf/domain_capabilities.h +@@ -248,6 +248,7 @@ typedef enum { + VIR_DOMAIN_CAPS_FEATURE_GENID, + VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT, + VIR_DOMAIN_CAPS_FEATURE_BACKUP, ++ VIR_DOMAIN_CAPS_FEATURE_ASYNC_TEARDOWN, + VIR_DOMAIN_CAPS_FEATURE_S390_PV, + + VIR_DOMAIN_CAPS_FEATURE_LAST +diff --git a/src/conf/schemas/domaincaps.rng b/src/conf/schemas/domaincaps.rng +index 19bd6f7128..99ef148d44 100644 +--- a/src/conf/schemas/domaincaps.rng ++++ b/src/conf/schemas/domaincaps.rng +@@ -300,6 +300,9 @@ + + + ++ ++ ++ + + + +@@ -315,6 +318,12 @@ + + + ++ ++ ++ ++ ++ ++ + + + +diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c +index c9f4b17208..338608f0a2 100644 +--- a/src/qemu/qemu_capabilities.c ++++ b/src/qemu/qemu_capabilities.c +@@ -6296,6 +6296,7 @@ static const struct virQEMUCapsDomainFeatureCapabilityTuple domCapsTuples[] = { + { VIR_DOMAIN_CAPS_FEATURE_GENID, QEMU_CAPS_DEVICE_VMGENID }, + { VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT, QEMU_CAPS_LAST }, + { VIR_DOMAIN_CAPS_FEATURE_BACKUP, QEMU_CAPS_INCREMENTAL_BACKUP }, ++ { VIR_DOMAIN_CAPS_FEATURE_ASYNC_TEARDOWN, QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN }, + }; + + +diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +index f408c2a969..f6c9622a56 100644 +--- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +@@ -248,6 +248,7 @@ + + + ++ + + + +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 4427634d7c..3e9485c7d0 100644 +--- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml +@@ -262,6 +262,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml +index 981a06856d..9aa1d946ae 100644 +--- a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml +@@ -194,6 +194,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml +index 981a06856d..9aa1d946ae 100644 +--- a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml +@@ -194,6 +194,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_4.2.0.ppc64.xml b/tests/domaincapsdata/qemu_4.2.0.ppc64.xml +index a3289573bd..770a67bff1 100644 +--- a/tests/domaincapsdata/qemu_4.2.0.ppc64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0.ppc64.xml +@@ -162,6 +162,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_4.2.0.s390x.xml b/tests/domaincapsdata/qemu_4.2.0.s390x.xml +index c35bed1326..da271825f9 100644 +--- a/tests/domaincapsdata/qemu_4.2.0.s390x.xml ++++ b/tests/domaincapsdata/qemu_4.2.0.s390x.xml +@@ -268,6 +268,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml +index cbe083f1f1..513ca3caf4 100644 +--- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml +@@ -248,6 +248,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml +index 6b68d4f2a5..64a6b7dea7 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml +@@ -250,6 +250,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg-virt.riscv64.xml b/tests/domaincapsdata/qemu_5.0.0-tcg-virt.riscv64.xml +index 20a8c9a583..7ee0dcf664 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-tcg-virt.riscv64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-tcg-virt.riscv64.xml +@@ -147,6 +147,7 @@ + + + ++ + + + +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 39b1b4c1f2..95366f3edf 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml +@@ -264,6 +264,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml +index f84aec44c9..c8cd609bc8 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml +@@ -207,6 +207,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.0.0-virt.riscv64.xml b/tests/domaincapsdata/qemu_5.0.0-virt.riscv64.xml +index 833cb4bb2e..1f0fc66f53 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-virt.riscv64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-virt.riscv64.xml +@@ -150,6 +150,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml +index f84aec44c9..c8cd609bc8 100644 +--- a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml +@@ -207,6 +207,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml +index 4b3f490942..c80fbb8ec6 100644 +--- a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml +@@ -169,6 +169,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +index 603d842dfe..c8338b0889 100644 +--- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +@@ -250,6 +250,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml +index cdbbe86ede..3f170d469f 100644 +--- a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml +@@ -251,6 +251,7 @@ + + + ++ + + + +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 8950900e72..097ffce9f9 100644 +--- a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml +@@ -264,6 +264,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.1.0.sparc.xml b/tests/domaincapsdata/qemu_5.1.0.sparc.xml +index 6f92de2b6c..7a04ea6c12 100644 +--- a/tests/domaincapsdata/qemu_5.1.0.sparc.xml ++++ b/tests/domaincapsdata/qemu_5.1.0.sparc.xml +@@ -133,6 +133,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml +index 1ef28a71e4..ba0785dcf9 100644 +--- a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml +@@ -251,6 +251,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml +index 46a3a44cdd..1474488d7b 100644 +--- a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml +@@ -251,6 +251,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml b/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml +index 20a8c9a583..7ee0dcf664 100644 +--- a/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml +@@ -147,6 +147,7 @@ + + + ++ + + + +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 edb622240e..ec89689a36 100644 +--- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml +@@ -264,6 +264,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml +index af01bdfbe9..a36255f6f8 100644 +--- a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml +@@ -207,6 +207,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml b/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml +index 833cb4bb2e..1f0fc66f53 100644 +--- a/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml +@@ -150,6 +150,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml +index af01bdfbe9..a36255f6f8 100644 +--- a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml +@@ -207,6 +207,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml +index b465ad1030..538b790ba3 100644 +--- a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml +@@ -169,6 +169,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0.s390x.xml b/tests/domaincapsdata/qemu_5.2.0.s390x.xml +index 9dbf118713..99faaad866 100644 +--- a/tests/domaincapsdata/qemu_5.2.0.s390x.xml ++++ b/tests/domaincapsdata/qemu_5.2.0.s390x.xml +@@ -270,6 +270,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml +index 09db834535..1b4f379bbb 100644 +--- a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml +@@ -251,6 +251,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml +index b1a2be10e6..b8e9a26e68 100644 +--- a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml +@@ -253,6 +253,7 @@ + + + ++ + + 47 + 1 +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 29b95a836f..2b99ae36b6 100644 +--- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml +@@ -267,6 +267,7 @@ + + + ++ + + 47 + 1 +diff --git a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml +index 67889c4572..010fc6916e 100644 +--- a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml ++++ b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml +@@ -209,6 +209,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml +index 67889c4572..010fc6916e 100644 +--- a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml ++++ b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml +@@ -209,6 +209,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.0.0.s390x.xml b/tests/domaincapsdata/qemu_6.0.0.s390x.xml +index f0a8b196f5..df3708f801 100644 +--- a/tests/domaincapsdata/qemu_6.0.0.s390x.xml ++++ b/tests/domaincapsdata/qemu_6.0.0.s390x.xml +@@ -271,6 +271,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml +index 693ae0a7f1..652cc0ef8d 100644 +--- a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml +@@ -253,6 +253,7 @@ + + + ++ + + 47 + 1 +diff --git a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml +index a161d6aa20..628684c171 100644 +--- a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml +@@ -254,6 +254,7 @@ + + + ++ + + + +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 7bfe6f802c..ab0aae0439 100644 +--- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml +@@ -267,6 +267,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml +index 8c4f8cc860..8f1a0bcb29 100644 +--- a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml +@@ -254,6 +254,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml +index 0449f562df..50be45c069 100644 +--- a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml +@@ -254,6 +254,7 @@ + + + ++ + + + +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 f15111c590..a670f306dd 100644 +--- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml +@@ -269,6 +269,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml +index 241e893df6..424f7cf606 100644 +--- a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml ++++ b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml +@@ -216,6 +216,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml +index 241e893df6..424f7cf606 100644 +--- a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml ++++ b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml +@@ -216,6 +216,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml +index a9f7aefbc9..94edf1878e 100644 +--- a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml ++++ b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml +@@ -168,6 +168,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml +index fa1f7a2316..6cd7ac6616 100644 +--- a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml +@@ -254,6 +254,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml b/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml +index bcabf66d2a..d51de8273f 100644 +--- a/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml ++++ b/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml +@@ -170,6 +170,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml +index e793278d41..e5f05ab1a7 100644 +--- a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml +@@ -255,6 +255,7 @@ + + + ++ + + + no +diff --git a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml +index 6ff9df5766..6e067c8c20 100644 +--- a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml +@@ -270,6 +270,7 @@ + + + ++ + + + no +diff --git a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml +index 6aa5e78612..51a579218f 100644 +--- a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml ++++ b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml +@@ -215,6 +215,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml +index 6aa5e78612..51a579218f 100644 +--- a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml ++++ b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml +@@ -215,6 +215,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml +index 78f8d3cac4..f8b72ce7af 100644 +--- a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml ++++ b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml +@@ -173,6 +173,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml +index 1d1505f757..603ad39077 100644 +--- a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml +@@ -255,6 +255,7 @@ + + + ++ + + + no +diff --git a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml +index 047763bd43..5cceec1882 100644 +--- a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml +@@ -254,6 +254,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml +index b8621b5efd..858085883f 100644 +--- a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml +@@ -268,6 +268,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.1.0.ppc64.xml b/tests/domaincapsdata/qemu_7.1.0.ppc64.xml +index f3a436d859..52a578a733 100644 +--- a/tests/domaincapsdata/qemu_7.1.0.ppc64.xml ++++ b/tests/domaincapsdata/qemu_7.1.0.ppc64.xml +@@ -166,6 +166,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml +index 95452bb0a4..de378e74c7 100644 +--- a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml +@@ -254,6 +254,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml b/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml +index d6dc93d957..ff25d4bffb 100644 +--- a/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml ++++ b/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml +@@ -177,6 +177,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml +index d0029c65da..3fba78a251 100644 +--- a/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml +@@ -260,6 +260,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml +index a5744e41fa..86079797c9 100644 +--- a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml ++++ b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml +@@ -258,6 +258,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml +index a5744e41fa..86079797c9 100644 +--- a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml +@@ -258,6 +258,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.2.0.ppc.xml b/tests/domaincapsdata/qemu_7.2.0.ppc.xml +index 59ace0a0b2..eee1859c1c 100644 +--- a/tests/domaincapsdata/qemu_7.2.0.ppc.xml ++++ b/tests/domaincapsdata/qemu_7.2.0.ppc.xml +@@ -152,6 +152,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_7.2.0.x86_64.xml b/tests/domaincapsdata/qemu_7.2.0.x86_64.xml +index fecb7e4a0a..52d6cfe929 100644 +--- a/tests/domaincapsdata/qemu_7.2.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_7.2.0.x86_64.xml +@@ -260,6 +260,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml +index ef2637ab26..efe9d3eb52 100644 +--- a/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml +@@ -261,6 +261,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml b/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml +index 5254d8807a..6ce952d910 100644 +--- a/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml ++++ b/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml +@@ -153,6 +153,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml +index cde1d70f09..1e2001ee09 100644 +--- a/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml +@@ -263,6 +263,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml b/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml +index 68aa0d6189..43de2072b9 100644 +--- a/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml ++++ b/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml +@@ -156,6 +156,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.0.0.x86_64.xml b/tests/domaincapsdata/qemu_8.0.0.x86_64.xml +index ebae9e34d6..04e63d752c 100644 +--- a/tests/domaincapsdata/qemu_8.0.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_8.0.0.x86_64.xml +@@ -261,6 +261,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml +index effa6f6630..f8165fe212 100644 +--- a/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml +@@ -262,6 +262,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml +index c36bac3fd2..ea9e085af5 100644 +--- a/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml +@@ -262,6 +262,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.1.0.s390x.xml b/tests/domaincapsdata/qemu_8.1.0.s390x.xml +index 6b78a718b0..d70b639503 100644 +--- a/tests/domaincapsdata/qemu_8.1.0.s390x.xml ++++ b/tests/domaincapsdata/qemu_8.1.0.s390x.xml +@@ -278,6 +278,7 @@ + + + ++ + + + +diff --git a/tests/domaincapsdata/qemu_8.1.0.x86_64.xml b/tests/domaincapsdata/qemu_8.1.0.x86_64.xml +index 48e9444deb..51a104798f 100644 +--- a/tests/domaincapsdata/qemu_8.1.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_8.1.0.x86_64.xml +@@ -262,6 +262,7 @@ + + + ++ + + + +-- +2.41.0 diff --git a/SOURCES/libvirt-docs-update-description-of-virsh-nodedev-detach.patch b/SOURCES/libvirt-docs-update-description-of-virsh-nodedev-detach.patch new file mode 100644 index 0000000..15a6cac --- /dev/null +++ b/SOURCES/libvirt-docs-update-description-of-virsh-nodedev-detach.patch @@ -0,0 +1,53 @@ +From bbfcf18f504b0eb165c0bbfe2f34b4e20d11c355 Mon Sep 17 00:00:00 2001 +From: Laine Stump +Date: Fri, 25 Aug 2023 00:09:54 -0400 +Subject: [PATCH] docs: update description of virsh nodedev-detach --driver + option + +--driver can now be used to specify a specific driver to bind to the +device being detached from the host driver (e.g. vfio-pci-igbvf), not +just the *type* of driver (e.g. "vfio" or "xen", which are unnecessary +anyway, since they are implicit in which hypervisor driver is in use) + +Signed-off-by: Laine Stump +Reviewed-by: Michal Privoznik +--- + docs/manpages/virsh.rst | 25 +++++++++++++++++-------- + 1 file changed, 17 insertions(+), 8 deletions(-) + +diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst +index 673812036d3..91e1d5de37d 100644 +--- a/docs/manpages/virsh.rst ++++ b/docs/manpages/virsh.rst +@@ -5388,14 +5388,23 @@ nodedev-detach + + nodedev-detach nodedev [--driver backend_driver] + +-Detach *nodedev* from the host, so that it can safely be used by +-guests via passthrough. This is reversed with +-``nodedev-reattach``, and is done automatically for managed devices. +- +-Different backend drivers expect the device to be bound to different +-dummy devices. For example, QEMU's "vfio" backend driver expects the +-device to be bound to vfio-pci. The *--driver* parameter can be used +-to specify the desired backend driver. ++Detach *nodedev* from the host driver and bind it to a special driver ++that provides the API needed by the hypervisor for assigning the ++device to a virtual machine (using in the domain XML ++definition). This is reversed with ``nodedev-reattach``, and is done ++automatically by the hypervisor driver for managed devices (those ++devices with "managed='yes'" in their XML definition). ++ ++Different hypervisors expect the device being assigned to be bound to ++different drivers. For example, QEMU's "vfio" backend requires the ++device to be bound to the driver "vfio-pci" or to a "VFIO variant" ++driver (this is a driver that supports the full API provided by ++vfio-pci, plus some other APIs to support things like live ++migration). The *--driver* parameter can be used to specify a ++particular driver (e.g. a device-specific VFIO variant driver) the ++device should be bound to. When *--driver* is omitted, the default ++driver for the hypervisor is used ("vfio-pci" for QEMU, "pciback" for ++Xen). + + + nodedev-dumpxml diff --git a/SOURCES/libvirt-node_device-Don-t-leak-error-message-buffer-from-virMdevctlListDefined-Active.patch b/SOURCES/libvirt-node_device-Don-t-leak-error-message-buffer-from-virMdevctlListDefined-Active.patch new file mode 100644 index 0000000..865c2df --- /dev/null +++ b/SOURCES/libvirt-node_device-Don-t-leak-error-message-buffer-from-virMdevctlListDefined-Active.patch @@ -0,0 +1,79 @@ +From f158b6573ac39bdd1ba36c3900e65afffe57f3ca Mon Sep 17 00:00:00 2001 +Message-ID: +From: Peter Krempa +Date: Wed, 19 Jul 2023 15:22:22 +0200 +Subject: [PATCH] node_device: Don't leak error message buffer from + virMdevctlListDefined|Active + +nodeDeviceUpdateMediatedDevices invokes virMdevctlListDefined and +virMdevctlListActive both of which were passed the same 'errmsg' buffer. + +Since virCommandSetErrorBuffer() always allocates the error buffer one +of them was leaked. + +Fix it by populating the 'errmsg' buffer only on failure of +virMdevctlListActive|Defined which invoke the command. + +Add a comment to nodeDeviceGetMdevctlListCommand reminding how +virCommandSetErrorBuffer() works. + +Fixes: 44a0f2f0c8f +Signed-off-by: Peter Krempa +Reviewed-by: Boris Fiuczynski + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2143158 + +(cherry picked from commit 7ca777cc09242cb3a30b12d5e0e396c6aaf1a5e7) +Signed-off-by: Jonathon Jongsma +--- + src/node_device/node_device_driver.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c +index 5dc45ddbb4..2ef9197adc 100644 +--- a/src/node_device/node_device_driver.c ++++ b/src/node_device/node_device_driver.c +@@ -1044,6 +1044,15 @@ virMdevctlSetAutostart(virNodeDeviceDef *def, bool autostart, char **errmsg) + } + + ++/** ++ * nodeDeviceGetMdevctlListCommand: ++ * @defined: list mdevctl entries with persistent config ++ * @output: filled with the output of mdevctl once invoked ++ * @errmsg: always allocated, optionally filled with error from 'mdevctl' ++ * ++ * Prepares a virCommand structure to invoke 'mdevctl' caller is responsible to ++ * free the buffers which are filled by the virCommand infrastructure. ++ */ + virCommand* + nodeDeviceGetMdevctlListCommand(bool defined, + char **output, +@@ -1624,9 +1633,11 @@ virMdevctlListDefined(virNodeDeviceDef ***devs, char **errmsg) + { + int status; + g_autofree char *output = NULL; +- g_autoptr(virCommand) cmd = nodeDeviceGetMdevctlListCommand(true, &output, errmsg); ++ g_autofree char *errbuf = NULL; ++ g_autoptr(virCommand) cmd = nodeDeviceGetMdevctlListCommand(true, &output, &errbuf); + + if (virCommandRun(cmd, &status) < 0 || status != 0) { ++ *errmsg = g_steal_pointer(&errbuf); + return -1; + } + +@@ -1642,9 +1653,11 @@ virMdevctlListActive(virNodeDeviceDef ***devs, char **errmsg) + { + int status; + g_autofree char *output = NULL; +- g_autoptr(virCommand) cmd = nodeDeviceGetMdevctlListCommand(false, &output, errmsg); ++ g_autofree char *errbuf = NULL; ++ g_autoptr(virCommand) cmd = nodeDeviceGetMdevctlListCommand(false, &output, &errbuf); + + if (virCommandRun(cmd, &status) < 0 || status != 0) { ++ *errmsg = g_steal_pointer(&errbuf); + return -1; + } + +-- +2.41.0 diff --git a/SOURCES/libvirt-node_device-support-binding-other-drivers-with-virNodeDevice.patch b/SOURCES/libvirt-node_device-support-binding-other-drivers-with-virNodeDevice.patch new file mode 100644 index 0000000..83d43b0 --- /dev/null +++ b/SOURCES/libvirt-node_device-support-binding-other-drivers-with-virNodeDevice.patch @@ -0,0 +1,178 @@ +From 24beaffec33efa3fa077d7b8596d97aa9a038a01 Mon Sep 17 00:00:00 2001 +From: Laine Stump +Date: Sun, 9 Jul 2023 00:37:45 -0400 +Subject: [PATCH] node_device: support binding other drivers with + virNodeDeviceDetachFlags() + +In the past, the only allowable values for the "driver" field of +virNodeDeviceDetachFlags() were "kvm" or "vfio" for the QEMU driver, +and "xen" for the libxl driver. Then "kvm" was deprecated and removed, +so the driver name became essentially irrelevant (because it is always +called via a particular hypervisor driver, and so the "xen" or "vfio" +can be (and almost always is) implied. + +With the advent of VFIO variant drivers, the ability to explicitly +specify a driver name once again becomes useful - it can be used to +name the exact VFIO driver that we want bound to the device in place +of vfio-pci, so this patch allows those other names to be passed down +the call chain, where the code in virpci.c can make use of them. + +The names "vfio", "kvm", and "xen" retain their special meaning, though: + + 1) because there may be some application or configuration that still + calls virNodeDeviceDetachFlags() with driverName="vfio", this + single value is substituted with the synonym of NULL, which means + "bind the default driver for this device and hypervisor". This + will currently result in the vfio-pci driver being bound to the + device. + + 2) in the case of the libxl driver, "xen" means to use the standard + driver used in the case of Xen ("pciback"). + + 3) "kvm" as a driver name always results in an error, as legacy KVM + device assignment was removed from the kernel around 10 years ago. + +Signed-off-by: Laine Stump +Reviewed-by: Michal Privoznik +--- + src/hypervisor/domain_driver.c | 11 ++++++----- + src/hypervisor/domain_driver.h | 2 ++ + src/libxl/libxl_driver.c | 3 ++- + src/qemu/qemu_driver.c | 33 +++++++++++++++++++-------------- + 4 files changed, 29 insertions(+), 20 deletions(-) + +diff --git a/src/hypervisor/domain_driver.c b/src/hypervisor/domain_driver.c +index a70f75f3ae8..d9469ad6f96 100644 +--- a/src/hypervisor/domain_driver.c ++++ b/src/hypervisor/domain_driver.c +@@ -462,6 +462,7 @@ virDomainDriverNodeDeviceReAttach(virNodeDevicePtr dev, + int + virDomainDriverNodeDeviceDetachFlags(virNodeDevicePtr dev, + virHostdevManager *hostdevMgr, ++ virPCIStubDriver driverType, + const char *driverName) + { + g_autoptr(virPCIDevice) pci = NULL; +@@ -471,8 +472,10 @@ virDomainDriverNodeDeviceDetachFlags(virNodeDevicePtr dev, + g_autoptr(virConnect) nodeconn = NULL; + g_autoptr(virNodeDevice) nodedev = NULL; + +- if (!driverName) ++ if (driverType == VIR_PCI_STUB_DRIVER_NONE) { ++ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("driver type not set")); + return -1; ++ } + + if (!(nodeconn = virGetConnectNodeDev())) + return -1; +@@ -504,10 +507,8 @@ virDomainDriverNodeDeviceDetachFlags(virNodeDevicePtr dev, + if (!pci) + return -1; + +- if (STREQ(driverName, "vfio")) +- virPCIDeviceSetStubDriverType(pci, VIR_PCI_STUB_DRIVER_VFIO); +- else if (STREQ(driverName, "xen")) +- virPCIDeviceSetStubDriverType(pci, VIR_PCI_STUB_DRIVER_XEN); ++ virPCIDeviceSetStubDriverType(pci, driverType); ++ virPCIDeviceSetStubDriverName(pci, driverName); + + return virHostdevPCINodeDeviceDetach(hostdevMgr, pci); + } +diff --git a/src/hypervisor/domain_driver.h b/src/hypervisor/domain_driver.h +index 4241c869320..9942f58fda1 100644 +--- a/src/hypervisor/domain_driver.h ++++ b/src/hypervisor/domain_driver.h +@@ -22,6 +22,7 @@ + + #include "node_device_conf.h" + #include "virhostdev.h" ++#include "virpci.h" + + char * + virDomainDriverGenerateRootHash(const char *drivername, +@@ -58,6 +59,7 @@ int virDomainDriverNodeDeviceReAttach(virNodeDevicePtr dev, + + int virDomainDriverNodeDeviceDetachFlags(virNodeDevicePtr dev, + virHostdevManager *hostdevMgr, ++ virPCIStubDriver driverType, + const char *driverName); + + int virDomainDriverAddIOThreadCheck(virDomainDef *def, +diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c +index 3d10f458508..079922dd32a 100644 +--- a/src/libxl/libxl_driver.c ++++ b/src/libxl/libxl_driver.c +@@ -5876,7 +5876,8 @@ libxlNodeDeviceDetachFlags(virNodeDevicePtr dev, + + /* virNodeDeviceDetachFlagsEnsureACL() is being called by + * virDomainDriverNodeDeviceDetachFlags() */ +- return virDomainDriverNodeDeviceDetachFlags(dev, hostdev_mgr, driverName); ++ return virDomainDriverNodeDeviceDetachFlags(dev, hostdev_mgr, ++ VIR_PCI_STUB_DRIVER_XEN, NULL); + } + + static int +diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c +index 73fa499e40d..5128b643642 100644 +--- a/src/qemu/qemu_driver.c ++++ b/src/qemu/qemu_driver.c +@@ -70,7 +70,6 @@ + #include "domain_driver.h" + #include "domain_postparse.h" + #include "domain_validate.h" +-#include "virpci.h" + #include "virpidfile.h" + #include "virprocess.h" + #include "libvirt_internal.h" +@@ -11407,24 +11406,28 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev, + + virCheckFlags(0, -1); + +- if (!driverName) +- driverName = "vfio"; +- +- /* Only the 'vfio' driver is supported and a special error message for +- * the previously supported 'kvm' driver is provided below. */ +- if (STRNEQ(driverName, "vfio") && STRNEQ(driverName, "kvm")) { +- virReportError(VIR_ERR_INVALID_ARG, +- _("unknown driver name '%1$s'"), driverName); +- return -1; +- } ++ /* For historical reasons, if driverName is "vfio", that is the ++ * same as NULL, i.e. the default vfio driver for this device ++ */ ++ if (STREQ_NULLABLE(driverName, "vfio")) ++ driverName = NULL; + +- if (STREQ(driverName, "kvm")) { ++ /* the "kvm" driver name was used a very long time ago to force ++ * "legacy KVM device assignment", which hasn't been supported in ++ * over 10 years. ++ */ ++ if (STREQ_NULLABLE(driverName, "kvm")) { + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", +- _("KVM device assignment is no longer " ++ _("'legacy KVM' device assignment is no longer " + "supported on this system")); + return -1; + } + ++ /* for any other driver, we can't know whether or not it is a VFIO ++ * driver until the device has been bound to it, so we will defer ++ * further validation until then. ++ */ ++ + if (!qemuHostdevHostSupportsPassthroughVFIO()) { + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("VFIO device assignment is currently not " +@@ -11434,7 +11437,9 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev, + + /* virNodeDeviceDetachFlagsEnsureACL() is being called by + * virDomainDriverNodeDeviceDetachFlags() */ +- return virDomainDriverNodeDeviceDetachFlags(dev, hostdev_mgr, driverName); ++ return virDomainDriverNodeDeviceDetachFlags(dev, hostdev_mgr, ++ VIR_PCI_STUB_DRIVER_VFIO, ++ driverName); + } + + static int diff --git a/SOURCES/libvirt-nodedev-refactor-mdevctl-thread-functions.patch b/SOURCES/libvirt-nodedev-refactor-mdevctl-thread-functions.patch new file mode 100644 index 0000000..dee64f0 --- /dev/null +++ b/SOURCES/libvirt-nodedev-refactor-mdevctl-thread-functions.patch @@ -0,0 +1,105 @@ +From 05230da856d2f016c21f49a406780fbe15f74c32 Mon Sep 17 00:00:00 2001 +Message-ID: <05230da856d2f016c21f49a406780fbe15f74c32.1689602377.git.jdenemar@redhat.com> +From: Jonathon Jongsma +Date: Wed, 5 Jul 2023 15:35:59 -0500 +Subject: [PATCH] nodedev: refactor mdevctl thread functions + +Factor out a new scheduleMdevctlUpdate() function so that we can re-use +it from other places. Now that other events can make it necessary to +re-query mdevctl for mdev updates, this function will be useful for +coalescing multiple updates in quick succession into a single mdevctl +query. + +Also rename a couple functions. The names weren't very descriptive of +their behavior. For example, the old scheduleMdevctlHandler() function +didn't actually schedule anything, it just started a thread. So rename +it to free up the 'schedule' name for the above refactored function. + +Signed-off-by: Jonathon Jongsma +Reviewed-by: Boris Fiuczynski +(cherry picked from commit 9b7fadc5dc33b85b597c95d944dc23c02c29c29f) + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2143158 + +Signed-off-by: Jonathon Jongsma +--- + src/node_device/node_device_udev.c | 36 ++++++++++++++++++++---------- + 1 file changed, 24 insertions(+), 12 deletions(-) + +diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c +index fce4212728..86ef4af728 100644 +--- a/src/node_device/node_device_udev.c ++++ b/src/node_device/node_device_udev.c +@@ -2075,7 +2075,7 @@ udevPCITranslateInit(bool privileged G_GNUC_UNUSED) + + + static void +-mdevctlHandlerThread(void *opaque G_GNUC_UNUSED) ++mdevctlUpdateThreadFunc(void *opaque G_GNUC_UNUSED) + { + udevEventData *priv = driver->privateData; + VIR_LOCK_GUARD lock = virLockGuardLock(&priv->mdevctlLock); +@@ -2086,7 +2086,7 @@ mdevctlHandlerThread(void *opaque G_GNUC_UNUSED) + + + static void +-scheduleMdevctlHandler(int timer G_GNUC_UNUSED, void *opaque) ++launchMdevctlUpdateThread(int timer G_GNUC_UNUSED, void *opaque) + { + udevEventData *priv = opaque; + virThread thread; +@@ -2096,7 +2096,7 @@ scheduleMdevctlHandler(int timer G_GNUC_UNUSED, void *opaque) + priv->mdevctlTimeout = -1; + } + +- if (virThreadCreateFull(&thread, false, mdevctlHandlerThread, ++ if (virThreadCreateFull(&thread, false, mdevctlUpdateThreadFunc, + "mdevctl-thread", false, NULL) < 0) { + virReportSystemError(errno, "%s", + _("failed to create mdevctl thread")); +@@ -2192,6 +2192,26 @@ mdevctlEnableMonitor(udevEventData *priv) + } + + ++/* Schedules an mdevctl update for 100ms in the future, canceling any existing ++ * timeout that may have been set. In this way, multiple update requests in ++ * quick succession can be collapsed into a single update. if @force is true, ++ * an update thread will be spawned immediately. */ ++static void ++scheduleMdevctlUpdate(udevEventData *data, ++ bool force) ++{ ++ if (!force) { ++ if (data->mdevctlTimeout > 0) ++ virEventRemoveTimeout(data->mdevctlTimeout); ++ data->mdevctlTimeout = virEventAddTimeout(100, launchMdevctlUpdateThread, ++ data, NULL); ++ return; ++ } ++ ++ launchMdevctlUpdateThread(-1, data); ++} ++ ++ + static void + mdevctlEventHandleCallback(GFileMonitor *monitor G_GNUC_UNUSED, + GFile *file, +@@ -2222,15 +2242,7 @@ mdevctlEventHandleCallback(GFileMonitor *monitor G_GNUC_UNUSED, + * configuration change, try to coalesce these changes by waiting for the + * CHANGES_DONE_HINT event. As a fallback, add a timeout to trigger the + * signal if that event never comes */ +- if (event_type != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT) { +- if (priv->mdevctlTimeout > 0) +- virEventRemoveTimeout(priv->mdevctlTimeout); +- priv->mdevctlTimeout = virEventAddTimeout(100, scheduleMdevctlHandler, +- priv, NULL); +- return; +- } +- +- scheduleMdevctlHandler(-1, priv); ++ scheduleMdevctlUpdate(priv, (event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)); + } + + +-- +2.41.0 diff --git a/SOURCES/libvirt-nodedev-report-mdev-persistence-properly.patch b/SOURCES/libvirt-nodedev-report-mdev-persistence-properly.patch new file mode 100644 index 0000000..39e53bc --- /dev/null +++ b/SOURCES/libvirt-nodedev-report-mdev-persistence-properly.patch @@ -0,0 +1,104 @@ +From c2150285aff9b308b969d5fc6f32f75db620dfe3 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Jonathon Jongsma +Date: Tue, 18 Jul 2023 14:47:49 -0500 +Subject: [PATCH] nodedev: report mdev persistence properly + +Since commit 44a0f2f0, we now query mdevctl for transient (active) mdevs +in order to gather attributes for the mdev. Unfortunately, this commit +introduced a regression because nodeDeviceUpdateMediatedDevice() assumed +that all mdevs returned from mdevctl were actually persistent mdevs but +we were using it to update transient mdevs. Refactor the function so +that we can use it to update both persistent and transient mdevs. + +Signed-off-by: Jonathon Jongsma +Reviewed-by: Michal Privoznik +Reviewed-by: Boris Fiuczynski + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2143158 + +(cherry picked from commit fa0d5f4ebc0aa178d9dea278914f9149a4c4af54) +Signed-off-by: Jonathon Jongsma +--- + src/node_device/node_device_driver.c | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c +index a2d0600560..5dc45ddbb4 100644 +--- a/src/node_device/node_device_driver.c ++++ b/src/node_device/node_device_driver.c +@@ -1339,11 +1339,12 @@ nodeDeviceDestroy(virNodeDevicePtr device) + /* takes ownership of @def and potentially frees it. @def should not be used + * after returning from this function */ + static int +-nodeDeviceUpdateMediatedDevice(virNodeDeviceDef *def) ++nodeDeviceUpdateMediatedDevice(virNodeDeviceDef *def, ++ bool defined) + { + virNodeDeviceObj *obj; + virObjectEvent *event; +- bool defined = false; ++ bool was_defined = false; + g_autoptr(virNodeDeviceDef) owned = def; + g_autofree char *name = g_strdup(owned->name); + +@@ -1359,13 +1360,13 @@ nodeDeviceUpdateMediatedDevice(virNodeDeviceDef *def) + bool changed; + virNodeDeviceDef *olddef = virNodeDeviceObjGetDef(obj); + +- defined = virNodeDeviceObjIsPersistent(obj); ++ was_defined = virNodeDeviceObjIsPersistent(obj); + /* Active devices contain some additional information (e.g. sysfs + * path) that is not provided by mdevctl, so re-use the existing + * definition and copy over new mdev data */ + changed = nodeDeviceDefCopyFromMdevctl(olddef, owned); + +- if (defined && !changed) { ++ if (was_defined && !changed) { + /* if this device was already defined and the definition + * hasn't changed, there's nothing to do for this device */ + virNodeDeviceObjEndAPI(&obj); +@@ -1373,11 +1374,11 @@ nodeDeviceUpdateMediatedDevice(virNodeDeviceDef *def) + } + } + +- /* all devices returned by virMdevctlListDefined() are persistent */ +- virNodeDeviceObjSetPersistent(obj, true); ++ if (defined) ++ virNodeDeviceObjSetPersistent(obj, true); + virNodeDeviceObjSetAutostart(obj, def->caps->data.mdev.autostart); + +- if (!defined) ++ if (!was_defined && defined) + event = virNodeDeviceEventLifecycleNew(name, + VIR_NODE_DEVICE_EVENT_DEFINED, + 0); +@@ -1447,7 +1448,7 @@ nodeDeviceDefineXML(virConnect *conn, + * have already received the uuid from virMdevctlDefine(), we can simply + * add the provisional device to the list and return it immediately and + * avoid this long delay. */ +- if (nodeDeviceUpdateMediatedDevice(g_steal_pointer(&def)) < 0) ++ if (nodeDeviceUpdateMediatedDevice(g_steal_pointer(&def), true) < 0) + return NULL; + + return virGetNodeDevice(conn, name); +@@ -1742,7 +1743,7 @@ nodeDeviceUpdateMediatedDevices(void) + removeMissingPersistentMdev, &data); + + for (i = 0; i < data.ndefs; i++) +- if (nodeDeviceUpdateMediatedDevice(defs[i]) < 0) ++ if (nodeDeviceUpdateMediatedDevice(defs[i], true) < 0) + return -1; + + /* Update active/transient mdev devices */ +@@ -1753,7 +1754,7 @@ nodeDeviceUpdateMediatedDevices(void) + } + + for (i = 0; i < act_ndefs; i++) +- if (nodeDeviceUpdateMediatedDevice(act_defs[i]) < 0) ++ if (nodeDeviceUpdateMediatedDevice(act_defs[i], false) < 0) + return -1; + + return 0; +-- +2.41.0 diff --git a/SOURCES/libvirt-nodedev-transient-mdev-update-on-nodeDeviceCreateXML.patch b/SOURCES/libvirt-nodedev-transient-mdev-update-on-nodeDeviceCreateXML.patch new file mode 100644 index 0000000..305f68d --- /dev/null +++ b/SOURCES/libvirt-nodedev-transient-mdev-update-on-nodeDeviceCreateXML.patch @@ -0,0 +1,50 @@ +From d993cec578f2bbb121dcacea6728cf34da14e62e Mon Sep 17 00:00:00 2001 +Message-ID: +From: Boris Fiuczynski +Date: Fri, 30 Jun 2023 13:34:00 +0200 +Subject: [PATCH] nodedev: transient mdev update on nodeDeviceCreateXML + +Update the optional mdev attributes by running an mdevctl update on a +new created nodedev object representing an mdev. + +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=2143158 + +(cherry picked from commit 37481aa1f15ece6b187b8fa219966f77648c813d) +Signed-off-by: Jonathon Jongsma +--- + src/node_device/node_device_udev.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c +index 4c37ec3189..fce4212728 100644 +--- a/src/node_device/node_device_udev.c ++++ b/src/node_device/node_device_udev.c +@@ -1757,12 +1757,20 @@ nodeStateCleanup(void) + static int + udevHandleOneDevice(struct udev_device *device) + { ++ virNodeDevCapType dev_cap_type; + const char *action = udev_device_get_action(device); + + VIR_DEBUG("udev action: '%s': %s", action, udev_device_get_syspath(device)); + +- if (STREQ(action, "add") || STREQ(action, "change")) +- return udevAddOneDevice(device); ++ if (STREQ(action, "add") || STREQ(action, "change")) { ++ int ret = udevAddOneDevice(device); ++ if (ret == 0 && ++ udevGetDeviceType(device, &dev_cap_type) == 0 && ++ dev_cap_type == VIR_NODE_DEV_CAP_MDEV) ++ if (nodeDeviceUpdateMediatedDevices() < 0) ++ VIR_WARN("mdevctl failed to update mediated devices"); ++ return ret; ++ } + + if (STREQ(action, "remove")) + return udevRemoveOneDevice(device); +-- +2.41.0 diff --git a/SOURCES/libvirt-nodedev-update-mdevs-from-the-mdevctl-thread.patch b/SOURCES/libvirt-nodedev-update-mdevs-from-the-mdevctl-thread.patch new file mode 100644 index 0000000..67c4486 --- /dev/null +++ b/SOURCES/libvirt-nodedev-update-mdevs-from-the-mdevctl-thread.patch @@ -0,0 +1,70 @@ +From 48813113774c7ff0ab1b43c1861b6495bb3ce830 Mon Sep 17 00:00:00 2001 +Message-ID: <48813113774c7ff0ab1b43c1861b6495bb3ce830.1689602377.git.jdenemar@redhat.com> +From: Jonathon Jongsma +Date: Thu, 6 Jul 2023 09:16:35 -0500 +Subject: [PATCH] nodedev: update mdevs from the mdevctl thread + +Rather than directly executing mdevctl from the udev event thread when +we determine that we need to re-query, schedule the mdevctl thread to +run. This also helps to coalesce multiple back-to-back updates into a +single one when there are multiple updates in a row or at startup when a +host has a very large number of mdevs. + +Signed-off-by: Jonathon Jongsma +Reviewed-by: Boris Fiuczynski +(cherry picked from commit 14026db9b0e25739ea30685bd643ff23aca30588) + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2143158 + +Signed-off-by: Jonathon Jongsma +--- + src/node_device/node_device_udev.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c +index 86ef4af728..6451574c1d 100644 +--- a/src/node_device/node_device_udev.c ++++ b/src/node_device/node_device_udev.c +@@ -1443,6 +1443,9 @@ udevGetDeviceDetails(struct udev_device *device, + } + + ++static void scheduleMdevctlUpdate(udevEventData *data, bool force); ++ ++ + static int + udevRemoveOneDeviceSysPath(const char *path) + { +@@ -1475,8 +1478,7 @@ udevRemoveOneDeviceSysPath(const char *path) + virNodeDeviceObjEndAPI(&obj); + + /* cannot check for mdev_types since they have already been removed */ +- if (nodeDeviceUpdateMediatedDevices() < 0) +- VIR_WARN("mdevctl failed to update mediated devices"); ++ scheduleMdevctlUpdate(driver->privateData, false); + + virObjectEventStateQueue(driver->nodeDeviceEventState, event); + return 0; +@@ -1604,8 +1606,8 @@ udevAddOneDevice(struct udev_device *device) + has_mdev_types = virNodeDeviceObjHasCap(obj, VIR_NODE_DEV_CAP_MDEV_TYPES); + virNodeDeviceObjEndAPI(&obj); + +- if (has_mdev_types && nodeDeviceUpdateMediatedDevices() < 0) +- VIR_WARN("mdevctl failed to update mediated devices"); ++ if (has_mdev_types) ++ scheduleMdevctlUpdate(driver->privateData, false); + + ret = 0; + +@@ -1767,8 +1769,7 @@ udevHandleOneDevice(struct udev_device *device) + if (ret == 0 && + udevGetDeviceType(device, &dev_cap_type) == 0 && + dev_cap_type == VIR_NODE_DEV_CAP_MDEV) +- if (nodeDeviceUpdateMediatedDevices() < 0) +- VIR_WARN("mdevctl failed to update mediated devices"); ++ scheduleMdevctlUpdate(driver->privateData, false); + return ret; + } + +-- +2.41.0 diff --git a/SOURCES/libvirt-qemu-Don-t-overwrite-NVRAM-template-for-legacy-firmware.patch b/SOURCES/libvirt-qemu-Don-t-overwrite-NVRAM-template-for-legacy-firmware.patch new file mode 100644 index 0000000..adb760f --- /dev/null +++ b/SOURCES/libvirt-qemu-Don-t-overwrite-NVRAM-template-for-legacy-firmware.patch @@ -0,0 +1,77 @@ +From a106b0bcb4fd652b9843257f799d9601151449b4 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Andrea Bolognani +Date: Fri, 26 May 2023 19:59:06 +0200 +Subject: [PATCH] qemu: Don't overwrite NVRAM template for legacy firmware + +Just because we have found a matching entry, it doesn't mean +that we should discard the information explicitly provided in +the domain XML. + +https://bugzilla.redhat.com/show_bug.cgi?id=2196178 +https://gitlab.com/libvirt/libvirt/-/issues/500 + +Signed-off-by: Andrea Bolognani +Reviewed-by: Michal Privoznik +(cherry picked from commit 4a49114ff47d4a9432d211200f734886f9ce200b) + +https://bugzilla.redhat.com/show_bug.cgi?id=2196178 + +Signed-off-by: Andrea Bolognani +--- + src/qemu/qemu_firmware.c | 26 +++++++++++++++++-- + ...efi-secboot-legacy-paths.x86_64-latest.xml | 2 +- + 2 files changed, 25 insertions(+), 3 deletions(-) + +diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c +index b1d342563b..a9437b5b95 100644 +--- a/src/qemu/qemu_firmware.c ++++ b/src/qemu/qemu_firmware.c +@@ -1609,8 +1609,30 @@ qemuFirmwareFillDomainLegacy(virQEMUDriver *driver, + loader->type = VIR_DOMAIN_LOADER_TYPE_PFLASH; + loader->readonly = VIR_TRISTATE_BOOL_YES; + +- VIR_FREE(loader->nvramTemplate); +- loader->nvramTemplate = g_strdup(cfg->firmwares[i]->nvram); ++ /* Only use the default template path if one hasn't been ++ * provided by the user. ++ * ++ * In addition to fully-custom templates, which are a valid ++ * use case, we could simply be in a situation where ++ * qemu.conf contains ++ * ++ * nvram = [ ++ * "/path/to/OVMF_CODE.secboot.fd:/path/to/OVMF_VARS.fd", ++ * "/path/to/OVMF_CODE.secboot.fd:/path/to/OVMF_VARS.secboot.fd" ++ * ] ++ * ++ * and the domain has been configured as ++ * ++ * ++ * /path/to/OVMF_CODE.secboot.fd ++ * ++ * ++ * ++ * In this case, the global default is to have Secure Boot ++ * disabled, but the domain configuration explicitly enables ++ * it, and we shouldn't overrule this choice */ ++ if (!loader->nvramTemplate) ++ loader->nvramTemplate = g_strdup(cfg->firmwares[i]->nvram); + + qemuFirmwareEnsureNVRAM(def, cfg, VIR_STORAGE_FILE_RAW); + +diff --git a/tests/qemuxml2xmloutdata/firmware-manual-efi-secboot-legacy-paths.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-manual-efi-secboot-legacy-paths.x86_64-latest.xml +index b8c2dfef66..9027123558 100644 +--- a/tests/qemuxml2xmloutdata/firmware-manual-efi-secboot-legacy-paths.x86_64-latest.xml ++++ b/tests/qemuxml2xmloutdata/firmware-manual-efi-secboot-legacy-paths.x86_64-latest.xml +@@ -7,7 +7,7 @@ + + hvm + /usr/share/OVMF/OVMF_CODE.secboot.fd +- /var/lib/libvirt/qemu/nvram/guest_VARS.fd ++ /var/lib/libvirt/qemu/nvram/guest_VARS.fd + + + +-- +2.42.0 diff --git a/SOURCES/libvirt-qemu-Filter-firmware-based-on-loader.readonly.patch b/SOURCES/libvirt-qemu-Filter-firmware-based-on-loader.readonly.patch new file mode 100644 index 0000000..5ec4714 --- /dev/null +++ b/SOURCES/libvirt-qemu-Filter-firmware-based-on-loader.readonly.patch @@ -0,0 +1,340 @@ +From 9b3f3afb21c64dc403fea734b1cb75a8bd2e4fc0 Mon Sep 17 00:00:00 2001 +Message-ID: <9b3f3afb21c64dc403fea734b1cb75a8bd2e4fc0.1692951632.git.jdenemar@redhat.com> +From: Andrea Bolognani +Date: Tue, 30 May 2023 18:01:58 +0200 +Subject: [PATCH] qemu: Filter firmware based on loader.readonly + +If the user included loader.readonly=no in the domain XML, we +should not pick a firmware build that expects to work with +loader.readonly=yes. + +https://bugzilla.redhat.com/show_bug.cgi?id=2196178 + +Signed-off-by: Andrea Bolognani +Reviewed-by: Michal Privoznik +(cherry picked from commit e96e322725f27d59ebcbd194c8da949b64bab9d6) + +https://bugzilla.redhat.com/show_bug.cgi?id=2196178 + +Signed-off-by: Andrea Bolognani +--- + src/qemu/qemu_firmware.c | 12 ++++++ + ...-auto-efi-rw-abi-update.x86_64-latest.args | 38 ----------------- + ...e-auto-efi-rw-abi-update.x86_64-latest.err | 1 + + .../firmware-auto-efi-rw.x86_64-latest.args | 38 ----------------- + .../firmware-auto-efi-rw.x86_64-latest.err | 1 + + ...ual-efi-rw-legacy-paths.x86_64-latest.args | 6 +-- + ...ual-efi-rw-modern-paths.x86_64-latest.args | 6 +-- + tests/qemuxml2argvtest.c | 4 +- + ...e-auto-efi-rw-abi-update.x86_64-latest.xml | 41 ------------------- + .../firmware-auto-efi-rw.x86_64-latest.xml | 8 +--- + ...nual-efi-rw-legacy-paths.x86_64-latest.xml | 3 +- + ...nual-efi-rw-modern-paths.x86_64-latest.xml | 9 +--- + tests/qemuxml2xmltest.c | 1 - + 13 files changed, 24 insertions(+), 144 deletions(-) + delete mode 100644 tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.args + create mode 100644 tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err + delete mode 100644 tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.args + create mode 100644 tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err + delete mode 100644 tests/qemuxml2xmloutdata/firmware-auto-efi-rw-abi-update.x86_64-latest.xml + +diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c +index 2c9a03e6cf..3538654913 100644 +--- a/src/qemu/qemu_firmware.c ++++ b/src/qemu/qemu_firmware.c +@@ -1295,6 +1295,13 @@ qemuFirmwareMatchDomain(const virDomainDef *def, + } + } + ++ if (loader && ++ loader->readonly == VIR_TRISTATE_BOOL_NO && ++ flash->mode != QEMU_FIRMWARE_FLASH_MODE_COMBINED) { ++ VIR_DEBUG("Discarding readonly loader"); ++ return false; ++ } ++ + if (STRNEQ(flash->executable.format, "raw") && + STRNEQ(flash->executable.format, "qcow2")) { + VIR_DEBUG("Discarding loader with unsupported flash format '%s'", +@@ -1593,6 +1600,11 @@ qemuFirmwareFillDomainLegacy(virQEMUDriver *driver, + return 1; + } + ++ if (loader->readonly == VIR_TRISTATE_BOOL_NO) { ++ VIR_DEBUG("Ignoring legacy entries for read-write loader"); ++ return 1; ++ } ++ + if (loader->stateless == VIR_TRISTATE_BOOL_YES) { + VIR_DEBUG("Ignoring legacy entries for stateless loader"); + return 1; +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.args +deleted file mode 100644 +index 48f357cbf9..0000000000 +--- a/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.args ++++ /dev/null +@@ -1,38 +0,0 @@ +-LC_ALL=C \ +-PATH=/bin \ +-HOME=/var/lib/libvirt/qemu/domain--1-guest \ +-USER=test \ +-LOGNAME=test \ +-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +-/usr/bin/qemu-system-x86_64 \ +--name guest=guest,debug-threads=on \ +--S \ +--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +--blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +--blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ +--machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ +--accel kvm \ +--cpu qemu64 \ +--global driver=cfi.pflash01,property=secure,value=on \ +--m size=1048576k \ +--object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +--overcommit mem-lock=off \ +--smp 1,sockets=1,cores=1,threads=1 \ +--uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ +--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 \ +--audiodev '{"id":"audio1","driver":"none"}' \ +--global ICH9-LPC.noreboot=off \ +--watchdog-action reset \ +--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +--msg timestamp=on +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err +new file mode 100644 +index 0000000000..4cfde1bd2e +--- /dev/null ++++ b/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err +@@ -0,0 +1 @@ ++operation failed: Unable to find any firmware to satisfy 'efi' +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.args +deleted file mode 100644 +index 48f357cbf9..0000000000 +--- a/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.args ++++ /dev/null +@@ -1,38 +0,0 @@ +-LC_ALL=C \ +-PATH=/bin \ +-HOME=/var/lib/libvirt/qemu/domain--1-guest \ +-USER=test \ +-LOGNAME=test \ +-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ +-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ +-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ +-/usr/bin/qemu-system-x86_64 \ +--name guest=guest,debug-threads=on \ +--S \ +--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ +--blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +--blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ +--machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ +--accel kvm \ +--cpu qemu64 \ +--global driver=cfi.pflash01,property=secure,value=on \ +--m size=1048576k \ +--object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ +--overcommit mem-lock=off \ +--smp 1,sockets=1,cores=1,threads=1 \ +--uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ +--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 \ +--audiodev '{"id":"audio1","driver":"none"}' \ +--global ICH9-LPC.noreboot=off \ +--watchdog-action reset \ +--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +--msg timestamp=on +diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err +new file mode 100644 +index 0000000000..4cfde1bd2e +--- /dev/null ++++ b/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err +@@ -0,0 +1 @@ ++operation failed: Unable to find any firmware to satisfy 'efi' +diff --git a/tests/qemuxml2argvdata/firmware-manual-efi-rw-legacy-paths.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-manual-efi-rw-legacy-paths.x86_64-latest.args +index ccc279e4e3..85495da6f5 100644 +--- a/tests/qemuxml2argvdata/firmware-manual-efi-rw-legacy-paths.x86_64-latest.args ++++ b/tests/qemuxml2argvdata/firmware-manual-efi-rw-legacy-paths.x86_64-latest.args +@@ -11,10 +11,8 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ + -S \ + -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ + -blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +--blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ +--machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ ++-blockdev '{"node-name":"libvirt-pflash0-format","read-only":false,"driver":"raw","file":"libvirt-pflash0-storage"}' \ ++-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,acpi=on \ + -accel tcg \ + -cpu qemu64 \ + -m size=1048576k \ +diff --git a/tests/qemuxml2argvdata/firmware-manual-efi-rw-modern-paths.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-manual-efi-rw-modern-paths.x86_64-latest.args +index 2d45fa4792..c26daad29f 100644 +--- a/tests/qemuxml2argvdata/firmware-manual-efi-rw-modern-paths.x86_64-latest.args ++++ b/tests/qemuxml2argvdata/firmware-manual-efi-rw-modern-paths.x86_64-latest.args +@@ -11,10 +11,8 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ + -S \ + -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ + -blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +--blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +--blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ +--machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \ ++-blockdev '{"node-name":"libvirt-pflash0-format","read-only":false,"driver":"raw","file":"libvirt-pflash0-storage"}' \ ++-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,acpi=on \ + -accel tcg \ + -cpu qemu64 \ + -m size=1048576k \ +diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c +index b2d9e00350..370b26a023 100644 +--- a/tests/qemuxml2argvtest.c ++++ b/tests/qemuxml2argvtest.c +@@ -1089,8 +1089,8 @@ mymain(void) + DO_TEST_CAPS_LATEST("firmware-auto-efi"); + DO_TEST_CAPS_LATEST_ABI_UPDATE("firmware-auto-efi-abi-update"); + DO_TEST_CAPS_LATEST("firmware-auto-efi-stateless"); +- DO_TEST_CAPS_LATEST("firmware-auto-efi-rw"); +- DO_TEST_CAPS_LATEST_ABI_UPDATE("firmware-auto-efi-rw-abi-update"); ++ DO_TEST_CAPS_LATEST_FAILURE("firmware-auto-efi-rw"); ++ DO_TEST_CAPS_LATEST_ABI_UPDATE_PARSE_ERROR("firmware-auto-efi-rw-abi-update"); + DO_TEST_CAPS_LATEST("firmware-auto-efi-loader-secure"); + DO_TEST_CAPS_LATEST_ABI_UPDATE("firmware-auto-efi-loader-secure-abi-update"); + DO_TEST_CAPS_LATEST("firmware-auto-efi-loader-insecure"); +diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-rw-abi-update.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-rw-abi-update.x86_64-latest.xml +deleted file mode 100644 +index 332d931ba1..0000000000 +--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-rw-abi-update.x86_64-latest.xml ++++ /dev/null +@@ -1,41 +0,0 @@ +- +- guest +- 63840878-0deb-4095-97e6-fc444d9bc9fa +- 1048576 +- 1048576 +- 1 +- +- hvm +- +- +- +- +- /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd +- /var/lib/libvirt/qemu/nvram/guest_VARS.fd +- +- +- +- +- +- +- +- qemu64 +- +- +- destroy +- restart +- destroy +- +- /usr/bin/qemu-system-x86_64 +- +- +-
+- +- +- +- +-