[PATCH 13/15] qemuAppendLoadparmMachineParm: Format 'loadparm' based on architecture

Peter Krempa pkrempa at redhat.com
Mon Mar 6 20:46:41 UTC 2023


Check the architecture of the guest rather than relying on
QEMU_CAPS_LOADPARM which is set based on architecture.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_command.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 34ce27bb79..7adcac418f 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6570,6 +6570,10 @@ qemuAppendLoadparmMachineParm(virBuffer *buf,
 {
     size_t i = 0;

+    if (def->os.arch != VIR_ARCH_S390 &&
+        def->os.arch != VIR_ARCH_S390X)
+        return;
+
     for (i = 0; i < def->ndisks; i++) {
         virDomainDiskDef *disk = def->disks[i];

@@ -6893,8 +6897,7 @@ qemuBuildMachineCommandLine(virCommand *cmd,
         virBufferAsprintf(&buf, ",max-cpu-compat=%s", cpu->model);
     }

-    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_LOADPARM))
-        qemuAppendLoadparmMachineParm(&buf, def);
+    qemuAppendLoadparmMachineParm(&buf, def);

     if (def->sec) {
         switch ((virDomainLaunchSecurity) def->sec->sectype) {
-- 
2.39.2



More information about the libvir-list mailing list