From e30387b3408e8e75ac4326238bfda619ed69aec0 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 6 Mar 2023 21:22:42 +0100 Subject: [PATCH] qemuAppendLoadparmMachineParm: Format 'loadparm' based on architecture MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Check the architecture of the guest rather than relying on QEMU_CAPS_LOADPARM which is set based on architecture. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- 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.47.2