qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Xiaojuan Yang <yangxiaojuan@loongson.cn>,
	qemu-devel@nongnu.org, gaosong@loongson.cn, maobibo@loongson.cn,
	mark.cave-ayland@ilande.co.uk, mst@redhat.com, ani@anisinha.ca,
	f4bug@amsat.org, peter.maydell@linaro.org
Subject: Re: [PATCH v3 1/5] target/loongarch/cpu: Fix cpu_class_by_name function
Date: Tue, 19 Jul 2022 10:38:57 +0200	[thread overview]
Message-ID: <20220719103857.1c5d11de@redhat.com> (raw)
In-Reply-To: <04aa029a-0415-e902-cd3d-399b358e0aa5@linaro.org>

On Tue, 19 Jul 2022 12:22:14 +0530
Richard Henderson <richard.henderson@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 <yangxiaojuan@loongson.cn>
> >> Reviewed-by: Richard Henderson <richard.henderson@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	other threads:[~2022-07-19  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  6:07 [PATCH v3 0/5] Fix LoongArch coverity error and cpu name bug Xiaojuan Yang
2022-07-15  6:07 ` [PATCH v3 1/5] target/loongarch/cpu: Fix cpu_class_by_name function Xiaojuan Yang
2022-07-19  6:46   ` Richard Henderson
2022-07-19  6:52     ` Richard Henderson
2022-07-19  8:38       ` Igor Mammedov [this message]
2022-07-15  6:07 ` [PATCH v3 2/5] hw/intc/loongarch_pch_pic: Fix bugs for update_irq function Xiaojuan Yang
2022-07-19  5:34   ` Richard Henderson
2022-07-15  6:07 ` [PATCH v3 3/5] target/loongarch/cpu: Fix coverity errors about excp_names Xiaojuan Yang
2022-07-15  6:07 ` [PATCH v3 4/5] target/loongarch/tlb_helper: Fix coverity integer overflow error Xiaojuan Yang
2022-07-15  6:07 ` [PATCH v3 5/5] target/loongarch/op_helper: Fix coverity cond_at_most error Xiaojuan Yang
2022-07-19  6:58 ` [PATCH v3 0/5] Fix LoongArch coverity error and cpu name bug Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220719103857.1c5d11de@redhat.com \
    --to=imammedo@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=f4bug@amsat.org \
    --cc=gaosong@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=yangxiaojuan@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).