[libvirt] [PATCH] qemu: caps: use model "qemu" for s390 tcg cpu-model-expansion

Jiri Denemark jdenemar at redhat.com
Tue Jul 24 16:08:21 UTC 2018


On Mon, Jul 23, 2018 at 17:45:33 -0400, Collin Walling wrote:
> Use model name "qemu" instead of "max" when calling
> query-cpu-model-expansion for s390 on tcg.
> 
> Signed-off-by: Collin Walling <walling at linux.ibm.com>
> ---
>  src/qemu/qemu_capabilities.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 23b4833..e9b44cc 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -2356,7 +2356,10 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps,
>  
>      if (tcg || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
>          virtType = VIR_DOMAIN_VIRT_QEMU;
> -        model = "max";
> +        if (ARCH_IS_S390(qemuCaps->arch))
> +            model = "qemu";
> +        else
> +            model = "max";

I think we should also check if "max" is a supported model
(qemuCaps->tcgCPUModels is already populated at this point) and only use
"qemu" on s390 if "max" is not supported. And please, report the issue
to QEMU developers since one of the reasons behind "max" is its
universal availability on everywhere CPU model expansion is supported.

Jirka




More information about the libvir-list mailing list