On Tue, 19 Jul 2022 12:22:14 +0530
Richard Henderson <richard.hender...@linaro.org> wrote:

> On 7/19/22 12:16, Richard Henderson wrote:
> > On 7/15/22 11:37, Xiaojuan Yang wrote:  
> >> In loongarch_cpu_class_by_name(char *cpu_model) function,
> >> the argument cpu_model already has the suffix '-loongarch-cpu',
> >> so we should remove the LOONGARCH_CPU_TYPE_NAME(cpu_model) macro.
> >> And add the assertion that 'cpu_model' resolves to a class of the
> >> appropriate type.
> >>
> >> Signed-off-by: Xiaojuan Yang <yangxiaoj...@loongson.cn>
> >> Reviewed-by: Richard Henderson <richard.hender...@linaro.org>  
> > 
> > This patch causes tests to fail, e.g.
> > 
> >    TEST    float_convd on loongarch64
> > 
> > qemu-loongarch64: unable to find CPU model 'la464'
> > 
> > make[1]: *** [/home/rth/qemu/src/tests/tcg/multiarch/Makefile.target:29: 
> > run-float_convd] 
> > Error 1
> > 
> > 
> > What caused you assume that all cpu models are already suffixed?  
> 
> Mm.  I suppose the use over in hw/loongarch/loongson3.c.
> I will make this function match target/alpha/cpu.c, which checks cpu_model 
> as-is, and then 
> tries again with the suffix.

if we think about adding hotplug/qmp/-device support for CPUs in future,
those interface operate with type-names directly without any pre-processing 
whatsoever.

so I'd very much prefer just as-is (i.e. direct type-name matching)
(all other model parsing usually comes from legacy code)

> 
> 
> r~
> 


Reply via email to