From: Gavin Shan <gshan@redhat.com>
To: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>,
Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, pbonzini@redhat.com,
eduardo@habkost.net, marcel.apfelbaum@gmail.com,
philmd@linaro.org, wangyanan55@huawei.com, shan.gavin@gmail.com
Subject: Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation
Date: Thu, 13 Jul 2023 23:00:28 +1000 [thread overview]
Message-ID: <12d0c82a-f9d7-03d0-f2cd-0fead92d3156@redhat.com> (raw)
In-Reply-To: <2e1fbb6c-e7b4-df42-c64c-59de47f05981@linaro.org>
Hi Marcin,
On 7/13/23 22:44, Marcin Juszkiewicz wrote:
> W dniu 13.07.2023 o 14:34, Gavin Shan pisze:
>> On 7/13/23 21:52, Marcin Juszkiewicz wrote:
>>> W dniu 13.07.2023 o 13:44, Peter Maydell pisze:
>>>
>>>> I see this isn't a change in this patch, but given that what the user specifies is not "cortex-a8-arm-cpu" but "cortex-a8", why
>>>> do we include the "-arm-cpu" suffix in the error messages? It's
>>>> not valid syntax to say "-cpu cortex-a8-arm-cpu", so it's a bit misleading...
>
>>> I like the change but it (IMHO) needs to cut "-{TYPE_*_CPU}"
>>> string from names:
>
>> Peter and Marcin, how about to split the CPU types to two fields, as below? In this way, the complete CPU type will be used for validation
>> and the 'internal' names will be used for the error messages.
>
> Note that it should probably propagate to all architectures handled in QEMU, not only Arm ones. I do not know which machines have list of supported cpu types like arm/virt or arm/sbsa-ref ones.
Right, there are more boards eligible for this generic CPU type invalidation. I will
cover all of them in next revision. Currently, the pattern of prefix + suffix, used
to split the CPU type name, can work well for all cases.
[gshan@gshan hw]$ git grep strcmp.*cpu_type
arm/bananapi_m2u.c: if (strcmp(machine->cpu_type, ARM_CPU_TYPE_NAME("cortex-a7")) != 0) {
arm/cubieboard.c: if (strcmp(machine->cpu_type, ARM_CPU_TYPE_NAME("cortex-a8")) != 0) {
arm/mps2-tz.c: if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) {
arm/mps2.c: if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) {
arm/msf2-som.c: if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) {
arm/musca.c: if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) {
arm/npcm7xx_boards.c: if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) {
arm/orangepi.c: if (strcmp(machine->cpu_type, ARM_CPU_TYPE_NAME("cortex-a7")) != 0) {
avr/boot.c: if (strcmp(elf_cpu, mcu_cpu_type)) { <<<<< needsn't CPU type validation
riscv/shakti_c.c: if (strcmp(mstate->cpu_type, TYPE_RISCV_CPU_SHAKTI_C) != 0) {
>>> I can change sbsa-ref to follow that change but let it be userfriendly.
>
>> Yes, sbsa-ref needs an extra patch to use the generic invalidation.
>> I can add one patch on the top for that in next revision if you
>> agree, Marcin.
>
> I am fine with it.
>
Thanks a lot for your confirm, Marcin.
Thanks,
Gavin
next prev parent reply other threads:[~2023-07-13 13:02 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 5:44 [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation Gavin Shan
2023-07-13 5:45 ` [PATCH 1/3] machine: Factor CPU type invalidation out into helper Gavin Shan
2023-07-14 12:07 ` Igor Mammedov
2023-07-18 6:11 ` Gavin Shan
2023-07-24 14:39 ` Igor Mammedov
2023-07-13 5:45 ` [PATCH 2/3] hw/arm/virt: Use generic CPU type invalidation Gavin Shan
2023-07-14 11:59 ` Igor Mammedov
2023-07-18 6:17 ` Gavin Shan
2023-07-13 5:45 ` [PATCH 3/3] hw/arm/virt: Support host CPU type only when KVM or HVF is configured Gavin Shan
2023-07-13 12:46 ` Cornelia Huck
2023-07-13 13:16 ` Gavin Shan
2023-07-13 11:44 ` [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation Peter Maydell
2023-07-13 11:52 ` Marcin Juszkiewicz
2023-07-13 11:59 ` Peter Maydell
2023-07-14 11:50 ` Igor Mammedov
2023-07-14 12:56 ` Peter Maydell
2023-07-17 12:44 ` Igor Mammedov
2023-07-18 10:31 ` Gavin Shan
2023-07-24 15:06 ` Igor Mammedov
2023-07-24 15:14 ` Peter Maydell
2023-07-25 6:46 ` Igor Mammedov
2023-07-13 12:34 ` Gavin Shan
2023-07-13 12:44 ` Marcin Juszkiewicz
2023-07-13 13:00 ` Gavin Shan [this message]
2023-07-13 16:29 ` Philippe Mathieu-Daudé
2023-07-14 0:51 ` Gavin Shan
2023-07-14 9:14 ` Gavin Shan
2023-07-13 19:27 ` Richard Henderson
2023-07-14 0:54 ` Gavin Shan
2023-07-13 12:42 ` Gavin Shan
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=12d0c82a-f9d7-03d0-f2cd-0fead92d3156@redhat.com \
--to=gshan@redhat.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=marcin.juszkiewicz@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shan.gavin@gmail.com \
--cc=wangyanan55@huawei.com \
/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).