libvirt-10.5.0-5.el10
- Synchronize with libvirt-10.5.0-4.el9 (RHEL-30177) - qemu: virtiofs: cache: use 'never' instead of 'none' - qemu_domain: Strip <acpi/> from s390(x) definitions - qemuxmlconftest: Add tests for the ACPI stripping hack on s390 - vsh: Allow vshReadlineInit() to be called multiple times Related: RHEL-30177
This commit is contained in:
parent
37fd552490
commit
7f40b47bc6
49
libvirt-qemu-virtiofs-cache-use-never-instead-of-none.patch
Normal file
49
libvirt-qemu-virtiofs-cache-use-never-instead-of-none.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From d7285cb688e4f6b61dd842be7d0a2e773ad7d21b Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <d7285cb688e4f6b61dd842be7d0a2e773ad7d21b.1723213495.git.jdenemar@redhat.com>
|
||||||
|
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||||
|
Date: Tue, 23 Jul 2024 14:14:13 +0200
|
||||||
|
Subject: [PATCH] qemu: virtiofs: cache: use 'never' instead of 'none'
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
The new option style renamed one of the cache modes.
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-50329
|
||||||
|
|
||||||
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 8d3b2397372111d15d6b79138c5c5a80203f85f5)
|
||||||
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_virtiofs.c | 12 +++++++++++-
|
||||||
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
|
||||||
|
index 0e3c7dbb58..c7be2766a2 100644
|
||||||
|
--- a/src/qemu/qemu_virtiofs.c
|
||||||
|
+++ b/src/qemu/qemu_virtiofs.c
|
||||||
|
@@ -147,10 +147,20 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg,
|
||||||
|
virCommandAddArg(cmd, "--shared-dir");
|
||||||
|
virCommandAddArg(cmd, fs->src->path);
|
||||||
|
|
||||||
|
- if (fs->cache) {
|
||||||
|
+ switch (fs->cache) {
|
||||||
|
+ case VIR_DOMAIN_FS_CACHE_MODE_DEFAULT:
|
||||||
|
+ case VIR_DOMAIN_FS_CACHE_MODE_LAST:
|
||||||
|
+ break;
|
||||||
|
+ case VIR_DOMAIN_FS_CACHE_MODE_NONE:
|
||||||
|
+ virCommandAddArg(cmd, "--cache");
|
||||||
|
+ virCommandAddArg(cmd, "never");
|
||||||
|
+ break;
|
||||||
|
+ case VIR_DOMAIN_FS_CACHE_MODE_ALWAYS:
|
||||||
|
virCommandAddArg(cmd, "--cache");
|
||||||
|
virCommandAddArg(cmd, virDomainFSCacheModeTypeToString(fs->cache));
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
if (fs->sandbox) {
|
||||||
|
virCommandAddArg(cmd, "--sandbox");
|
||||||
|
virCommandAddArg(cmd, virDomainFSSandboxModeTypeToString(fs->sandbox));
|
||||||
|
--
|
||||||
|
2.46.0
|
105
libvirt-qemu_domain-Strip-acpi-from-s390-x-definitions.patch
Normal file
105
libvirt-qemu_domain-Strip-acpi-from-s390-x-definitions.patch
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
From f34372c108e5b4f1e37c333a7ff2c50faa9f534e Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <f34372c108e5b4f1e37c333a7ff2c50faa9f534e.1723213495.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Wed, 31 Jul 2024 11:34:59 +0200
|
||||||
|
Subject: [PATCH] qemu_domain: Strip <acpi/> from s390(x) definitions
|
||||||
|
|
||||||
|
The s390(x) machines never supported ACPI. That didn't stop users
|
||||||
|
enabling ACPI in their config. As of libvirt-9.2 (98c4e3d073) with new
|
||||||
|
enough qemu we reject configs which require ACPI, but qemu can't satisfy
|
||||||
|
it.
|
||||||
|
|
||||||
|
This breaks migration of existing VMs with the old wrong configs to new
|
||||||
|
libvirt installations.
|
||||||
|
|
||||||
|
To address this introduce a post-parse fixup removing the ACPI flag
|
||||||
|
specifically for s390 machines which do enable it in the definition.
|
||||||
|
|
||||||
|
The advantage of doing it in post-parse, rather than simply relaxing the
|
||||||
|
ABI stability check to allow users providing an fixed XML when migrating
|
||||||
|
(allowing change of the ACPI flag for s390 in ABI stability check, as it
|
||||||
|
doesn't impact ABI), is that only the destination installation needs to
|
||||||
|
be patched in order to preserve migration.
|
||||||
|
|
||||||
|
To mitigate the disadvantage of simply stripping it from all s390(x)
|
||||||
|
configs the hack is not applied when defining or starting a new domain
|
||||||
|
from the XML, to preserve the error about unsupported configuration.
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-49516
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit 4ba4f659e42a30c3fa8ece414616a23a992acfaa)
|
||||||
|
---
|
||||||
|
src/qemu/qemu_domain.c | 49 ++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 49 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||||
|
index 1a90311ca5..1bafe3708a 100644
|
||||||
|
--- a/src/qemu/qemu_domain.c
|
||||||
|
+++ b/src/qemu/qemu_domain.c
|
||||||
|
@@ -5013,6 +5013,53 @@ qemuDomainDefPostParseBasic(virDomainDef *def,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * qemuDomainDefACPIPostParse:
|
||||||
|
+ * @def: domain definition
|
||||||
|
+ * @qemuCaps: qemu capabilities object
|
||||||
|
+ *
|
||||||
|
+ * Fixup the use of ACPI flag on certain architectures that never supported it
|
||||||
|
+ * and users for some reason used it, which would break migration to newer
|
||||||
|
+ * libvirt versions which check whether given machine type supports ACPI.
|
||||||
|
+ *
|
||||||
|
+ * The fixup is done in post-parse as it's hard to update the ABI stability
|
||||||
|
+ * check on source of the migration.
|
||||||
|
+ */
|
||||||
|
+static void
|
||||||
|
+qemuDomainDefACPIPostParse(virDomainDef *def,
|
||||||
|
+ virQEMUCaps *qemuCaps,
|
||||||
|
+ unsigned int parseFlags)
|
||||||
|
+{
|
||||||
|
+ /* Only cases when ACPI is enabled need to be fixed up */
|
||||||
|
+ if (def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ /* Strip the <acpi/> feature only for non-fresh configs, in order to still
|
||||||
|
+ * produce an error if the feature is present in a newly defined one.
|
||||||
|
+ *
|
||||||
|
+ * The use of the VIR_DOMAIN_DEF_PARSE_ABI_UPDATE looks counter-intuitive,
|
||||||
|
+ * but it's used only in qemuDomainCreateXML/qemuDomainDefineXMLFlags APIs
|
||||||
|
+ * */
|
||||||
|
+ if (parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ /* This fixup is applicable _only_ on architectures which were present as of
|
||||||
|
+ * libvirt-9.2 and *never* supported ACPI. The fixup is currently done only
|
||||||
|
+ * for existing users of s390(x) to fix migration for configs which had
|
||||||
|
+ * <acpi/> despite being ignored.
|
||||||
|
+ */
|
||||||
|
+ if (def->os.arch != VIR_ARCH_S390 &&
|
||||||
|
+ def->os.arch != VIR_ARCH_S390X)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ /* To be sure, we only strip ACPI if given machine type doesn't support it */
|
||||||
|
+ if (virQEMUCapsMachineSupportsACPI(qemuCaps, def->virtType, def->os.machine) != VIR_TRISTATE_BOOL_NO)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ def->features[VIR_DOMAIN_FEATURE_ACPI] = VIR_TRISTATE_SWITCH_ABSENT;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
static int
|
||||||
|
qemuDomainDefPostParse(virDomainDef *def,
|
||||||
|
unsigned int parseFlags,
|
||||||
|
@@ -5033,6 +5080,8 @@ qemuDomainDefPostParse(virDomainDef *def,
|
||||||
|
if (qemuDomainDefMachinePostParse(def, qemuCaps) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
+ qemuDomainDefACPIPostParse(def, qemuCaps, parseFlags);
|
||||||
|
+
|
||||||
|
if (qemuDomainDefBootPostParse(def, driver, parseFlags) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.46.0
|
@ -0,0 +1,435 @@
|
|||||||
|
From 94915522e99b56933fd792dfd801f70a188f3534 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <94915522e99b56933fd792dfd801f70a188f3534.1723213495.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Wed, 31 Jul 2024 12:38:23 +0200
|
||||||
|
Subject: [PATCH] qemuxmlconftest: Add tests for the ACPI stripping hack on
|
||||||
|
s390
|
||||||
|
|
||||||
|
Replace the 'misc-acpi' case by testing a bunch of architectures for how
|
||||||
|
ACPI is handled including a test for the s390 ACPI strip hack added in
|
||||||
|
previous commit.
|
||||||
|
|
||||||
|
The input files are adapted from the corresponding '-minimal.xml' files.
|
||||||
|
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit 432e442ca8eeb4ed8c0dcc3a3c7d723f85b38c40)
|
||||||
|
https://issues.redhat.com/browse/RHEL-49516
|
||||||
|
---
|
||||||
|
.../aarch64-noacpi-acpi.aarch64-latest.err | 1 +
|
||||||
|
tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml | 18 ++++++++
|
||||||
|
.../misc-acpi.x86_64-latest.args | 34 ---------------
|
||||||
|
.../misc-acpi.x86_64-latest.xml | 41 -------------------
|
||||||
|
tests/qemuxmlconfdata/misc-acpi.xml | 33 ---------------
|
||||||
|
.../riscv64-virt-acpi.riscv64-latest.args | 33 +++++++++++++++
|
||||||
|
.../riscv64-virt-acpi.riscv64-latest.xml | 36 ++++++++++++++++
|
||||||
|
tests/qemuxmlconfdata/riscv64-virt-acpi.xml | 15 +++++++
|
||||||
|
...s390x-ccw-acpi.s390x-latest.abi-update.err | 1 +
|
||||||
|
.../s390x-ccw-acpi.s390x-latest.args | 32 +++++++++++++++
|
||||||
|
.../s390x-ccw-acpi.s390x-latest.xml | 27 ++++++++++++
|
||||||
|
tests/qemuxmlconfdata/s390x-ccw-acpi.xml | 15 +++++++
|
||||||
|
tests/qemuxmlconftest.c | 18 +++++++-
|
||||||
|
13 files changed, 195 insertions(+), 109 deletions(-)
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/misc-acpi.xml
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.args
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.xml
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-acpi.xml
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.abi-update.err
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.args
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.xml
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-acpi.xml
|
||||||
|
|
||||||
|
diff --git a/tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..5f379d56ce
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.aarch64-latest.err
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+unsupported configuration: machine type 'borzoi' does not support ACPI
|
||||||
|
diff --git a/tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..10dbeabd6d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/aarch64-noacpi-acpi.xml
|
||||||
|
@@ -0,0 +1,18 @@
|
||||||
|
+<domain type='kvm'>
|
||||||
|
+ <name>aarch64test</name>
|
||||||
|
+ <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||||
|
+ <memory unit='KiB'>1048576</memory>
|
||||||
|
+ <vcpu placement='static'>1</vcpu>
|
||||||
|
+ <os>
|
||||||
|
+ <!-- machine type doesn't matter as long as it has no ACPI -->
|
||||||
|
+ <type arch='aarch64' machine='borzoi'>hvm</type>
|
||||||
|
+ </os>
|
||||||
|
+ <features>
|
||||||
|
+ <acpi/>
|
||||||
|
+ </features>
|
||||||
|
+ <cpu mode='host-passthrough'/>
|
||||||
|
+ <devices>
|
||||||
|
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||||
|
+ <memballoon model='none'/>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args b/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args
|
||||||
|
deleted file mode 100644
|
||||||
|
index c4e09c0af2..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.args
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,34 +0,0 @@
|
||||||
|
-LC_ALL=C \
|
||||||
|
-PATH=/bin \
|
||||||
|
-HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \
|
||||||
|
-USER=test \
|
||||||
|
-LOGNAME=test \
|
||||||
|
-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \
|
||||||
|
-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \
|
||||||
|
-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||||
|
-/usr/bin/qemu-system-x86_64 \
|
||||||
|
--name guest=QEMUGuest1,debug-threads=on \
|
||||||
|
--S \
|
||||||
|
--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
|
||||||
|
--machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \
|
||||||
|
--accel tcg \
|
||||||
|
--cpu qemu64 \
|
||||||
|
--m size=219136k \
|
||||||
|
--object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||||
|
--overcommit mem-lock=off \
|
||||||
|
--smp 1,sockets=1,cores=1,threads=1 \
|
||||||
|
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||||
|
--display none \
|
||||||
|
--no-user-config \
|
||||||
|
--nodefaults \
|
||||||
|
--chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
|
||||||
|
--mon chardev=charmonitor,id=monitor,mode=control \
|
||||||
|
--rtc base=utc \
|
||||||
|
--no-shutdown \
|
||||||
|
--boot strict=on \
|
||||||
|
--device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
|
||||||
|
--blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
|
||||||
|
--device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
|
||||||
|
--audiodev '{"id":"audio1","driver":"none"}' \
|
||||||
|
--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||||
|
--msg timestamp=on
|
||||||
|
diff --git a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml b/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 176926bb60..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/misc-acpi.x86_64-latest.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,41 +0,0 @@
|
||||||
|
-<domain type='qemu'>
|
||||||
|
- <name>QEMUGuest1</name>
|
||||||
|
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
- <memory unit='KiB'>219136</memory>
|
||||||
|
- <currentMemory unit='KiB'>219136</currentMemory>
|
||||||
|
- <vcpu placement='static'>1</vcpu>
|
||||||
|
- <os>
|
||||||
|
- <type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
- <boot dev='hd'/>
|
||||||
|
- </os>
|
||||||
|
- <features>
|
||||||
|
- <acpi/>
|
||||||
|
- </features>
|
||||||
|
- <cpu mode='custom' match='exact' check='none'>
|
||||||
|
- <model fallback='forbid'>qemu64</model>
|
||||||
|
- </cpu>
|
||||||
|
- <clock offset='utc'/>
|
||||||
|
- <on_poweroff>destroy</on_poweroff>
|
||||||
|
- <on_reboot>restart</on_reboot>
|
||||||
|
- <on_crash>destroy</on_crash>
|
||||||
|
- <devices>
|
||||||
|
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
|
- <disk type='block' device='disk'>
|
||||||
|
- <driver name='qemu' type='raw'/>
|
||||||
|
- <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
- <target dev='hda' bus='ide'/>
|
||||||
|
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||||
|
- </disk>
|
||||||
|
- <controller type='usb' index='0' model='piix3-uhci'>
|
||||||
|
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
- </controller>
|
||||||
|
- <controller type='ide' index='0'>
|
||||||
|
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
||||||
|
- </controller>
|
||||||
|
- <controller type='pci' index='0' model='pci-root'/>
|
||||||
|
- <input type='mouse' bus='ps2'/>
|
||||||
|
- <input type='keyboard' bus='ps2'/>
|
||||||
|
- <audio id='1' type='none'/>
|
||||||
|
- <memballoon model='none'/>
|
||||||
|
- </devices>
|
||||||
|
-</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/misc-acpi.xml b/tests/qemuxmlconfdata/misc-acpi.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 59fbe471ff..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/misc-acpi.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,33 +0,0 @@
|
||||||
|
-<domain type='qemu'>
|
||||||
|
- <name>QEMUGuest1</name>
|
||||||
|
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
- <memory unit='KiB'>219136</memory>
|
||||||
|
- <currentMemory unit='KiB'>219136</currentMemory>
|
||||||
|
- <vcpu placement='static'>1</vcpu>
|
||||||
|
- <os>
|
||||||
|
- <type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
- <boot dev='hd'/>
|
||||||
|
- </os>
|
||||||
|
- <features>
|
||||||
|
- <acpi/>
|
||||||
|
- </features>
|
||||||
|
- <clock offset='utc'/>
|
||||||
|
- <on_poweroff>destroy</on_poweroff>
|
||||||
|
- <on_reboot>restart</on_reboot>
|
||||||
|
- <on_crash>destroy</on_crash>
|
||||||
|
- <devices>
|
||||||
|
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
|
- <disk type='block' device='disk'>
|
||||||
|
- <driver name='qemu' type='raw'/>
|
||||||
|
- <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
- <target dev='hda' bus='ide'/>
|
||||||
|
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||||
|
- </disk>
|
||||||
|
- <controller type='usb' index='0'/>
|
||||||
|
- <controller type='ide' index='0'/>
|
||||||
|
- <controller type='pci' index='0' model='pci-root'/>
|
||||||
|
- <input type='mouse' bus='ps2'/>
|
||||||
|
- <input type='keyboard' bus='ps2'/>
|
||||||
|
- <memballoon model='none'/>
|
||||||
|
- </devices>
|
||||||
|
-</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.args b/tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.args
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..fcb80b009e
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.args
|
||||||
|
@@ -0,0 +1,33 @@
|
||||||
|
+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-riscv64 \
|
||||||
|
+-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"}' \
|
||||||
|
+-machine virt,usb=off,dump-guest-core=off,memory-backend=riscv_virt_board.ram \
|
||||||
|
+-accel tcg \
|
||||||
|
+-m size=4194304k \
|
||||||
|
+-object '{"qom-type":"memory-backend-ram","id":"riscv_virt_board.ram","size":4294967296}' \
|
||||||
|
+-overcommit mem-lock=off \
|
||||||
|
+-smp 4,sockets=4,cores=1,threads=1 \
|
||||||
|
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
|
||||||
|
+-display none \
|
||||||
|
+-no-user-config \
|
||||||
|
+-nodefaults \
|
||||||
|
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
|
||||||
|
+-mon chardev=charmonitor,id=monitor,mode=control \
|
||||||
|
+-rtc base=utc \
|
||||||
|
+-no-shutdown \
|
||||||
|
+-boot strict=on \
|
||||||
|
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
|
||||||
|
+-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
|
||||||
|
+-audiodev '{"id":"audio1","driver":"none"}' \
|
||||||
|
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.1","addr":"0x0"}' \
|
||||||
|
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||||
|
+-msg timestamp=on
|
||||||
|
diff --git a/tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.xml b/tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..075708df9c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/riscv64-virt-acpi.riscv64-latest.xml
|
||||||
|
@@ -0,0 +1,36 @@
|
||||||
|
+<domain type='qemu'>
|
||||||
|
+ <name>guest</name>
|
||||||
|
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||||
|
+ <memory unit='KiB'>4194304</memory>
|
||||||
|
+ <currentMemory unit='KiB'>4194304</currentMemory>
|
||||||
|
+ <vcpu placement='static'>4</vcpu>
|
||||||
|
+ <os>
|
||||||
|
+ <type arch='riscv64' machine='virt'>hvm</type>
|
||||||
|
+ <boot dev='hd'/>
|
||||||
|
+ </os>
|
||||||
|
+ <features>
|
||||||
|
+ <acpi/>
|
||||||
|
+ </features>
|
||||||
|
+ <clock offset='utc'/>
|
||||||
|
+ <on_poweroff>destroy</on_poweroff>
|
||||||
|
+ <on_reboot>restart</on_reboot>
|
||||||
|
+ <on_crash>destroy</on_crash>
|
||||||
|
+ <devices>
|
||||||
|
+ <emulator>/usr/bin/qemu-system-riscv64</emulator>
|
||||||
|
+ <controller type='pci' index='0' model='pcie-root'/>
|
||||||
|
+ <controller type='pci' index='1' model='pcie-root-port'>
|
||||||
|
+ <model name='pcie-root-port'/>
|
||||||
|
+ <target chassis='1' port='0x8'/>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
|
||||||
|
+ </controller>
|
||||||
|
+ <controller type='pci' index='2' model='pcie-root-port'>
|
||||||
|
+ <model name='pcie-root-port'/>
|
||||||
|
+ <target chassis='2' port='0x9'/>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
||||||
|
+ </controller>
|
||||||
|
+ <audio id='1' type='none'/>
|
||||||
|
+ <memballoon model='virtio'>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||||
|
+ </memballoon>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/riscv64-virt-acpi.xml b/tests/qemuxmlconfdata/riscv64-virt-acpi.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..72fc0d8e1c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/riscv64-virt-acpi.xml
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+<domain type='qemu'>
|
||||||
|
+ <name>guest</name>
|
||||||
|
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||||
|
+ <memory>4194304</memory>
|
||||||
|
+ <vcpu>4</vcpu>
|
||||||
|
+ <os>
|
||||||
|
+ <type arch='riscv64' machine='virt'>hvm</type>
|
||||||
|
+ </os>
|
||||||
|
+ <features>
|
||||||
|
+ <acpi/>
|
||||||
|
+ </features>
|
||||||
|
+ <devices>
|
||||||
|
+ <emulator>/usr/bin/qemu-system-riscv64</emulator>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.abi-update.err b/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.abi-update.err
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..4ca9af1de0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.abi-update.err
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+unsupported configuration: machine type 's390-ccw-virtio' does not support ACPI
|
||||||
|
diff --git a/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.args b/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.args
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..84098e580e
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.args
|
||||||
|
@@ -0,0 +1,32 @@
|
||||||
|
+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-s390x \
|
||||||
|
+-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"}' \
|
||||||
|
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
|
||||||
|
+-accel tcg \
|
||||||
|
+-cpu qemu \
|
||||||
|
+-m size=4194304k \
|
||||||
|
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":4294967296}' \
|
||||||
|
+-overcommit mem-lock=off \
|
||||||
|
+-smp 4,sockets=4,cores=1,threads=1 \
|
||||||
|
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
|
||||||
|
+-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"}' \
|
||||||
|
+-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
|
||||||
|
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||||
|
+-msg timestamp=on
|
||||||
|
diff --git a/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.xml b/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..df8e578212
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/s390x-ccw-acpi.s390x-latest.xml
|
||||||
|
@@ -0,0 +1,27 @@
|
||||||
|
+<domain type='qemu'>
|
||||||
|
+ <name>guest</name>
|
||||||
|
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||||
|
+ <memory unit='KiB'>4194304</memory>
|
||||||
|
+ <currentMemory unit='KiB'>4194304</currentMemory>
|
||||||
|
+ <vcpu placement='static'>4</vcpu>
|
||||||
|
+ <os>
|
||||||
|
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
|
||||||
|
+ <boot dev='hd'/>
|
||||||
|
+ </os>
|
||||||
|
+ <cpu mode='custom' match='exact' check='none'>
|
||||||
|
+ <model fallback='forbid'>qemu</model>
|
||||||
|
+ </cpu>
|
||||||
|
+ <clock offset='utc'/>
|
||||||
|
+ <on_poweroff>destroy</on_poweroff>
|
||||||
|
+ <on_reboot>restart</on_reboot>
|
||||||
|
+ <on_crash>destroy</on_crash>
|
||||||
|
+ <devices>
|
||||||
|
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
|
||||||
|
+ <controller type='pci' index='0' model='pci-root'/>
|
||||||
|
+ <audio id='1' type='none'/>
|
||||||
|
+ <memballoon model='virtio'>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||||
|
+ </memballoon>
|
||||||
|
+ <panic model='s390'/>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/s390x-ccw-acpi.xml b/tests/qemuxmlconfdata/s390x-ccw-acpi.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..b7be060c66
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/s390x-ccw-acpi.xml
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+<domain type='qemu'>
|
||||||
|
+ <name>guest</name>
|
||||||
|
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||||
|
+ <memory>4194304</memory>
|
||||||
|
+ <vcpu>4</vcpu>
|
||||||
|
+ <features>
|
||||||
|
+ <acpi/>
|
||||||
|
+ </features>
|
||||||
|
+ <os>
|
||||||
|
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
|
||||||
|
+ </os>
|
||||||
|
+ <devices>
|
||||||
|
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
|
||||||
|
index a3a399e16c..0f2afad6c4 100644
|
||||||
|
--- a/tests/qemuxmlconftest.c
|
||||||
|
+++ b/tests/qemuxmlconftest.c
|
||||||
|
@@ -1740,7 +1740,23 @@ mymain(void)
|
||||||
|
|
||||||
|
DO_TEST_CAPS_LATEST("input-usbmouse");
|
||||||
|
DO_TEST_CAPS_LATEST("input-usbtablet");
|
||||||
|
- DO_TEST_CAPS_LATEST("misc-acpi");
|
||||||
|
+
|
||||||
|
+ /* tests for ACPI support handling:
|
||||||
|
+ * - existing positive test cases enabling ACPI for aarch64/x86_64/loongarch:
|
||||||
|
+ * - firmware-manual-efi-acpi-q35
|
||||||
|
+ * - firmware-manual-efi-acpi-aarch64
|
||||||
|
+ * - firmware-auto-efi-loongarch64
|
||||||
|
+ *
|
||||||
|
+ * - negative case for aarch64 with 'borzoi' machine not supporting ACPI
|
||||||
|
+ *
|
||||||
|
+ * - s390x has hack to strip ACPI to preserve migration of old configs,
|
||||||
|
+ * but should produce error when ABI_UPDATE is requested
|
||||||
|
+ */
|
||||||
|
+ DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-noacpi-acpi", "aarch64");
|
||||||
|
+ DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-acpi", "riscv64");
|
||||||
|
+ DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-acpi", "s390x");
|
||||||
|
+ DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE_PARSE_ERROR("s390x-ccw-acpi", "s390x");
|
||||||
|
+
|
||||||
|
DO_TEST_CAPS_LATEST("misc-disable-s3");
|
||||||
|
DO_TEST_CAPS_LATEST("misc-disable-suspends");
|
||||||
|
DO_TEST_CAPS_LATEST("misc-enable-s4");
|
||||||
|
--
|
||||||
|
2.46.0
|
@ -0,0 +1,43 @@
|
|||||||
|
From b7ffa3df0ad680739fce603ba0e6d83d743f193b Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <b7ffa3df0ad680739fce603ba0e6d83d743f193b.1723213495.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Thu, 8 Aug 2024 14:21:20 +0200
|
||||||
|
Subject: [PATCH] vsh: Allow vshReadlineInit() to be called multiple times
|
||||||
|
|
||||||
|
Thing about vshReadlineInit() is - it's called multiple times.
|
||||||
|
The first time from vshInit(), when @ctl was filled only
|
||||||
|
partially (most notably, before any argv parsing is done, hence
|
||||||
|
ctl->imode is set to false). The second time after argv parsing,
|
||||||
|
from virshInit() -> vshInitReload(). In here, ctl->imode might
|
||||||
|
have changed and thus vshReadlineInit() can't exit early - it
|
||||||
|
needs to set up stuff for interactive mode (history basically).
|
||||||
|
|
||||||
|
To allow vshReadlineInit() to be called again,
|
||||||
|
vshReadlineDeinit() must set @autoCompleteOpaque to NULL.
|
||||||
|
|
||||||
|
Fixes: cab1e71f0161fd24c5d6ff4c379d3a242ea8c2d9
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-53560
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
(cherry picked from commit 18fd4899f3ddd8873842ab24cf39bf51b1bf3a02)
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
tools/vsh.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/tools/vsh.c b/tools/vsh.c
|
||||||
|
index 9fbb1f9349..5f5e2f281d 100644
|
||||||
|
--- a/tools/vsh.c
|
||||||
|
+++ b/tools/vsh.c
|
||||||
|
@@ -3040,6 +3040,9 @@ vshReadlineDeinit(vshControl *ctl)
|
||||||
|
|
||||||
|
g_clear_pointer(&ctl->historydir, g_free);
|
||||||
|
g_clear_pointer(&ctl->historyfile, g_free);
|
||||||
|
+
|
||||||
|
+ /* Allow vshReadlineInit() to be called again. */
|
||||||
|
+ autoCompleteOpaque = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
--
|
||||||
|
2.46.0
|
13
libvirt.spec
13
libvirt.spec
@ -289,7 +289,7 @@
|
|||||||
Summary: Library providing a simple virtualization API
|
Summary: Library providing a simple virtualization API
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 10.5.0
|
Version: 10.5.0
|
||||||
Release: 4%{?dist}%{?extra_release}
|
Release: 5%{?dist}%{?extra_release}
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
||||||
URL: https://libvirt.org/
|
URL: https://libvirt.org/
|
||||||
|
|
||||||
@ -307,6 +307,10 @@ Patch7: libvirt-virt-host-validate-Drop-extra-PASS.patch
|
|||||||
Patch8: libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch
|
Patch8: libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch
|
||||||
Patch9: libvirt-vmx-Be-even-more-lax-when-trying-to-comprehend-serial-ports.patch
|
Patch9: libvirt-vmx-Be-even-more-lax-when-trying-to-comprehend-serial-ports.patch
|
||||||
Patch10: libvirt-virt-host-validate-Allow-longer-list-of-CPU-flags.patch
|
Patch10: libvirt-virt-host-validate-Allow-longer-list-of-CPU-flags.patch
|
||||||
|
Patch11: libvirt-qemu-virtiofs-cache-use-never-instead-of-none.patch
|
||||||
|
Patch12: libvirt-qemu_domain-Strip-acpi-from-s390-x-definitions.patch
|
||||||
|
Patch13: libvirt-qemuxmlconftest-Add-tests-for-the-ACPI-stripping-hack-on-s390.patch
|
||||||
|
Patch14: libvirt-vsh-Allow-vshReadlineInit-to-be-called-multiple-times.patch
|
||||||
|
|
||||||
|
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
@ -2635,6 +2639,13 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 9 2024 Jiri Denemark <jdenemar@redhat.com> - 10.5.0-5
|
||||||
|
- Synchronize with libvirt-10.5.0-4.el9 (RHEL-30177)
|
||||||
|
- qemu: virtiofs: cache: use 'never' instead of 'none'
|
||||||
|
- qemu_domain: Strip <acpi/> from s390(x) definitions
|
||||||
|
- qemuxmlconftest: Add tests for the ACPI stripping hack on s390
|
||||||
|
- vsh: Allow vshReadlineInit() to be called multiple times
|
||||||
|
|
||||||
* Thu Jul 25 2024 Jiri Denemark <jdenemar@redhat.com> - 10.5.0-4
|
* Thu Jul 25 2024 Jiri Denemark <jdenemar@redhat.com> - 10.5.0-4
|
||||||
- Synchronize with libvirt-10.5.0-4.el9 (RHEL-30177)
|
- Synchronize with libvirt-10.5.0-4.el9 (RHEL-30177)
|
||||||
- virt-host-validate: Allow longer list of CPU flags
|
- virt-host-validate: Allow longer list of CPU flags
|
||||||
|
Loading…
Reference in New Issue
Block a user