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

Jiri Denemark jdenemar at redhat.com
Thu Nov 3 10:32:19 UTC 2016


On Wed, Nov 02, 2016 at 16:34:35 -0400, Jason J. Herne wrote:
> 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"),

No, there's no need to change anything in qemuBuildCpuModelArgStr.
virCPUUpdate should have translated host-model CPU definition into the
real CPU model (the one from virQEMUCapsGetHostModel(qemuCaps)).

Jirka




More information about the libvir-list mailing list