qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 1/6] machine: Convert the valid cpu types to


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v5 1/6] machine: Convert the valid cpu types to use cpu_model
Date: Mon, 17 Jun 2019 11:43:31 -0300

On Mon, Jun 17, 2019 at 07:09:59AM +0200, Philippe Mathieu-Daudé wrote:
[...]
> 
> We get cpu names with suffix:
> 
>   $ arm-softmmu/qemu-system-arm -M netduino2 -cpu arm926
>   qemu-system-arm: Invalid CPU type: arm926-arm-cpu
>   The valid types are: cortex-m3-arm-cpu, cortex-m4-arm-cpu
> 
> I understand you won't want a global cpu_name_by_type_name, how do you
> want to do then?

I would like having a global cpu_name_by_type_name() function.
I wouldn't want to force each architecture to provide yet another
string conversion/parsing function, though.

> 
> Should we define an automatically expanded TARGET_CPU_TYPE_SUFFIX?
> Then we could have generic machine code to parse the names.

I think we could do that, but with a CPUClass field instead of a
preprocessor macro.

For a reference on existing corner cases of CPU model name
parsing that might get in the way, see this series:
https://www.mail-archive.com/address@hidden/msg611813.html

If you are interested, I have work in progress for a generic CPU
model listing function at:
https://github.com/ehabkost/qemu-hacks/commits/work/cpu-generic-list
https://github.com/ehabkost/qemu-hacks/commit/df122e7e47476d7e2b7b809a4b4120537f50c137

-- 
Eduardo



reply via email to

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