libvirt-10.10.0-10.el9
- esxConnectListAllDomains: Don't propagate failure to lookup a single domain (RHEL-80606) - conf: parse interface/source/@dev for all interface types (with backend type='passt') (RHEL-82539) - libvirt-host: Clarify/fix description of the CPU frequency field (RHEL-86197) - virNodeGetInfo: Improve description of the case when fake data is reported (RHEL-86197) - manpages: virsh: Use disclaimer from 'virNodeGetInfo()' for 'virsh nodeinfo' (RHEL-86197) - esx: Accept empty "path" URI component same way as "/" (RHEL-86459) - qemu: Rename outgoingMigration parameter in various TPM functions (RHEL-86800) - qemu: Properly propagate migration state to TPM cleanup code (RHEL-86800) - qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure (RHEL-7357) - qemuxmlconftest: Drop s390-default-cpu-...ccw-virtio-2.7 test cases (RHEL-72976) - tests: add capabilities for QEMU 10.0.0 on s390x (RHEL-72976) - qemu: Do NOT autoadd NUMA node for s390 (RHEL-72976) - qemu_command: Use qemuBuildVirtioDevProps() to build cmd line for virtio-mem and virtio-pmem (RHEL-72976) - qemuxmlconftest: Introduce memory-hotplug-virtio-mem-pci-s390x.xml (RHEL-72976) - qemu_caps: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW (RHEL-72976) - qemu: Validate virtio-mem-ccw (RHEL-72976) - qemu: Allow virtio-mem on CCW (RHEL-72976) - qemuxmlconftest: Introduce memory-hotplug-virtio-mem-ccw-s390x.xml (RHEL-72976) - qemu_domain_address: fix CCW virtio-mem hotplug (RHEL-72976) Resolves: RHEL-72976, RHEL-7357, RHEL-80606, RHEL-82539, RHEL-86197 Resolves: RHEL-86459, RHEL-86800
This commit is contained in:
parent
8026296455
commit
ef809b76a6
@ -0,0 +1,103 @@
|
|||||||
|
From 29ea0453595ee14cdd64b2e9c07343aa870426d0 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <29ea0453595ee14cdd64b2e9c07343aa870426d0.1744876587.git.jdenemar@redhat.com>
|
||||||
|
From: Laine Stump <laine@redhat.com>
|
||||||
|
Date: Thu, 6 Mar 2025 19:19:12 -0500
|
||||||
|
Subject: [PATCH] conf: parse interface/source/@dev for all interface types
|
||||||
|
(with backend type='passt')
|
||||||
|
|
||||||
|
The original implementation of the passt backend for vhost-user
|
||||||
|
interfaces erroneously forgot to parse:
|
||||||
|
|
||||||
|
<source dev='blah'/>
|
||||||
|
|
||||||
|
for interface type='vhostuser', so it wasn't being added to the passt
|
||||||
|
commandline, and also wasn't being saved to the domain config. Now we
|
||||||
|
parse it whenever the <backend> type='passt', no matter what the
|
||||||
|
interface type, and then throw an error during validation if
|
||||||
|
source/@dev was specified for interface type = 'user|vhostuser' and
|
||||||
|
backend type != 'passt'.
|
||||||
|
|
||||||
|
Fixes: 1e9054b9c79d721a55f413c2983c5370044f8f60
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-82539
|
||||||
|
Signed-off-by: Laine Stump <laine@redhat.com>
|
||||||
|
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
(cherry picked from commit 4c979edaa545c8425f7a856c06ebc0de939d4b9f)
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
---
|
||||||
|
src/conf/domain_conf.c | 8 +++++---
|
||||||
|
src/conf/domain_validate.c | 8 +++++++-
|
||||||
|
.../qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml | 2 ++
|
||||||
|
3 files changed, 14 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||||
|
index f6d3d849eb..726c3095ed 100644
|
||||||
|
--- a/src/conf/domain_conf.c
|
||||||
|
+++ b/src/conf/domain_conf.c
|
||||||
|
@@ -9919,9 +9919,6 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_NET_TYPE_USER:
|
||||||
|
- def->sourceDev = virXMLPropString(source_node, "dev");
|
||||||
|
- break;
|
||||||
|
-
|
||||||
|
case VIR_DOMAIN_NET_TYPE_NULL:
|
||||||
|
case VIR_DOMAIN_NET_TYPE_LAST:
|
||||||
|
break;
|
||||||
|
@@ -10036,6 +10033,11 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (def->backend.type == VIR_DOMAIN_NET_BACKEND_PASST) {
|
||||||
|
+ def->sourceDev = virXMLPropString(source_node, "dev");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
def->linkstate = VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DEFAULT;
|
||||||
|
if (linkstate != NULL) {
|
||||||
|
if ((def->linkstate = virDomainNetInterfaceLinkStateTypeFromString(linkstate)) <= 0) {
|
||||||
|
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
|
||||||
|
index 597ae3d938..9cedc8d6d2 100644
|
||||||
|
--- a/src/conf/domain_validate.c
|
||||||
|
+++ b/src/conf/domain_validate.c
|
||||||
|
@@ -2160,12 +2160,18 @@ virDomainNetDefValidate(const virDomainNetDef *net)
|
||||||
|
if (net->type != VIR_DOMAIN_NET_TYPE_USER &&
|
||||||
|
net->type != VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
|
||||||
|
if (net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST) {
|
||||||
|
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("The 'passt' backend can only be used with interface type='user' or type='vhostuser'"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (net->sourceDev && net->backend.type != VIR_DOMAIN_NET_BACKEND_PASST) {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
+ _("The 'dev' attribute of the <source> element can only be used with <interface> type='user' or type='vhostuser' if the <backend> type='passt'"));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (net->nPortForwards > 0) {
|
||||||
|
size_t p;
|
||||||
|
|
||||||
|
diff --git a/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml b/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
|
||||||
|
index a1f9366722..529aff11f8 100644
|
||||||
|
--- a/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
|
||||||
|
+++ b/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<interface type='vhostuser'>
|
||||||
|
<mac address='00:11:22:33:44:55'/>
|
||||||
|
+ <source dev='eth42'/>
|
||||||
|
<ip address='172.17.2.0' family='ipv4' prefix='24'/>
|
||||||
|
<ip address='2001:db8:ac10:fd01::feed' family='ipv6'/>
|
||||||
|
<portForward proto='tcp' address='2001:db8:ac10:fd01::1:10'>
|
||||||
|
@@ -63,6 +64,7 @@
|
||||||
|
</interface>
|
||||||
|
<interface type='vhostuser'>
|
||||||
|
<mac address='00:11:22:33:44:11'/>
|
||||||
|
+ <source dev='eth43'/>
|
||||||
|
<model type='virtio'/>
|
||||||
|
<backend type='passt'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,49 @@
|
|||||||
|
From e9899b64816f8086038098b44690df076d93d8d8 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <e9899b64816f8086038098b44690df076d93d8d8.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Tue, 8 Apr 2025 16:25:37 +0200
|
||||||
|
Subject: [PATCH] esx: Accept empty "path" URI component same way as "/"
|
||||||
|
|
||||||
|
When connecting to "esx://" URI there's code which prints a warning that
|
||||||
|
the path is not "empty". The check validates that "uri->path" is "/".
|
||||||
|
|
||||||
|
In case when the user uses URI such as:
|
||||||
|
|
||||||
|
esx://hostname
|
||||||
|
|
||||||
|
the warning is printed as well. Since there is no effective difference
|
||||||
|
betweeen the two allow empty strings as well.
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-86459
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 59f40ba67cc7d0a3f8eeb601c2f3c84def24a361)
|
||||||
|
---
|
||||||
|
src/esx/esx_driver.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
|
||||||
|
index 6ae4ef9658..512ca6c028 100644
|
||||||
|
--- a/src/esx/esx_driver.c
|
||||||
|
+++ b/src/esx/esx_driver.c
|
||||||
|
@@ -687,7 +687,9 @@ esxConnectToVCenter(esxPrivate *priv,
|
||||||
|
g_autofree char *url = NULL;
|
||||||
|
|
||||||
|
if (!hostSystemIPAddress &&
|
||||||
|
- (!priv->parsedUri->path || STREQ(priv->parsedUri->path, "/"))) {
|
||||||
|
+ (!priv->parsedUri->path ||
|
||||||
|
+ STREQ(priv->parsedUri->path, "") ||
|
||||||
|
+ STREQ(priv->parsedUri->path, "/"))) {
|
||||||
|
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
|
_("Path has to specify the datacenter and compute resource"));
|
||||||
|
return -1;
|
||||||
|
@@ -799,6 +801,7 @@ esxConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
||||||
|
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
||||||
|
|
||||||
|
if (STRCASENEQ(conn->uri->scheme, "vpx") &&
|
||||||
|
+ STRNEQ(conn->uri->path, "") &&
|
||||||
|
STRNEQ(conn->uri->path, "/")) {
|
||||||
|
VIR_WARN("Ignoring unexpected path '%s' for non-vpx scheme '%s'",
|
||||||
|
conn->uri->path, conn->uri->scheme);
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,63 @@
|
|||||||
|
From 7caecd5f75f22d6bab74efcb3bc151f8bf441ec9 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <7caecd5f75f22d6bab74efcb3bc151f8bf441ec9.1744876587.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Tue, 25 Mar 2025 07:23:01 +0100
|
||||||
|
Subject: [PATCH] esxConnectListAllDomains: Don't propagate failure to lookup a
|
||||||
|
single domain
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
In esxConnectListAllDomains if the lookup of the VM name and UUID fails
|
||||||
|
for a single VM (possible e.g. with broken storage) the whole API would
|
||||||
|
return failure even when there are working VMs.
|
||||||
|
|
||||||
|
Rework the lookup so that if a subset fails we ignore the failure on
|
||||||
|
those. We report an error only if lookup of all of the objects failed.
|
||||||
|
Failure is reported from the last one.
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-80606
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
(cherry picked from commit 7d4de62cfa8c684b2d63a48c71f0ae009acddf62)
|
||||||
|
---
|
||||||
|
src/esx/esx_driver.c | 22 ++++++++++++----------
|
||||||
|
1 file changed, 12 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
|
||||||
|
index 554fb3e18f..6ae4ef9658 100644
|
||||||
|
--- a/src/esx/esx_driver.c
|
||||||
|
+++ b/src/esx/esx_driver.c
|
||||||
|
@@ -4792,18 +4792,20 @@ esxConnectListAllDomains(virConnectPtr conn,
|
||||||
|
virtualMachine = virtualMachine->_next) {
|
||||||
|
g_autofree char *name = NULL;
|
||||||
|
|
||||||
|
- if (needIdentity) {
|
||||||
|
- if (esxVI_GetVirtualMachineIdentity(virtualMachine, &id,
|
||||||
|
- &name, uuid) < 0) {
|
||||||
|
- goto cleanup;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ /* If the lookup of the required properties fails for some of the machines
|
||||||
|
+ * in the list it's preferrable to return the valid objects instead of
|
||||||
|
+ * failing outright */
|
||||||
|
+ if ((needIdentity && esxVI_GetVirtualMachineIdentity(virtualMachine, &id, &name, uuid) < 0) ||
|
||||||
|
+ (needPowerState && esxVI_GetVirtualMachinePowerState(virtualMachine, &powerState) < 0)) {
|
||||||
|
|
||||||
|
- if (needPowerState) {
|
||||||
|
- if (esxVI_GetVirtualMachinePowerState(virtualMachine,
|
||||||
|
- &powerState) < 0) {
|
||||||
|
+ /* Raise error only if we didn't successfuly fill any domain */
|
||||||
|
+ if (count == 0 && !virtualMachine->_next)
|
||||||
|
goto cleanup;
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ /* failure to fetch information of a single VM must not interrupt
|
||||||
|
+ * the lookup of the rest */
|
||||||
|
+ virResetLastError();
|
||||||
|
+ continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* filter by active state */
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,51 @@
|
|||||||
|
From a96d1c90832b639c81f6cd893a79610d4379594d Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <a96d1c90832b639c81f6cd893a79610d4379594d.1744876587.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Mon, 7 Apr 2025 13:35:37 +0200
|
||||||
|
Subject: [PATCH] libvirt-host: Clarify/fix description of the CPU frequency
|
||||||
|
field
|
||||||
|
|
||||||
|
The 'virNodeInfo' field for CPU frequency is named 'mhz'. The docs were
|
||||||
|
mentioning 'mHZ', which is neither the field name nor proper spelling of
|
||||||
|
the unit.
|
||||||
|
|
||||||
|
Reword the paragraph to mention "CPU frequency" instead and explicitly
|
||||||
|
name the field in virNodeInfo struct.
|
||||||
|
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit e54cc1500ccfb36cd5b67eb4d886c491fdda5b2b)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-86197
|
||||||
|
---
|
||||||
|
src/libvirt-host.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libvirt-host.c b/src/libvirt-host.c
|
||||||
|
index b3a6421a7f..318a664d24 100644
|
||||||
|
--- a/src/libvirt-host.c
|
||||||
|
+++ b/src/libvirt-host.c
|
||||||
|
@@ -410,9 +410,9 @@ virConnectGetMaxVcpus(virConnectPtr conn,
|
||||||
|
* Use of this API is strongly discouraged as the information provided
|
||||||
|
* is not guaranteed to be accurate on all hardware platforms.
|
||||||
|
*
|
||||||
|
- * The mHZ value merely reflects the speed that the first CPU in the
|
||||||
|
- * machine is currently running at. This speed may vary across CPUs
|
||||||
|
- * and changes continually as the host OS throttles.
|
||||||
|
+ * The CPU frequency value (field 'mhz' in virNodeInfo) merely reflects the
|
||||||
|
+ * speed that the first CPU in the machine is currently running at. This speed
|
||||||
|
+ * may vary across CPUs and changes continually as the host OS throttles.
|
||||||
|
*
|
||||||
|
* The nodes/sockets/cores/threads data is potentially inaccurate as
|
||||||
|
* it assumes a symmetric installation. If one NUMA node has more
|
||||||
|
@@ -420,7 +420,7 @@ virConnectGetMaxVcpus(virConnectPtr conn,
|
||||||
|
* wrong. It is also not able to report about CPU dies.
|
||||||
|
*
|
||||||
|
* Applications are recommended to use the virConnectGetCapabilities()
|
||||||
|
- * call instead, which provides all the information except CPU mHZ,
|
||||||
|
+ * call instead, which provides all the information except CPU frequency,
|
||||||
|
* in a more accurate representation.
|
||||||
|
*
|
||||||
|
* Returns 0 in case of success and -1 in case of failure.
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,55 @@
|
|||||||
|
From 90859b9c9cda1ab3daa34847ac4608cf451102ce Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <90859b9c9cda1ab3daa34847ac4608cf451102ce.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Mon, 7 Apr 2025 14:58:41 +0200
|
||||||
|
Subject: [PATCH] manpages: virsh: Use disclaimer from 'virNodeGetInfo()' for
|
||||||
|
'virsh nodeinfo'
|
||||||
|
|
||||||
|
Adapt the disclarimer about the data not being accurate in many cases
|
||||||
|
from the API docs to the virsh command using the aforementioned API.
|
||||||
|
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 617e2dc3194204a88309e3da55bec8743a5df2ea)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-86197
|
||||||
|
---
|
||||||
|
docs/manpages/virsh.rst | 23 +++++++++++++++++++----
|
||||||
|
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
|
||||||
|
index 2e525d3fac..aea920b7a7 100644
|
||||||
|
--- a/docs/manpages/virsh.rst
|
||||||
|
+++ b/docs/manpages/virsh.rst
|
||||||
|
@@ -427,10 +427,25 @@ nodeinfo
|
||||||
|
nodeinfo
|
||||||
|
|
||||||
|
Returns basic information about the node, like number and type of CPU,
|
||||||
|
-and size of the physical memory. The output corresponds to virNodeInfo
|
||||||
|
-structure. Specifically, the "CPU socket(s)" field means number of CPU
|
||||||
|
-sockets per NUMA cell. The information libvirt displays is dependent
|
||||||
|
-upon what each architecture may provide.
|
||||||
|
+and size of the physical memory.
|
||||||
|
+
|
||||||
|
+Use of this command is strongly discouraged as the information provided
|
||||||
|
+is not guaranteed to be accurate on all hardware platforms.
|
||||||
|
+
|
||||||
|
+The *CPU frequency* value merely reflects the speed that the first CPU in the
|
||||||
|
+machine is currently running at. This speed may vary across CPUs and changes
|
||||||
|
+continually as the host OS throttles.
|
||||||
|
+
|
||||||
|
+The data structure used to fetch the data is not extensible thus only supports
|
||||||
|
+global nodes/sockets/cores/threads (sockets/cores/threads is per NUMA node)
|
||||||
|
+topology information. If the host CPU has any further groupings (e.g.
|
||||||
|
+dies, clusters, etc) or the NUMA topology is non-symmetrical the data structure
|
||||||
|
+can't faithfully represent the system. In such cases a fake topology
|
||||||
|
+(nodes = 1, sockets = 1, cores = number of host cpus, threads = 1) which
|
||||||
|
+only correctly represents the total host CPU count is reported.
|
||||||
|
+
|
||||||
|
+Recommended replacement is to use the *capabilities* command which reports
|
||||||
|
+the data (except frequency) under ``/capabilities/host/topology`` XPath.
|
||||||
|
|
||||||
|
|
||||||
|
nodecpumap
|
||||||
|
--
|
||||||
|
2.49.0
|
36
libvirt-qemu-Allow-virtio-mem-on-CCW.patch
Normal file
36
libvirt-qemu-Allow-virtio-mem-on-CCW.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 5c4270439f99bd52f91613a6ee833aa4bcb131c4 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <5c4270439f99bd52f91613a6ee833aa4bcb131c4.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Wed, 15 Jan 2025 13:00:36 +0100
|
||||||
|
Subject: [PATCH] qemu: Allow virtio-mem on CCW
|
||||||
|
|
||||||
|
After previous commits, we can allow virtio-mem to live on CCW
|
||||||
|
channel.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit ee0320a7fccc8088bc2830fe949ae2339db208cb)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_domain.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||||
|
index b6c36d85d7..4234e4605b 100644
|
||||||
|
--- a/src/qemu/qemu_domain.c
|
||||||
|
+++ b/src/qemu/qemu_domain.c
|
||||||
|
@@ -7673,9 +7673,10 @@ qemuDomainDefValidateMemoryHotplugDevice(const virDomainMemoryDef *mem,
|
||||||
|
|
||||||
|
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
|
||||||
|
if (mem->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
|
||||||
|
+ mem->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
|
||||||
|
mem->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
- _("only 'pci' addresses are supported for the %1$s device"),
|
||||||
|
+ _("only 'pci' and 'ccw' addresses are supported for the %1$s device"),
|
||||||
|
virDomainMemoryModelTypeToString(mem->model));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.49.0
|
50
libvirt-qemu-Do-NOT-autoadd-NUMA-node-for-s390.patch
Normal file
50
libvirt-qemu-Do-NOT-autoadd-NUMA-node-for-s390.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From b2e5469f35657b7d46842b39be04ecc34e5ff659 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <b2e5469f35657b7d46842b39be04ecc34e5ff659.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Mon, 20 Jan 2025 17:10:24 +0100
|
||||||
|
Subject: [PATCH] qemu: Do NOT autoadd NUMA node for s390
|
||||||
|
|
||||||
|
In some cases, we might automatically add a NUMA node. But this
|
||||||
|
doesn't work for s390 really, because in its commit
|
||||||
|
v2.12.0-rc0~41^2~6 QEMU forbade specifying NUMA nodes for s390.
|
||||||
|
Suppress automatic adding of NUMA node on our side.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: David Hildenbrand <david@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit a8ed747b9a8c5cbd07557edc66962bc26205d7fb)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_domain.c | 3 ++-
|
||||||
|
src/qemu/qemu_postparse.c | 1 +
|
||||||
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||||
|
index 89e1b50366..b6c36d85d7 100644
|
||||||
|
--- a/src/qemu/qemu_domain.c
|
||||||
|
+++ b/src/qemu/qemu_domain.c
|
||||||
|
@@ -7761,7 +7761,8 @@ qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!ARCH_IS_PPC64(def->os.arch)) {
|
||||||
|
+ if (!ARCH_IS_PPC64(def->os.arch) &&
|
||||||
|
+ !ARCH_IS_S390(def->os.arch)) {
|
||||||
|
/* due to guest support, qemu would silently enable NUMA with one node
|
||||||
|
* once the memory hotplug backend is enabled. To avoid possible
|
||||||
|
* confusion we will enforce user originated numa configuration along
|
||||||
|
diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
|
||||||
|
index 892330646a..141847b0ef 100644
|
||||||
|
--- a/src/qemu/qemu_postparse.c
|
||||||
|
+++ b/src/qemu/qemu_postparse.c
|
||||||
|
@@ -1806,6 +1806,7 @@ qemuDomainDefNumaAutoAdd(virDomainDef *def,
|
||||||
|
|
||||||
|
if (!abiUpdate ||
|
||||||
|
!virDomainDefHasMemoryHotplug(def) ||
|
||||||
|
+ qemuDomainIsS390CCW(def) ||
|
||||||
|
virDomainNumaGetNodeCount(def->numa) > 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,135 @@
|
|||||||
|
From b6e803fc90bb9d49345adca4f38856ce97fde9f8 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <b6e803fc90bb9d49345adca4f38856ce97fde9f8.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Date: Wed, 9 Apr 2025 15:35:20 +0200
|
||||||
|
Subject: [PATCH] qemu: Properly propagate migration state to TPM cleanup code
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
When migrating a domain with TPM state on a shared disk, we need to skip
|
||||||
|
TPM cleanup on both ends. So far the code only handled successful
|
||||||
|
migration and skipped the cleanup on the source host. But if the
|
||||||
|
migration failed for some reason, the cleanup would be incorrectly
|
||||||
|
called on the destination host removing the TPM files even though the
|
||||||
|
domain was still running on the source host.
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-82411
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
(cherry picked from commit 97ed7f22b089c5fdd9ee02cffc6854f6e021ab2b)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-86800
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_driver.c | 7 +++++--
|
||||||
|
src/qemu/qemu_migration.c | 6 +++---
|
||||||
|
src/qemu/qemu_process.c | 8 ++------
|
||||||
|
3 files changed, 10 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||||
|
index f8f3d2c725..4c6eff9286 100644
|
||||||
|
--- a/src/qemu/qemu_driver.c
|
||||||
|
+++ b/src/qemu/qemu_driver.c
|
||||||
|
@@ -3853,6 +3853,7 @@ processMonitorEOFEvent(virQEMUDriver *driver,
|
||||||
|
const char *auditReason = "shutdown";
|
||||||
|
unsigned int stopFlags = 0;
|
||||||
|
virObjectEvent *event = NULL;
|
||||||
|
+ bool migration;
|
||||||
|
|
||||||
|
if (vm->def->id != domid) {
|
||||||
|
VIR_DEBUG("Domain %s was restarted, ignoring EOF",
|
||||||
|
@@ -3863,6 +3864,8 @@ processMonitorEOFEvent(virQEMUDriver *driver,
|
||||||
|
if (qemuProcessBeginStopJob(vm, VIR_JOB_DESTROY, true) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
+ migration = vm->job->asyncJob == VIR_ASYNC_JOB_MIGRATION_IN;
|
||||||
|
+
|
||||||
|
if (!virDomainObjIsActive(vm)) {
|
||||||
|
VIR_DEBUG("Domain %p '%s' is not active, ignoring EOF",
|
||||||
|
vm, vm->def->name);
|
||||||
|
@@ -3877,7 +3880,7 @@ processMonitorEOFEvent(virQEMUDriver *driver,
|
||||||
|
auditReason = "failed";
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (vm->job->asyncJob == VIR_ASYNC_JOB_MIGRATION_IN) {
|
||||||
|
+ if (migration) {
|
||||||
|
stopFlags |= VIR_QEMU_PROCESS_STOP_MIGRATED;
|
||||||
|
qemuMigrationDstErrorSave(driver, vm->def->name,
|
||||||
|
qemuMonitorLastError(priv->mon));
|
||||||
|
@@ -3890,7 +3893,7 @@ processMonitorEOFEvent(virQEMUDriver *driver,
|
||||||
|
virObjectEventStateQueue(driver->domainEventState, event);
|
||||||
|
|
||||||
|
endjob:
|
||||||
|
- qemuDomainRemoveInactive(driver, vm, 0, false);
|
||||||
|
+ qemuDomainRemoveInactive(driver, vm, 0, migration);
|
||||||
|
qemuProcessEndStopJob(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
||||||
|
index 62da892254..5cb7642315 100644
|
||||||
|
--- a/src/qemu/qemu_migration.c
|
||||||
|
+++ b/src/qemu/qemu_migration.c
|
||||||
|
@@ -3592,7 +3592,7 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver,
|
||||||
|
* and there is no 'goto cleanup;' in the middle of those */
|
||||||
|
VIR_FREE(priv->origname);
|
||||||
|
virDomainObjRemoveTransientDef(vm);
|
||||||
|
- qemuDomainRemoveInactive(driver, vm, 0, false);
|
||||||
|
+ qemuDomainRemoveInactive(driver, vm, 0, true);
|
||||||
|
}
|
||||||
|
virDomainObjEndAPI(&vm);
|
||||||
|
virErrorRestore(&origErr);
|
||||||
|
@@ -6963,7 +6963,7 @@ qemuMigrationDstFinishActive(virQEMUDriver *driver,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!qemuDomainObjIsActive(vm))
|
||||||
|
- qemuDomainRemoveInactive(driver, vm, VIR_DOMAIN_UNDEFINE_TPM, false);
|
||||||
|
+ qemuDomainRemoveInactive(driver, vm, VIR_DOMAIN_UNDEFINE_TPM, true);
|
||||||
|
|
||||||
|
virErrorRestore(&orig_err);
|
||||||
|
return NULL;
|
||||||
|
@@ -7099,7 +7099,7 @@ qemuMigrationProcessUnattended(virQEMUDriver *driver,
|
||||||
|
qemuMigrationJobFinish(vm);
|
||||||
|
|
||||||
|
if (!virDomainObjIsActive(vm))
|
||||||
|
- qemuDomainRemoveInactive(driver, vm, 0, false);
|
||||||
|
+ qemuDomainRemoveInactive(driver, vm, 0, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||||
|
index fac5678439..ad7e99750f 100644
|
||||||
|
--- a/src/qemu/qemu_process.c
|
||||||
|
+++ b/src/qemu/qemu_process.c
|
||||||
|
@@ -8731,7 +8731,6 @@ void qemuProcessStop(virQEMUDriver *driver,
|
||||||
|
size_t i;
|
||||||
|
g_autofree char *timestamp = NULL;
|
||||||
|
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||||
|
- bool outgoingMigration;
|
||||||
|
|
||||||
|
VIR_DEBUG("Shutting down vm=%p name=%s id=%d pid=%lld, "
|
||||||
|
"reason=%s, asyncJob=%s, flags=0x%x",
|
||||||
|
@@ -8807,10 +8806,7 @@ void qemuProcessStop(virQEMUDriver *driver,
|
||||||
|
|
||||||
|
qemuDomainCleanupRun(driver, vm);
|
||||||
|
|
||||||
|
- outgoingMigration = (flags & VIR_QEMU_PROCESS_STOP_MIGRATED) &&
|
||||||
|
- (asyncJob == VIR_ASYNC_JOB_MIGRATION_OUT);
|
||||||
|
-
|
||||||
|
- qemuExtDevicesStop(driver, vm, outgoingMigration);
|
||||||
|
+ qemuExtDevicesStop(driver, vm, !!(flags & VIR_QEMU_PROCESS_STOP_MIGRATED));
|
||||||
|
|
||||||
|
qemuDBusStop(driver, vm);
|
||||||
|
|
||||||
|
@@ -9070,7 +9066,7 @@ qemuProcessAutoDestroy(virDomainObj *dom,
|
||||||
|
VIR_DOMAIN_EVENT_STOPPED,
|
||||||
|
VIR_DOMAIN_EVENT_STOPPED_DESTROYED);
|
||||||
|
|
||||||
|
- qemuDomainRemoveInactive(driver, dom, 0, false);
|
||||||
|
+ qemuDomainRemoveInactive(driver, dom, 0, !!(stopFlags & VIR_QEMU_PROCESS_STOP_MIGRATED));
|
||||||
|
|
||||||
|
qemuProcessEndStopJob(dom);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,230 @@
|
|||||||
|
From c28859cbaeac298adbe957956cf8442c9a6b7264 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <c28859cbaeac298adbe957956cf8442c9a6b7264.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Date: Tue, 11 Mar 2025 10:05:28 +0100
|
||||||
|
Subject: [PATCH] qemu: Rename outgoingMigration parameter in various TPM
|
||||||
|
functions
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
The parameter is used to skip TPM state cleanup on outgoing migration
|
||||||
|
with shared storage. But we also need to skip the cleanup after a failed
|
||||||
|
incoming migration. Let's call the parameter "migration" to reflect its
|
||||||
|
usage on both sides of migration.
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
(cherry picked from commit a5e4ca6f02dc8250f84163a0d19b69300affde43)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-86800
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_domain.c | 8 ++++----
|
||||||
|
src/qemu/qemu_domain.h | 2 +-
|
||||||
|
src/qemu/qemu_extdevice.c | 8 ++++----
|
||||||
|
src/qemu/qemu_extdevice.h | 4 ++--
|
||||||
|
src/qemu/qemu_tpm.c | 19 +++++++++----------
|
||||||
|
src/qemu/qemu_tpm.h | 4 ++--
|
||||||
|
6 files changed, 22 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||||
|
index 1ccaff90d9..89e1b50366 100644
|
||||||
|
--- a/src/qemu/qemu_domain.c
|
||||||
|
+++ b/src/qemu/qemu_domain.c
|
||||||
|
@@ -5749,7 +5749,7 @@ static void
|
||||||
|
qemuDomainRemoveInactiveCommon(virQEMUDriver *driver,
|
||||||
|
virDomainObj *vm,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
{
|
||||||
|
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||||
|
g_autofree char *snapDir = NULL;
|
||||||
|
@@ -5775,7 +5775,7 @@ qemuDomainRemoveInactiveCommon(virQEMUDriver *driver,
|
||||||
|
if (rmdir(chkDir) < 0 && errno != ENOENT)
|
||||||
|
VIR_WARN("unable to remove checkpoint directory %s", chkDir);
|
||||||
|
}
|
||||||
|
- qemuExtDevicesCleanupHost(driver, vm->def, flags, outgoingMigration);
|
||||||
|
+ qemuExtDevicesCleanupHost(driver, vm->def, flags, migration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5788,14 +5788,14 @@ void
|
||||||
|
qemuDomainRemoveInactive(virQEMUDriver *driver,
|
||||||
|
virDomainObj *vm,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
{
|
||||||
|
if (vm->persistent) {
|
||||||
|
/* Short-circuit, we don't want to remove a persistent domain */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- qemuDomainRemoveInactiveCommon(driver, vm, flags, outgoingMigration);
|
||||||
|
+ qemuDomainRemoveInactiveCommon(driver, vm, flags, migration);
|
||||||
|
|
||||||
|
virDomainObjListRemove(driver->domains, vm);
|
||||||
|
}
|
||||||
|
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
|
||||||
|
index e810f79599..6246988491 100644
|
||||||
|
--- a/src/qemu/qemu_domain.h
|
||||||
|
+++ b/src/qemu/qemu_domain.h
|
||||||
|
@@ -689,7 +689,7 @@ int qemuDomainMomentDiscardAll(void *payload,
|
||||||
|
void qemuDomainRemoveInactive(virQEMUDriver *driver,
|
||||||
|
virDomainObj *vm,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration);
|
||||||
|
+ bool migration);
|
||||||
|
|
||||||
|
void
|
||||||
|
qemuDomainRemoveInactiveLocked(virQEMUDriver *driver,
|
||||||
|
diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
|
||||||
|
index 2384bab7a6..7451e0fa03 100644
|
||||||
|
--- a/src/qemu/qemu_extdevice.c
|
||||||
|
+++ b/src/qemu/qemu_extdevice.c
|
||||||
|
@@ -154,7 +154,7 @@ void
|
||||||
|
qemuExtDevicesCleanupHost(virQEMUDriver *driver,
|
||||||
|
virDomainDef *def,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
@@ -165,7 +165,7 @@ qemuExtDevicesCleanupHost(virQEMUDriver *driver,
|
||||||
|
virDomainTPMDef *tpm = def->tpms[i];
|
||||||
|
|
||||||
|
if (tpm->type == VIR_DOMAIN_TPM_TYPE_EMULATOR)
|
||||||
|
- qemuExtTPMCleanupHost(driver, tpm, flags, outgoingMigration);
|
||||||
|
+ qemuExtTPMCleanupHost(driver, tpm, flags, migration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -266,7 +266,7 @@ qemuExtDevicesStart(virQEMUDriver *driver,
|
||||||
|
void
|
||||||
|
qemuExtDevicesStop(virQEMUDriver *driver,
|
||||||
|
virDomainObj *vm,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
{
|
||||||
|
virDomainDef *def = vm->def;
|
||||||
|
size_t i;
|
||||||
|
@@ -283,7 +283,7 @@ qemuExtDevicesStop(virQEMUDriver *driver,
|
||||||
|
|
||||||
|
for (i = 0; i < def->ntpms; i++) {
|
||||||
|
if (def->tpms[i]->type == VIR_DOMAIN_TPM_TYPE_EMULATOR)
|
||||||
|
- qemuExtTPMStop(driver, vm, outgoingMigration);
|
||||||
|
+ qemuExtTPMStop(driver, vm, migration);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < def->nnets; i++) {
|
||||||
|
diff --git a/src/qemu/qemu_extdevice.h b/src/qemu/qemu_extdevice.h
|
||||||
|
index d4ac9f395c..36f7fb77a8 100644
|
||||||
|
--- a/src/qemu/qemu_extdevice.h
|
||||||
|
+++ b/src/qemu/qemu_extdevice.h
|
||||||
|
@@ -48,7 +48,7 @@ int qemuExtDevicesPrepareHost(virQEMUDriver *driver,
|
||||||
|
void qemuExtDevicesCleanupHost(virQEMUDriver *driver,
|
||||||
|
virDomainDef *def,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
|
int qemuExtDevicesStart(virQEMUDriver *driver,
|
||||||
|
@@ -59,7 +59,7 @@ int qemuExtDevicesStart(virQEMUDriver *driver,
|
||||||
|
|
||||||
|
void qemuExtDevicesStop(virQEMUDriver *driver,
|
||||||
|
virDomainObj *vm,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
|
bool qemuExtDevicesHasDevice(virDomainDef *def);
|
||||||
|
diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
|
||||||
|
index f5e0184e54..f910a26286 100644
|
||||||
|
--- a/src/qemu/qemu_tpm.c
|
||||||
|
+++ b/src/qemu/qemu_tpm.c
|
||||||
|
@@ -907,7 +907,8 @@ qemuTPMEmulatorInitPaths(virDomainTPMDef *tpm,
|
||||||
|
* @driver: QEMU driver
|
||||||
|
* @tpm: TPM definition
|
||||||
|
* @flags: flags indicating whether to keep or remove TPM persistent state
|
||||||
|
- * @outgoingMigration: whether cleanup is due to an outgoing migration
|
||||||
|
+ * @migration: whether cleanup is due to a successful outgoing or failed
|
||||||
|
+ * incoming migration
|
||||||
|
*
|
||||||
|
* Clean up persistent storage for the swtpm.
|
||||||
|
*/
|
||||||
|
@@ -915,14 +916,12 @@ static void
|
||||||
|
qemuTPMEmulatorCleanupHost(virQEMUDriver *driver,
|
||||||
|
virDomainTPMDef *tpm,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
{
|
||||||
|
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||||
|
|
||||||
|
- /* Never remove the state in case of outgoing migration with shared
|
||||||
|
- * storage.
|
||||||
|
- */
|
||||||
|
- if (outgoingMigration &&
|
||||||
|
+ /* Never remove the state in case of migration with shared storage. */
|
||||||
|
+ if (migration &&
|
||||||
|
virFileIsSharedFS(tpm->data.emulator.source_path, cfg->sharedFilesystems) == 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
@@ -1293,9 +1292,9 @@ void
|
||||||
|
qemuExtTPMCleanupHost(virQEMUDriver *driver,
|
||||||
|
virDomainTPMDef *tpm,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
{
|
||||||
|
- qemuTPMEmulatorCleanupHost(driver, tpm, flags, outgoingMigration);
|
||||||
|
+ qemuTPMEmulatorCleanupHost(driver, tpm, flags, migration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1319,7 +1318,7 @@ qemuExtTPMStart(virQEMUDriver *driver,
|
||||||
|
void
|
||||||
|
qemuExtTPMStop(virQEMUDriver *driver,
|
||||||
|
virDomainObj *vm,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
{
|
||||||
|
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||||
|
g_autofree char *shortName = virDomainDefGetShortName(vm->def);
|
||||||
|
@@ -1329,7 +1328,7 @@ qemuExtTPMStop(virQEMUDriver *driver,
|
||||||
|
return;
|
||||||
|
|
||||||
|
qemuTPMEmulatorStop(cfg->swtpmStateDir, shortName);
|
||||||
|
- if (outgoingMigration && qemuTPMHasSharedStorage(driver, vm->def))
|
||||||
|
+ if (migration && qemuTPMHasSharedStorage(driver, vm->def))
|
||||||
|
restoreTPMStateLabel = false;
|
||||||
|
|
||||||
|
if (qemuSecurityRestoreTPMLabels(driver, vm, restoreTPMStateLabel, false) < 0)
|
||||||
|
diff --git a/src/qemu/qemu_tpm.h b/src/qemu/qemu_tpm.h
|
||||||
|
index 7096060a2a..37813087cf 100644
|
||||||
|
--- a/src/qemu/qemu_tpm.h
|
||||||
|
+++ b/src/qemu/qemu_tpm.h
|
||||||
|
@@ -38,7 +38,7 @@ int qemuExtTPMPrepareHost(virQEMUDriver *driver,
|
||||||
|
void qemuExtTPMCleanupHost(virQEMUDriver *driver,
|
||||||
|
virDomainTPMDef *tpm,
|
||||||
|
virDomainUndefineFlagsValues flags,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
|
int qemuExtTPMStart(virQEMUDriver *driver,
|
||||||
|
@@ -52,7 +52,7 @@ int qemuExtTPMStart(virQEMUDriver *driver,
|
||||||
|
|
||||||
|
void qemuExtTPMStop(virQEMUDriver *driver,
|
||||||
|
virDomainObj *vm,
|
||||||
|
- bool outgoingMigration)
|
||||||
|
+ bool migration)
|
||||||
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
|
|
||||||
|
int qemuExtTPMSetupCgroup(virQEMUDriver *driver,
|
||||||
|
--
|
||||||
|
2.49.0
|
86
libvirt-qemu-Validate-virtio-mem-ccw.patch
Normal file
86
libvirt-qemu-Validate-virtio-mem-ccw.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
From 6fa979b9735e988971203bca10903ba587a27f79 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <6fa979b9735e988971203bca10903ba587a27f79.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Wed, 15 Jan 2025 15:48:41 +0100
|
||||||
|
Subject: [PATCH] qemu: Validate virtio-mem-ccw
|
||||||
|
|
||||||
|
There are basically two differences between virtio-mem-ccw and
|
||||||
|
virtio-mem-pci. s390 doesn't allow mixing different page sizes
|
||||||
|
and there's no NUMA support in QEMU.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit 541dfe40bc9b3fe90d488ab85df8ea3ea31b8249)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_validate.c | 35 ++++++++++++++++++++++++++++++++---
|
||||||
|
1 file changed, 32 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
|
||||||
|
index 1c61038f93..97f8f58ffd 100644
|
||||||
|
--- a/src/qemu/qemu_validate.c
|
||||||
|
+++ b/src/qemu/qemu_validate.c
|
||||||
|
@@ -5259,7 +5259,8 @@ qemuValidateDomainDeviceDefHub(virDomainHubDef *hub,
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
-qemuValidateDomainDeviceDefMemory(virDomainMemoryDef *mem,
|
||||||
|
+qemuValidateDomainDeviceDefMemory(const virDomainMemoryDef *mem,
|
||||||
|
+ const virDomainDef *def,
|
||||||
|
virQEMUCaps *qemuCaps)
|
||||||
|
{
|
||||||
|
virSGXCapability *sgxCaps;
|
||||||
|
@@ -5298,12 +5299,40 @@ qemuValidateDomainDeviceDefMemory(virDomainMemoryDef *mem,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
|
||||||
|
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI)) {
|
||||||
|
+ if ((mem->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
|
||||||
|
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI)) ||
|
||||||
|
+ (mem->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
|
||||||
|
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW))) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("virtio-mem isn't supported by this QEMU binary"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (mem->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
|
||||||
|
+ /* virtio-mem-ccw has a few differences compared to virtio-mem-pci:
|
||||||
|
+ *
|
||||||
|
+ * 1) corresponding memory-backing-* object can't have a different
|
||||||
|
+ * page size than the boot memory (see s390_machine_device_plug()
|
||||||
|
+ * in qemu sources).
|
||||||
|
+ * 2) Since its commit v2.12.0-rc0~41^2~6 QEMU doesn't allow NUMA
|
||||||
|
+ * for s390.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ if (mem->source.virtio_mem.pagesize != 0 &&
|
||||||
|
+ def->mem.nhugepages &&
|
||||||
|
+ mem->source.virtio_mem.pagesize != def->mem.hugepages[0].size) {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
+ _("virtio-mem-ccw can't use different page size than the boot memory"));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (mem->targetNode != 0 && mem->targetNode != -1) {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
+ _("NUMA nodes are not supported for virtio-mem-ccw"));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (mem->target.virtio_mem.dynamicMemslots == VIR_TRISTATE_BOOL_YES &&
|
||||||
|
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_DYNAMIC_MEMSLOTS)) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
@@ -5490,7 +5519,7 @@ qemuValidateDomainDeviceDef(const virDomainDeviceDef *dev,
|
||||||
|
return qemuValidateDomainDeviceDefSound(dev->data.sound, qemuCaps);
|
||||||
|
|
||||||
|
case VIR_DOMAIN_DEVICE_MEMORY:
|
||||||
|
- return qemuValidateDomainDeviceDefMemory(dev->data.memory, qemuCaps);
|
||||||
|
+ return qemuValidateDomainDeviceDefMemory(dev->data.memory, def, qemuCaps);
|
||||||
|
|
||||||
|
case VIR_DOMAIN_DEVICE_SHMEM:
|
||||||
|
return qemuValidateDomainDeviceDefShmem(dev->data.shmem, qemuCaps);
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,44 @@
|
|||||||
|
From bedbe8dd400e242ad346910bc2bdbfb1e6969fdf Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <bedbe8dd400e242ad346910bc2bdbfb1e6969fdf.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Thu, 10 Apr 2025 16:18:29 +0200
|
||||||
|
Subject: [PATCH] qemuDomainBlockCopyCommon: Don't revoke access to file twice
|
||||||
|
on failure
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
If the copy job fails to start up when calling the 'blockdev-mirror'
|
||||||
|
command the code would call qemuDomainStorageSourceChainAccessRevoke()
|
||||||
|
twice; once right after the monitor call and the second time in the
|
||||||
|
'endjob' section.
|
||||||
|
|
||||||
|
Remove the one directly after the monitor call and let the common
|
||||||
|
cleanup handle it.
|
||||||
|
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
(cherry picked from commit 68a83cac64b90b7069e6213d70a2faadb552cb80)
|
||||||
|
https://issues.redhat.com/browse/RHEL-7357
|
||||||
|
---
|
||||||
|
src/qemu/qemu_driver.c | 4 +---
|
||||||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||||
|
index 4c6eff9286..8a354a606a 100644
|
||||||
|
--- a/src/qemu/qemu_driver.c
|
||||||
|
+++ b/src/qemu/qemu_driver.c
|
||||||
|
@@ -14413,10 +14413,8 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
||||||
|
|
||||||
|
virDomainAuditDisk(vm, NULL, mirror, "mirror", ret >= 0);
|
||||||
|
qemuDomainObjExitMonitor(vm);
|
||||||
|
- if (ret < 0) {
|
||||||
|
- qemuDomainStorageSourceChainAccessRevoke(driver, vm, mirror);
|
||||||
|
+ if (ret < 0)
|
||||||
|
goto endjob;
|
||||||
|
- }
|
||||||
|
|
||||||
|
/* Update vm in place to match changes. */
|
||||||
|
need_unlink = false;
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,76 @@
|
|||||||
|
From 4cf058f2a32fac160803b45c818d798ff268b172 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <4cf058f2a32fac160803b45c818d798ff268b172.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Wed, 15 Jan 2025 10:46:16 +0100
|
||||||
|
Subject: [PATCH] qemu_caps: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW
|
||||||
|
|
||||||
|
This capability tracks whether QEMU supports virtio-mem-ccw
|
||||||
|
device. Introduced in QEMU commit v9.2.0-492-gaa910c20ec only
|
||||||
|
upcoming release of QEMU supports the device.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit a46e33a92597ed03147e7f6a0c674cda55a0ec52)
|
||||||
|
|
||||||
|
Conflicts:
|
||||||
|
src/qemu/qemu_capabilities.c: Upstream has more caps added meanwhile.
|
||||||
|
src/qemu/qemu_capabilities.h: Ditto.
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_capabilities.c | 4 ++++
|
||||||
|
src/qemu/qemu_capabilities.h | 3 +++
|
||||||
|
tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml | 1 +
|
||||||
|
3 files changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
||||||
|
index 65e19965dd..1a9cf72482 100644
|
||||||
|
--- a/src/qemu/qemu_capabilities.c
|
||||||
|
+++ b/src/qemu/qemu_capabilities.c
|
||||||
|
@@ -722,6 +722,9 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
||||||
|
"virtio-ccw.loadparm", /* QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM */
|
||||||
|
"netdev-stream-reconnect-miliseconds", /* QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS */
|
||||||
|
"blockdev-set-active", /* QEMU_CAPS_BLOCKDEV_SET_ACTIVE */
|
||||||
|
+
|
||||||
|
+ /* 470 */
|
||||||
|
+ "virtio-mem-ccw", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW */
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1411,6 +1414,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
|
||||||
|
{ "virtio-sound-device", QEMU_CAPS_DEVICE_VIRTIO_SOUND },
|
||||||
|
{ "sev-snp-guest", QEMU_CAPS_SEV_SNP_GUEST },
|
||||||
|
{ "acpi-erst", QEMU_CAPS_DEVICE_ACPI_ERST },
|
||||||
|
+ { "virtio-mem-ccw", QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
||||||
|
index e93e6a01cc..6467a09796 100644
|
||||||
|
--- a/src/qemu/qemu_capabilities.h
|
||||||
|
+++ b/src/qemu/qemu_capabilities.h
|
||||||
|
@@ -702,6 +702,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
||||||
|
QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS, /* 'reconnect-ms' option for netdev stream supported */
|
||||||
|
QEMU_CAPS_BLOCKDEV_SET_ACTIVE, /* blockdev-set-active QMP command supported */
|
||||||
|
|
||||||
|
+ /* 470 */
|
||||||
|
+ QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW, /* -device virtio-mem-ccw */
|
||||||
|
+
|
||||||
|
QEMU_CAPS_LAST /* this must always be the last item */
|
||||||
|
} virQEMUCapsFlags;
|
||||||
|
|
||||||
|
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
|
||||||
|
index 5c5ab096d1..82cabd13b2 100644
|
||||||
|
--- a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
|
||||||
|
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
|
||||||
|
@@ -139,6 +139,7 @@
|
||||||
|
<flag name='chardev-reconnect-miliseconds'/>
|
||||||
|
<flag name='virtio-ccw.loadparm'/>
|
||||||
|
<flag name='netdev-stream-reconnect-miliseconds'/>
|
||||||
|
+ <flag name='virtio-mem-ccw'/>
|
||||||
|
<version>9002050</version>
|
||||||
|
<microcodeVersion>39100285</microcodeVersion>
|
||||||
|
<package>v9.2.0-1203-gd6430c17d7</package>
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,95 @@
|
|||||||
|
From 782c337fb48b56a50ed85cbfe1dc3a8a1342ac08 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <782c337fb48b56a50ed85cbfe1dc3a8a1342ac08.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Mon, 13 Jan 2025 15:48:03 +0100
|
||||||
|
Subject: [PATCH] qemu_command: Use qemuBuildVirtioDevProps() to build cmd line
|
||||||
|
for virtio-mem and virtio-pmem
|
||||||
|
|
||||||
|
Both, virtio-mem and virtio-pmem devices follow traditional QEMU
|
||||||
|
naming convention: their suffix determines what bus they live on.
|
||||||
|
For instance, virtio-mem-pci, virtio-mem-ccw, virtio-pmem-pci.
|
||||||
|
We already have a function that constructs device name following
|
||||||
|
this convention: qemuBuildVirtioDevGetConfigDev().
|
||||||
|
|
||||||
|
While there's no virtio-pmem-ccw device yet, the function can
|
||||||
|
still be used.
|
||||||
|
|
||||||
|
Another advantage of using the function is - it'll be easier in
|
||||||
|
future when we want to configure various virtio aspects of memory
|
||||||
|
devices (like ats, iommu_platform, etc.).
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit 89d56c41ac16452eb5f6f27eb87658277b270f83)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_command.c | 28 ++++++++++++++++++++++++----
|
||||||
|
1 file changed, 24 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||||
|
index b7d61edd19..fb70c79a94 100644
|
||||||
|
--- a/src/qemu/qemu_command.c
|
||||||
|
+++ b/src/qemu/qemu_command.c
|
||||||
|
@@ -967,6 +967,23 @@ qemuBuildVirtioDevGetConfigDev(const virDomainDeviceDef *device,
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ case VIR_DOMAIN_DEVICE_MEMORY:
|
||||||
|
+ switch (device->data.memory->model) {
|
||||||
|
+ case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM:
|
||||||
|
+ *baseName = "virtio-pmem";
|
||||||
|
+ break;
|
||||||
|
+ case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
|
||||||
|
+ *baseName = "virtio-mem";
|
||||||
|
+ break;
|
||||||
|
+ case VIR_DOMAIN_MEMORY_MODEL_DIMM:
|
||||||
|
+ case VIR_DOMAIN_MEMORY_MODEL_NVDIMM:
|
||||||
|
+ case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
|
||||||
|
+ case VIR_DOMAIN_MEMORY_MODEL_NONE:
|
||||||
|
+ case VIR_DOMAIN_MEMORY_MODEL_LAST:
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case VIR_DOMAIN_DEVICE_LEASE:
|
||||||
|
case VIR_DOMAIN_DEVICE_WATCHDOG:
|
||||||
|
case VIR_DOMAIN_DEVICE_GRAPHICS:
|
||||||
|
@@ -979,7 +996,6 @@ qemuBuildVirtioDevGetConfigDev(const virDomainDeviceDef *device,
|
||||||
|
case VIR_DOMAIN_DEVICE_SHMEM:
|
||||||
|
case VIR_DOMAIN_DEVICE_TPM:
|
||||||
|
case VIR_DOMAIN_DEVICE_PANIC:
|
||||||
|
- case VIR_DOMAIN_DEVICE_MEMORY:
|
||||||
|
case VIR_DOMAIN_DEVICE_IOMMU:
|
||||||
|
case VIR_DOMAIN_DEVICE_AUDIO:
|
||||||
|
case VIR_DOMAIN_DEVICE_PSTORE:
|
||||||
|
@@ -3487,12 +3503,16 @@ qemuBuildMemoryDeviceProps(virQEMUDriverConfig *cfg,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM:
|
||||||
|
- device = "virtio-pmem-pci";
|
||||||
|
+ /* Deliberately not setting @device. */
|
||||||
|
+ if (!(props = qemuBuildVirtioDevProps(VIR_DOMAIN_DEVICE_MEMORY, mem, priv->qemuCaps)))
|
||||||
|
+ return NULL;
|
||||||
|
address = mem->target.virtio_pmem.address;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
|
||||||
|
- device = "virtio-mem-pci";
|
||||||
|
+ /* Deliberately not setting @device. */
|
||||||
|
+ if (!(props = qemuBuildVirtioDevProps(VIR_DOMAIN_DEVICE_MEMORY, mem, priv->qemuCaps)))
|
||||||
|
+ return NULL;
|
||||||
|
|
||||||
|
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC) &&
|
||||||
|
qemuBuildMemoryGetPagesize(cfg, def, mem, NULL, NULL, NULL, &prealloc) < 0)
|
||||||
|
@@ -3514,7 +3534,7 @@ qemuBuildMemoryDeviceProps(virQEMUDriverConfig *cfg,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (virJSONValueObjectAdd(&props,
|
||||||
|
- "s:driver", device,
|
||||||
|
+ "S:driver", device,
|
||||||
|
"k:node", mem->targetNode,
|
||||||
|
"P:label-size", labelsize * 1024,
|
||||||
|
"P:block-size", blocksize * 1024,
|
||||||
|
--
|
||||||
|
2.49.0
|
48
libvirt-qemu_domain_address-fix-CCW-virtio-mem-hotplug.patch
Normal file
48
libvirt-qemu_domain_address-fix-CCW-virtio-mem-hotplug.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
From 82f30944276f1cbb997ee42bad66c37cc059067e Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <82f30944276f1cbb997ee42bad66c37cc059067e.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
Date: Tue, 18 Mar 2025 14:48:50 +0100
|
||||||
|
Subject: [PATCH] qemu_domain_address: fix CCW virtio-mem hotplug
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Since commit f23f8ff91a virtio-mem supports also CCW. When hotplugging a
|
||||||
|
virtio-mem device with a CCW address results in a PCI device getting
|
||||||
|
attached. The method qemuDomainAssignMemoryDeviceSlot is only
|
||||||
|
considering PCI as address type and overwriting the CCW address. Adding
|
||||||
|
support for address type CCW.
|
||||||
|
|
||||||
|
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
(cherry picked from commit 9ef080d6d94643fffc413127bff2b2b008a11b27)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_domain_address.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
|
||||||
|
index 970ae3949d..b73ac9ebf1 100644
|
||||||
|
--- a/src/qemu/qemu_domain_address.c
|
||||||
|
+++ b/src/qemu/qemu_domain_address.c
|
||||||
|
@@ -3073,6 +3073,7 @@ qemuDomainAssignMemoryDeviceSlot(virDomainObj *vm,
|
||||||
|
virDomainMemoryDef *mem)
|
||||||
|
{
|
||||||
|
g_autoptr(virBitmap) slotmap = NULL;
|
||||||
|
+ bool releaseaddr = false;
|
||||||
|
virDomainDeviceDef dev = {.type = VIR_DOMAIN_DEVICE_MEMORY, .data.memory = mem};
|
||||||
|
|
||||||
|
switch (mem->model) {
|
||||||
|
@@ -3086,7 +3087,7 @@ qemuDomainAssignMemoryDeviceSlot(virDomainObj *vm,
|
||||||
|
|
||||||
|
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM:
|
||||||
|
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
|
||||||
|
- return qemuDomainEnsurePCIAddress(vm, &dev);
|
||||||
|
+ return qemuDomainEnsureVirtioAddress(&releaseaddr, vm, &dev);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,242 @@
|
|||||||
|
From 09dc3f583b342ef35b1ead29ff5d09d76140590c Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <09dc3f583b342ef35b1ead29ff5d09d76140590c.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Tue, 14 Jan 2025 12:16:06 +0100
|
||||||
|
Subject: [PATCH] qemuxmlconftest: Drop s390-default-cpu-...ccw-virtio-2.7 test
|
||||||
|
cases
|
||||||
|
|
||||||
|
In its upstream commit [1], qemu dropped s390-2.7 machine type,
|
||||||
|
then in commit [2] the s390-2.8 machine type was dropped. But as
|
||||||
|
Thomas Huth pointed out, any machine type that's older than 6
|
||||||
|
years is subject to removal [3]. This means, any machine type
|
||||||
|
older than 4.1 is going to be removed eventually.
|
||||||
|
|
||||||
|
We have two test cases that assumes existence of 2.7 machine type.
|
||||||
|
While they could be switched to 4.1 machine type, we also have
|
||||||
|
another test case that already check 4.2 machine type.
|
||||||
|
Therefore, just drop the 2.7 ones.
|
||||||
|
|
||||||
|
1: https://gitlab.com/qemu-project/qemu/-/commit/3199c7ee76089fb6844f6b2bed1f5d3d99a7527c
|
||||||
|
2: https://gitlab.com/qemu-project/qemu/-/commit/66924fe36977d9d9e45ba3e0b6e851ee170507f6
|
||||||
|
3: https://gitlab.com/qemu-project/qemu/-/commit/ce80c4fa6ff0f5c379bba7db74d04593e9fb12f2
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit 4933dfcce02baa941da6dd9e5b111d36d63ef900)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 32 -------------------
|
||||||
|
...lt-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml | 25 ---------------
|
||||||
|
.../s390-default-cpu-kvm-ccw-virtio-2.7.xml | 16 ----------
|
||||||
|
...t-cpu-tcg-ccw-virtio-2.7.s390x-latest.args | 32 -------------------
|
||||||
|
...lt-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml | 27 ----------------
|
||||||
|
.../s390-default-cpu-tcg-ccw-virtio-2.7.xml | 16 ----------
|
||||||
|
tests/qemuxmlconftest.c | 2 --
|
||||||
|
7 files changed, 150 deletions(-)
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.xml
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml
|
||||||
|
delete mode 100644 tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.xml
|
||||||
|
|
||||||
|
diff --git a/tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args b/tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args
|
||||||
|
deleted file mode 100644
|
||||||
|
index 0d44697425..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,32 +0,0 @@
|
||||||
|
-LC_ALL=C \
|
||||||
|
-PATH=/bin \
|
||||||
|
-HOME=/var/lib/libvirt/qemu/domain--1-test \
|
||||||
|
-USER=test \
|
||||||
|
-LOGNAME=test \
|
||||||
|
-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
|
||||||
|
-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
|
||||||
|
-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
|
||||||
|
-/usr/bin/qemu-system-s390x \
|
||||||
|
--name guest=test,debug-threads=on \
|
||||||
|
--S \
|
||||||
|
--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
|
||||||
|
--machine s390-ccw-virtio-2.7,usb=off,dump-guest-core=off,memory-backend=s390.ram \
|
||||||
|
--accel kvm \
|
||||||
|
--cpu host \
|
||||||
|
--m size=262144k \
|
||||||
|
--object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \
|
||||||
|
--overcommit mem-lock=off \
|
||||||
|
--smp 1,sockets=1,cores=1,threads=1 \
|
||||||
|
--uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \
|
||||||
|
--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/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml b/tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index ae39e6277d..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,25 +0,0 @@
|
||||||
|
-<domain type='kvm'>
|
||||||
|
- <name>test</name>
|
||||||
|
- <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||||
|
- <memory unit='KiB'>262144</memory>
|
||||||
|
- <currentMemory unit='KiB'>262144</currentMemory>
|
||||||
|
- <vcpu placement='static'>1</vcpu>
|
||||||
|
- <os>
|
||||||
|
- <type arch='s390x' machine='s390-ccw-virtio-2.7'>hvm</type>
|
||||||
|
- <boot dev='hd'/>
|
||||||
|
- </os>
|
||||||
|
- <cpu mode='host-passthrough' check='none'/>
|
||||||
|
- <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/s390-default-cpu-kvm-ccw-virtio-2.7.xml b/tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index a3c1804f57..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/s390-default-cpu-kvm-ccw-virtio-2.7.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,16 +0,0 @@
|
||||||
|
-<domain type='kvm'>
|
||||||
|
- <name>test</name>
|
||||||
|
- <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||||
|
- <memory>262144</memory>
|
||||||
|
- <currentMemory>262144</currentMemory>
|
||||||
|
- <os>
|
||||||
|
- <type arch='s390x' machine='s390-ccw-virtio-2.7'>hvm</type>
|
||||||
|
- </os>
|
||||||
|
- <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>
|
||||||
|
- </devices>
|
||||||
|
-</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args b/tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args
|
||||||
|
deleted file mode 100644
|
||||||
|
index 06b3f5733e..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,32 +0,0 @@
|
||||||
|
-LC_ALL=C \
|
||||||
|
-PATH=/bin \
|
||||||
|
-HOME=/var/lib/libvirt/qemu/domain--1-test \
|
||||||
|
-USER=test \
|
||||||
|
-LOGNAME=test \
|
||||||
|
-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
|
||||||
|
-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
|
||||||
|
-XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
|
||||||
|
-/usr/bin/qemu-system-s390x \
|
||||||
|
--name guest=test,debug-threads=on \
|
||||||
|
--S \
|
||||||
|
--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
|
||||||
|
--machine s390-ccw-virtio-2.7,usb=off,dump-guest-core=off,memory-backend=s390.ram \
|
||||||
|
--accel tcg \
|
||||||
|
--cpu qemu \
|
||||||
|
--m size=262144k \
|
||||||
|
--object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \
|
||||||
|
--overcommit mem-lock=off \
|
||||||
|
--smp 1,sockets=1,cores=1,threads=1 \
|
||||||
|
--uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \
|
||||||
|
--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/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml b/tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index f4f9e724a9..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,27 +0,0 @@
|
||||||
|
-<domain type='qemu'>
|
||||||
|
- <name>test</name>
|
||||||
|
- <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||||
|
- <memory unit='KiB'>262144</memory>
|
||||||
|
- <currentMemory unit='KiB'>262144</currentMemory>
|
||||||
|
- <vcpu placement='static'>1</vcpu>
|
||||||
|
- <os>
|
||||||
|
- <type arch='s390x' machine='s390-ccw-virtio-2.7'>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/s390-default-cpu-tcg-ccw-virtio-2.7.xml b/tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 3451e9d81f..0000000000
|
||||||
|
--- a/tests/qemuxmlconfdata/s390-default-cpu-tcg-ccw-virtio-2.7.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,16 +0,0 @@
|
||||||
|
-<domain type='qemu'>
|
||||||
|
- <name>test</name>
|
||||||
|
- <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||||
|
- <memory>262144</memory>
|
||||||
|
- <currentMemory>262144</currentMemory>
|
||||||
|
- <os>
|
||||||
|
- <type arch='s390x' machine='s390-ccw-virtio-2.7'>hvm</type>
|
||||||
|
- </os>
|
||||||
|
- <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>
|
||||||
|
- </devices>
|
||||||
|
-</domain>
|
||||||
|
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
|
||||||
|
index 2007944c29..00a7677ea7 100644
|
||||||
|
--- a/tests/qemuxmlconftest.c
|
||||||
|
+++ b/tests/qemuxmlconftest.c
|
||||||
|
@@ -2925,8 +2925,6 @@ mymain(void)
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-tcg-pseries-3.1", "ppc64");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-kvm-pseries-4.2", "ppc64");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-tcg-pseries-4.2", "ppc64");
|
||||||
|
- DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-kvm-ccw-virtio-2.7", "s390x");
|
||||||
|
- DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-tcg-ccw-virtio-2.7", "s390x");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-kvm-ccw-virtio-4.2", "s390x");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-tcg-ccw-virtio-4.2", "s390x");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-default-cpu-kvm-pc-4.2", "x86_64");
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,215 @@
|
|||||||
|
From e0b10b2446247933187b1ecb718e6405e08c7e57 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <e0b10b2446247933187b1ecb718e6405e08c7e57.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Tue, 28 Jan 2025 08:54:36 +0100
|
||||||
|
Subject: [PATCH] qemuxmlconftest: Introduce
|
||||||
|
memory-hotplug-virtio-mem-ccw-s390x.xml
|
||||||
|
|
||||||
|
This is similar to emuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.xml
|
||||||
|
except the explicit placement of virtio-mem onto a PCI bus is removed.
|
||||||
|
This results in virtio-mem being placed onto CCW "bus" this demonstrating
|
||||||
|
previous commits working as expected.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit f23f8ff91a35ac6939f75f1cae1c5ced9ba4a02c)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
...lug-virtio-mem-ccw-s390x.s390x-latest.args | 39 ++++++++++++
|
||||||
|
...plug-virtio-mem-ccw-s390x.s390x-latest.xml | 60 +++++++++++++++++++
|
||||||
|
.../memory-hotplug-virtio-mem-ccw-s390x.xml | 57 ++++++++++++++++++
|
||||||
|
tests/qemuxmlconftest.c | 1 +
|
||||||
|
4 files changed, 157 insertions(+)
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.args
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.xml
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.xml
|
||||||
|
|
||||||
|
diff --git a/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.args b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.args
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..a6bbef5ce7
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.args
|
||||||
|
@@ -0,0 +1,39 @@
|
||||||
|
+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-s390x \
|
||||||
|
+-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 s390-ccw-virtio,usb=off,dump-guest-core=off \
|
||||||
|
+-accel kvm \
|
||||||
|
+-cpu gen16a-base \
|
||||||
|
+-m size=2095104k,maxmem=1099511627776k \
|
||||||
|
+-overcommit mem-lock=off \
|
||||||
|
+-smp 2,sockets=2,cores=1,threads=1 \
|
||||||
|
+-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \
|
||||||
|
+-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||||
|
+-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 \
|
||||||
|
+-object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":false,"size":1073741824}' \
|
||||||
|
+-device '{"driver":"virtio-mem-ccw","node":0,"block-size":2097152,"requested-size":536870912,"memdev":"memvirtiomem0","id":"virtiomem0","devno":"fe.0.0002"}' \
|
||||||
|
+-object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \
|
||||||
|
+-device '{"driver":"virtio-mem-ccw","node":0,"block-size":2097152,"requested-size":1073741824,"memdev":"memvirtiomem1","prealloc":true,"memaddr":5637144576,"dynamic-memslots":true,"id":"virtiomem1","devno":"fe.0.0003"}' \
|
||||||
|
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
|
||||||
|
+-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-storage","id":"virtio-disk0","bootindex":1}' \
|
||||||
|
+-audiodev '{"id":"audio1","driver":"none"}' \
|
||||||
|
+-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
|
||||||
|
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||||
|
+-msg timestamp=on
|
||||||
|
diff --git a/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.xml b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..fe18b1ec7b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.s390x-latest.xml
|
||||||
|
@@ -0,0 +1,60 @@
|
||||||
|
+<domain type='kvm'>
|
||||||
|
+ <name>QEMUGuest1</name>
|
||||||
|
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
+ <maxMemory unit='KiB'>1099511627776</maxMemory>
|
||||||
|
+ <memory unit='KiB'>8388608</memory>
|
||||||
|
+ <currentMemory unit='KiB'>8388608</currentMemory>
|
||||||
|
+ <vcpu placement='static' cpuset='0-1'>2</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'>gen16a-base</model>
|
||||||
|
+ <numa>
|
||||||
|
+ <cell id='0' cpus='0-1' memory='2095104' unit='KiB'/>
|
||||||
|
+ </numa>
|
||||||
|
+ </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>
|
||||||
|
+ <disk type='block' device='disk'>
|
||||||
|
+ <driver name='qemu' type='raw'/>
|
||||||
|
+ <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
+ <target dev='hda' bus='virtio'/>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||||
|
+ </disk>
|
||||||
|
+ <controller type='pci' index='0' model='pci-root'/>
|
||||||
|
+ <audio id='1' type='none'/>
|
||||||
|
+ <memballoon model='virtio'>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||||
|
+ </memballoon>
|
||||||
|
+ <panic model='s390'/>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <target>
|
||||||
|
+ <size unit='KiB'>1048576</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>524288</requested>
|
||||||
|
+ </target>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
|
||||||
|
+ </memory>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <source>
|
||||||
|
+ <nodemask>1-3</nodemask>
|
||||||
|
+ <pagesize unit='KiB'>2048</pagesize>
|
||||||
|
+ </source>
|
||||||
|
+ <target dynamicMemslots='yes'>
|
||||||
|
+ <size unit='KiB'>2097152</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>1048576</requested>
|
||||||
|
+ <address base='0x150000000'/>
|
||||||
|
+ </target>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/>
|
||||||
|
+ </memory>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.xml b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..4f9f90d1e2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-ccw-s390x.xml
|
||||||
|
@@ -0,0 +1,57 @@
|
||||||
|
+<domain type='kvm'>
|
||||||
|
+ <name>QEMUGuest1</name>
|
||||||
|
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
+ <maxMemory unit='KiB'>1099511627776</maxMemory>
|
||||||
|
+ <memory unit='KiB'>8388608</memory>
|
||||||
|
+ <currentMemory unit='KiB'>8388608</currentMemory>
|
||||||
|
+ <vcpu placement='static' cpuset='0-1'>2</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'>gen16a-base</model>
|
||||||
|
+ <numa>
|
||||||
|
+ <cell id='0' cpus='0-1' memory='2095104' unit='KiB'/>
|
||||||
|
+ </numa>
|
||||||
|
+ </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>
|
||||||
|
+ <disk type='block' device='disk'>
|
||||||
|
+ <driver name='qemu' type='raw'/>
|
||||||
|
+ <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
+ <target dev='hda' bus='virtio'/>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||||
|
+ </disk>
|
||||||
|
+ <controller type='pci' index='0' model='pci-root'/>
|
||||||
|
+ <audio id='1' type='none'/>
|
||||||
|
+ <memballoon model='virtio'>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||||
|
+ </memballoon>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <target>
|
||||||
|
+ <size unit='KiB'>1048576</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>524288</requested>
|
||||||
|
+ </target>
|
||||||
|
+ </memory>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <source>
|
||||||
|
+ <nodemask>1-3</nodemask>
|
||||||
|
+ <pagesize unit='KiB'>2048</pagesize>
|
||||||
|
+ </source>
|
||||||
|
+ <target dynamicMemslots='yes'>
|
||||||
|
+ <size unit='KiB'>2097152</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>1048576</requested>
|
||||||
|
+ <address base='0x150000000'/>
|
||||||
|
+ </target>
|
||||||
|
+ </memory>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
|
||||||
|
index 14f159b833..e88aa6da92 100644
|
||||||
|
--- a/tests/qemuxmlconftest.c
|
||||||
|
+++ b/tests/qemuxmlconftest.c
|
||||||
|
@@ -2716,6 +2716,7 @@ mymain(void)
|
||||||
|
* than other memory devices because of how they handle <labelsize/> */
|
||||||
|
DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-overlap");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("memory-hotplug-virtio-mem-pci-s390x", "s390x");
|
||||||
|
+ DO_TEST_CAPS_ARCH_LATEST("memory-hotplug-virtio-mem-ccw-s390x", "s390x");
|
||||||
|
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("machine-aeskeywrap-on-caps", "s390x");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("machine-aeskeywrap-on-cap", "s390x");
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -0,0 +1,228 @@
|
|||||||
|
From 800b0cb9c899ff14ddfb1b8528048a780a4a5949 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <800b0cb9c899ff14ddfb1b8528048a780a4a5949.1744876588.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Wed, 15 Jan 2025 10:45:31 +0100
|
||||||
|
Subject: [PATCH] qemuxmlconftest: Introduce
|
||||||
|
memory-hotplug-virtio-mem-pci-s390x.xml
|
||||||
|
|
||||||
|
As of v9.2.0-1413-gd77ae821e8 QEMU supports virtio-mem-pci on
|
||||||
|
s390 too. Let's add a test case for that.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||||
|
(cherry picked from commit 621373d8a850c3882f6b62777f549285a5c0ab97)
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-72976
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
...lug-virtio-mem-pci-s390x.s390x-latest.args | 41 +++++++++++
|
||||||
|
...plug-virtio-mem-pci-s390x.s390x-latest.xml | 71 +++++++++++++++++++
|
||||||
|
.../memory-hotplug-virtio-mem-pci-s390x.xml | 59 +++++++++++++++
|
||||||
|
tests/qemuxmlconftest.c | 1 +
|
||||||
|
4 files changed, 172 insertions(+)
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.args
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.xml
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.xml
|
||||||
|
|
||||||
|
diff --git a/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.args b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.args
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..9704d7d5e9
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.args
|
||||||
|
@@ -0,0 +1,41 @@
|
||||||
|
+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-s390x \
|
||||||
|
+-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 s390-ccw-virtio,usb=off,dump-guest-core=off \
|
||||||
|
+-accel kvm \
|
||||||
|
+-cpu gen16a-base \
|
||||||
|
+-m size=2095104k,maxmem=1099511627776k \
|
||||||
|
+-overcommit mem-lock=off \
|
||||||
|
+-smp 2,sockets=2,cores=1,threads=1 \
|
||||||
|
+-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \
|
||||||
|
+-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||||
|
+-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":"zpci","uid":1,"fid":0,"target":"pci.1","id":"zpci1"}' \
|
||||||
|
+-device '{"driver":"pci-bridge","chassis_nr":1,"id":"pci.1","bus":"pci.0","addr":"0x1"}' \
|
||||||
|
+-object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":false,"size":1073741824}' \
|
||||||
|
+-device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"requested-size":536870912,"memdev":"memvirtiomem0","id":"virtiomem0","bus":"pci.0","addr":"0x2"}' \
|
||||||
|
+-object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \
|
||||||
|
+-device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"requested-size":1073741824,"memdev":"memvirtiomem1","prealloc":true,"memaddr":5637144576,"dynamic-memslots":true,"id":"virtiomem1","bus":"pci.1","addr":"0x1"}' \
|
||||||
|
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
|
||||||
|
+-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-storage","id":"virtio-disk0","bootindex":1}' \
|
||||||
|
+-audiodev '{"id":"audio1","driver":"none"}' \
|
||||||
|
+-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
|
||||||
|
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||||
|
+-msg timestamp=on
|
||||||
|
diff --git a/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.xml b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..336c6e5aac
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.s390x-latest.xml
|
||||||
|
@@ -0,0 +1,71 @@
|
||||||
|
+<domain type='kvm'>
|
||||||
|
+ <name>QEMUGuest1</name>
|
||||||
|
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
+ <maxMemory unit='KiB'>1099511627776</maxMemory>
|
||||||
|
+ <memory unit='KiB'>8388608</memory>
|
||||||
|
+ <currentMemory unit='KiB'>8388608</currentMemory>
|
||||||
|
+ <vcpu placement='static' cpuset='0-1'>2</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'>gen16a-base</model>
|
||||||
|
+ <numa>
|
||||||
|
+ <cell id='0' cpus='0-1' memory='2095104' unit='KiB'/>
|
||||||
|
+ </numa>
|
||||||
|
+ </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>
|
||||||
|
+ <disk type='block' device='disk'>
|
||||||
|
+ <driver name='qemu' type='raw'/>
|
||||||
|
+ <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
+ <target dev='hda' bus='virtio'/>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||||
|
+ </disk>
|
||||||
|
+ <controller type='pci' index='0' model='pci-root'/>
|
||||||
|
+ <controller type='pci' index='1' model='pci-bridge'>
|
||||||
|
+ <model name='pci-bridge'/>
|
||||||
|
+ <target chassisNr='1'/>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'>
|
||||||
|
+ <zpci uid='0x0001' fid='0x00000000'/>
|
||||||
|
+ </address>
|
||||||
|
+ </controller>
|
||||||
|
+ <audio id='1' type='none'/>
|
||||||
|
+ <memballoon model='virtio'>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||||
|
+ </memballoon>
|
||||||
|
+ <panic model='s390'/>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <target>
|
||||||
|
+ <size unit='KiB'>1048576</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>524288</requested>
|
||||||
|
+ </target>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'>
|
||||||
|
+ <zpci uid='0x0002' fid='0x00000001'/>
|
||||||
|
+ </address>
|
||||||
|
+ </memory>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <source>
|
||||||
|
+ <nodemask>1-3</nodemask>
|
||||||
|
+ <pagesize unit='KiB'>2048</pagesize>
|
||||||
|
+ </source>
|
||||||
|
+ <target dynamicMemslots='yes'>
|
||||||
|
+ <size unit='KiB'>2097152</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>1048576</requested>
|
||||||
|
+ <address base='0x150000000'/>
|
||||||
|
+ </target>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'>
|
||||||
|
+ <zpci uid='0x0003' fid='0x00000002'/>
|
||||||
|
+ </address>
|
||||||
|
+ </memory>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.xml b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..747877042a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.xml
|
||||||
|
@@ -0,0 +1,59 @@
|
||||||
|
+<domain type='kvm'>
|
||||||
|
+ <name>QEMUGuest1</name>
|
||||||
|
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
+ <maxMemory unit='KiB'>1099511627776</maxMemory>
|
||||||
|
+ <memory unit='KiB'>8388608</memory>
|
||||||
|
+ <currentMemory unit='KiB'>8388608</currentMemory>
|
||||||
|
+ <vcpu placement='static' cpuset='0-1'>2</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'>gen16a-base</model>
|
||||||
|
+ <numa>
|
||||||
|
+ <cell id='0' cpus='0-1' memory='2095104' unit='KiB'/>
|
||||||
|
+ </numa>
|
||||||
|
+ </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>
|
||||||
|
+ <disk type='block' device='disk'>
|
||||||
|
+ <driver name='qemu' type='raw'/>
|
||||||
|
+ <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
+ <target dev='hda' bus='virtio'/>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||||
|
+ </disk>
|
||||||
|
+ <controller type='pci' index='0' model='pci-root'/>
|
||||||
|
+ <audio id='1' type='none'/>
|
||||||
|
+ <memballoon model='virtio'>
|
||||||
|
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||||
|
+ </memballoon>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <target>
|
||||||
|
+ <size unit='KiB'>1048576</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>524288</requested>
|
||||||
|
+ </target>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||||
|
+ </memory>
|
||||||
|
+ <memory model='virtio-mem'>
|
||||||
|
+ <source>
|
||||||
|
+ <nodemask>1-3</nodemask>
|
||||||
|
+ <pagesize unit='KiB'>2048</pagesize>
|
||||||
|
+ </source>
|
||||||
|
+ <target dynamicMemslots='yes'>
|
||||||
|
+ <size unit='KiB'>2097152</size>
|
||||||
|
+ <node>0</node>
|
||||||
|
+ <block unit='KiB'>2048</block>
|
||||||
|
+ <requested unit='KiB'>1048576</requested>
|
||||||
|
+ <address base='0x150000000'/>
|
||||||
|
+ </target>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
|
||||||
|
+ </memory>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
|
||||||
|
index 00a7677ea7..14f159b833 100644
|
||||||
|
--- a/tests/qemuxmlconftest.c
|
||||||
|
+++ b/tests/qemuxmlconftest.c
|
||||||
|
@@ -2715,6 +2715,7 @@ mymain(void)
|
||||||
|
* virDomainMemoryDefCheckConflict() works for NVDIMMs which are special
|
||||||
|
* than other memory devices because of how they handle <labelsize/> */
|
||||||
|
DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-overlap");
|
||||||
|
+ DO_TEST_CAPS_ARCH_LATEST("memory-hotplug-virtio-mem-pci-s390x", "s390x");
|
||||||
|
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("machine-aeskeywrap-on-caps", "s390x");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("machine-aeskeywrap-on-cap", "s390x");
|
||||||
|
--
|
||||||
|
2.49.0
|
42185
libvirt-tests-add-capabilities-for-QEMU-10.0.0-on-s390x.patch
Normal file
42185
libvirt-tests-add-capabilities-for-QEMU-10.0.0-on-s390x.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
|||||||
|
From 26445297c5b24bd539ec52525b748f86e82dcc52 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <26445297c5b24bd539ec52525b748f86e82dcc52.1744876587.git.jdenemar@redhat.com>
|
||||||
|
From: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Date: Mon, 7 Apr 2025 14:33:01 +0200
|
||||||
|
Subject: [PATCH] virNodeGetInfo: Improve description of the case when fake
|
||||||
|
data is reported
|
||||||
|
|
||||||
|
virNodeGetInfo due to the rigid desing of the filled struct can't
|
||||||
|
faithfully represent all topologies. Improve the description when that
|
||||||
|
happens and outline the fallback topology.
|
||||||
|
|
||||||
|
The function docs already state that users ought to use
|
||||||
|
virConnectGetCapabilities() instead.
|
||||||
|
|
||||||
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 6654cf472c7a8c3e0294012b7c249fc427207759)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-86197
|
||||||
|
---
|
||||||
|
src/libvirt-host.c | 11 +++++++----
|
||||||
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libvirt-host.c b/src/libvirt-host.c
|
||||||
|
index 318a664d24..b9c717be11 100644
|
||||||
|
--- a/src/libvirt-host.c
|
||||||
|
+++ b/src/libvirt-host.c
|
||||||
|
@@ -414,10 +414,13 @@ virConnectGetMaxVcpus(virConnectPtr conn,
|
||||||
|
* speed that the first CPU in the machine is currently running at. This speed
|
||||||
|
* may vary across CPUs and changes continually as the host OS throttles.
|
||||||
|
*
|
||||||
|
- * The nodes/sockets/cores/threads data is potentially inaccurate as
|
||||||
|
- * it assumes a symmetric installation. If one NUMA node has more
|
||||||
|
- * sockets populated that another NUMA node this information will be
|
||||||
|
- * wrong. It is also not able to report about CPU dies.
|
||||||
|
+ * The virNodeInfo structure is not extensible thus only supports global
|
||||||
|
+ * nodes/sockets/cores/threads (sockets/cores/threads is per NUMA node)
|
||||||
|
+ * topology information. If the host CPU has any further groupings (e.g.
|
||||||
|
+ * dies, clusters, etc) or the NUMA topology is non-symmetrical the structure
|
||||||
|
+ * can't faithfully represent the system. In such cases a fake topology
|
||||||
|
+ * (nodes = 1, sockets = 1, cores = number of host cpus, threads = 1) which
|
||||||
|
+ * only correctly represents the total host CPU count is reported.
|
||||||
|
*
|
||||||
|
* Applications are recommended to use the virConnectGetCapabilities()
|
||||||
|
* call instead, which provides all the information except CPU frequency,
|
||||||
|
--
|
||||||
|
2.49.0
|
42
libvirt.spec
42
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.10.0
|
Version: 10.10.0
|
||||||
Release: 9%{?dist}%{?extra_release}
|
Release: 10%{?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/
|
||||||
|
|
||||||
@ -400,6 +400,25 @@ Patch100: libvirt-qemu-support-MSDM-ACPI-table-type.patch
|
|||||||
Patch101: libvirt-qemuxmlconftest-Include-shared-memory-net-vhostuser-test-cases.patch
|
Patch101: libvirt-qemuxmlconftest-Include-shared-memory-net-vhostuser-test-cases.patch
|
||||||
Patch102: libvirt-qemuValidateDomainDeviceDefNetwork-Require-shared-memory-for-all-vhost-user-interfaces.patch
|
Patch102: libvirt-qemuValidateDomainDeviceDefNetwork-Require-shared-memory-for-all-vhost-user-interfaces.patch
|
||||||
Patch103: libvirt-qemu-process-Remove-un-updated-qemuProcessStartWarnShmem.patch
|
Patch103: libvirt-qemu-process-Remove-un-updated-qemuProcessStartWarnShmem.patch
|
||||||
|
Patch104: libvirt-esxConnectListAllDomains-Don-t-propagate-failure-to-lookup-a-single-domain.patch
|
||||||
|
Patch105: libvirt-conf-parse-interface-source-dev-for-all-interface-types-with-backend-type-passt.patch
|
||||||
|
Patch106: libvirt-libvirt-host-Clarify-fix-description-of-the-CPU-frequency-field.patch
|
||||||
|
Patch107: libvirt-virNodeGetInfo-Improve-description-of-the-case-when-fake-data-is-reported.patch
|
||||||
|
Patch108: libvirt-manpages-virsh-Use-disclaimer-from-virNodeGetInfo-for-virsh-nodeinfo.patch
|
||||||
|
Patch109: libvirt-esx-Accept-empty-path-URI-component-same-way-as.patch
|
||||||
|
Patch110: libvirt-qemu-Rename-outgoingMigration-parameter-in-various-TPM-functions.patch
|
||||||
|
Patch111: libvirt-qemu-Properly-propagate-migration-state-to-TPM-cleanup-code.patch
|
||||||
|
Patch112: libvirt-qemuDomainBlockCopyCommon-Don-t-revoke-access-to-file-twice-on-failure.patch
|
||||||
|
Patch113: libvirt-qemuxmlconftest-Drop-s390-default-cpu-.ccw-virtio-2.7-test-cases.patch
|
||||||
|
Patch114: libvirt-tests-add-capabilities-for-QEMU-10.0.0-on-s390x.patch
|
||||||
|
Patch115: libvirt-qemu-Do-NOT-autoadd-NUMA-node-for-s390.patch
|
||||||
|
Patch116: libvirt-qemu_command-Use-qemuBuildVirtioDevProps-to-build-cmd-line-for-virtio-mem-and-virtio-pmem.patch
|
||||||
|
Patch117: libvirt-qemuxmlconftest-Introduce-memory-hotplug-virtio-mem-pci-s390x.xml.patch
|
||||||
|
Patch118: libvirt-qemu_caps-Introduce-QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW.patch
|
||||||
|
Patch119: libvirt-qemu-Validate-virtio-mem-ccw.patch
|
||||||
|
Patch120: libvirt-qemu-Allow-virtio-mem-on-CCW.patch
|
||||||
|
Patch121: libvirt-qemuxmlconftest-Introduce-memory-hotplug-virtio-mem-ccw-s390x.xml.patch
|
||||||
|
Patch122: libvirt-qemu_domain_address-fix-CCW-virtio-mem-hotplug.patch
|
||||||
|
|
||||||
|
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
@ -2725,6 +2744,27 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 17 2025 Jiri Denemark <jdenemar@redhat.com> - 10.10.0-10
|
||||||
|
- esxConnectListAllDomains: Don't propagate failure to lookup a single domain (RHEL-80606)
|
||||||
|
- conf: parse interface/source/@dev for all interface types (with backend type='passt') (RHEL-82539)
|
||||||
|
- libvirt-host: Clarify/fix description of the CPU frequency field (RHEL-86197)
|
||||||
|
- virNodeGetInfo: Improve description of the case when fake data is reported (RHEL-86197)
|
||||||
|
- manpages: virsh: Use disclaimer from 'virNodeGetInfo()' for 'virsh nodeinfo' (RHEL-86197)
|
||||||
|
- esx: Accept empty "path" URI component same way as "/" (RHEL-86459)
|
||||||
|
- qemu: Rename outgoingMigration parameter in various TPM functions (RHEL-86800)
|
||||||
|
- qemu: Properly propagate migration state to TPM cleanup code (RHEL-86800)
|
||||||
|
- qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure (RHEL-7357)
|
||||||
|
- qemuxmlconftest: Drop s390-default-cpu-...ccw-virtio-2.7 test cases (RHEL-72976)
|
||||||
|
- tests: add capabilities for QEMU 10.0.0 on s390x (RHEL-72976)
|
||||||
|
- qemu: Do NOT autoadd NUMA node for s390 (RHEL-72976)
|
||||||
|
- qemu_command: Use qemuBuildVirtioDevProps() to build cmd line for virtio-mem and virtio-pmem (RHEL-72976)
|
||||||
|
- qemuxmlconftest: Introduce memory-hotplug-virtio-mem-pci-s390x.xml (RHEL-72976)
|
||||||
|
- qemu_caps: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW (RHEL-72976)
|
||||||
|
- qemu: Validate virtio-mem-ccw (RHEL-72976)
|
||||||
|
- qemu: Allow virtio-mem on CCW (RHEL-72976)
|
||||||
|
- qemuxmlconftest: Introduce memory-hotplug-virtio-mem-ccw-s390x.xml (RHEL-72976)
|
||||||
|
- qemu_domain_address: fix CCW virtio-mem hotplug (RHEL-72976)
|
||||||
|
|
||||||
* Wed Mar 26 2025 Jiri Denemark <jdenemar@redhat.com> - 10.10.0-9
|
* Wed Mar 26 2025 Jiri Denemark <jdenemar@redhat.com> - 10.10.0-9
|
||||||
- util: introduce object for holding a system inhibitor lock (RHEL-83064)
|
- util: introduce object for holding a system inhibitor lock (RHEL-83064)
|
||||||
- src: convert drivers over to new virInhibitor APIs (RHEL-83064)
|
- src: convert drivers over to new virInhibitor APIs (RHEL-83064)
|
||||||
|
Loading…
Reference in New Issue
Block a user