qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] hw/arm/virt: Support host CPU type only when KVM or HVF


From: Cornelia Huck
Subject: Re: [PATCH 3/3] hw/arm/virt: Support host CPU type only when KVM or HVF is configured
Date: Thu, 13 Jul 2023 14:46:17 +0200
User-agent: Notmuch/0.37 (https://notmuchmail.org)

On Thu, Jul 13 2023, Gavin Shan <gshan@redhat.com> wrote:

> The CPU type 'host-arm-cpu' class won't be registered until KVM or
> HVF is configured in target/arm/cpu64.c. Support the corresponding
> CPU type only when KVM or HVF is configured.
>
> Signed-off-by: Gavin Shan <gshan@redhat.com>
> ---
>  hw/arm/virt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 43d7772ffd..ad28634445 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -217,7 +217,9 @@ static const char *valid_cpu_types[] = {
>  #endif
>      ARM_CPU_TYPE_NAME("cortex-a53"),
>      ARM_CPU_TYPE_NAME("cortex-a57"),
> +#if defined(CONFIG_KVM) || defined(CONFIG_HVF)
>      ARM_CPU_TYPE_NAME("host"),
> +#endif
>      ARM_CPU_TYPE_NAME("max"),
>      NULL
>  };

Doesn't the check in parse_cpu_option() already catch the case where
the "host" cpu model isn't registered? I might be getting lost in the
code flow, though.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]