[libvirt] [PATCH 5/5] s390: qemu: Support cpu host-model mode

Jason J. Herne jjherne at linux.vnet.ibm.com
Wed Nov 2 20:34:35 UTC 2016


Look up the host model stored in qemuCaps for generation of the
-cpu model portion of the Qemu command line.

Signed-off-by: Jason J. Herne <jjherne at linux.vnet.ibm.com>
---
 src/qemu/qemu_command.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b68da3d..3b7095a 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6537,6 +6537,9 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver,
             virBufferAddLit(buf, "host");
             if (cpu->model)
                 virBufferAsprintf(buf, ",compat=%s", cpu->model);
+        } else if (ARCH_IS_S390(def->os.arch)) {
+            virCPUDefPtr guestCpu = virQEMUCapsGetHostModel(qemuCaps);
+            virBufferAdd(buf, guestCpu->model, -1);
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("unexpected host-model CPU for %s architecture"),
-- 
1.9.1




More information about the libvir-list mailing list