qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4)


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4)
Date: Thu, 18 Jan 2018 10:50:19 +0000

On 18 January 2018 at 10:43, Igor Mammedov <address@hidden> wrote:
> Peter Maydell <address@hidden> wrote:
>> That usage must want a different name, though, surely?
>> For Arm the default CPU for linux-user is 'any' but that
>> is usermode only and won't work for system emulation so
>> null-machine.c will need to pick something else.

> not really in general as boards set their own default types
> and secondly it applies only to null-machine.
> Though in both cases it work the same just fine because
> current API works like this (system emulation)
>  vl.c:
>         current_machine->cpu_type = machine_class->default_cpu_type;
>         if (cpu_model) {
>             current_machine->cpu_type =
>                 cpu_parse_cpu_model(machine_class->default_cpu_type, 
> cpu_model);
>             ...
>         }
>
> which would result for null-machine (patch 20/24) in:
>
>        cpu_parse_cpu_model(TARGET_DEFAULT_CPU_TYPE, cpu_model):
>             oc = cpu_class_by_name(TARGET_DEFAULT_CPU_TYPE, cpu_model):
>                  cc = CPU_CLASS(object_class_by_name(TARGET_DEFAULT_CPU_TYPE))
>                  cc->class_by_name(cpu_model)

In system emulation we don't define the "any" cpu type
at all, so I would expect cpu_class_by_name() to always
return an error here.

thanks
-- PMM



reply via email to

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