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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> ---
>  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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]