From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: "Víctor Colombo" <victor.colombo@eldorado.org.br>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: clg@kaod.org, david@gibson.dropbear.id.au, groug@kaod.org,
richard.henderson@linaro.org, balaton@eik.bme.hu
Subject: Re: [PATCH v3 00/21] target/ppc: Remove hidden usages of *env
Date: Wed, 4 May 2022 17:33:17 -0300 [thread overview]
Message-ID: <1f75f784-af04-3ed4-f8ad-d13eb4216b6e@gmail.com> (raw)
In-Reply-To: <20220503202441.129549-1-victor.colombo@eldorado.org.br>
I asked Victor to rebase this series on top of ppc-next at:
gitlab.com/danielhb/qemu/tree/ppc-next
Because of
"[PATCH v2] target/ppc: Fix BookE debug interrupt generation"
that added new occurrences of the msr_de macro that wasn't being handled.
I believe that the changes needed are not removing msr_de in patch 02 and
adding a new patch to handle the two existing msr_de instances.
After this series is fully reviewed I'll send a PR with it ASAP to avoid
further conflicts.
Thanks,
Daniel
On 5/3/22 17:24, Víctor Colombo wrote:
> By running the grep command `git grep -nr 'define \(fpscr\|msr\)_[a-z0-9]\+\>'`
> we can find multiple macros that use `env->fpscr` and `env->msr` but doesn't
> take *env as a parameter.
>
> Richard Henderson said [1] that these macros hiding the usage of *env "are evil".
> This patch series remove them and substitute with an explicit usage of *env by
> using registerfields API.
>
> Patch 20 (target/ppc: Add unused msr bits FIELDs) declares unused FIELDs, the
> same that were removed in patch 02 (target/ppc: Remove unused msr_* macros). I
> did that to keep the changes consistent with what was already present before.
>
> Patch 21 (target/ppc: Change MSR_* to follow POWER ISA numbering convention)
> changes the MSR_* bit number to match POWER ISA by adding a new macro to
> 'invert' the ordering. (added in v2)
>
> [1]: https://lists.gnu.org/archive/html/qemu-ppc/2021-11/msg00280.html
>
> Patches requiring review: 11, 14, 15, 16, 17, 21
> Patch 17 was reviewed before, but I created a macro to extract both FE0
> and FE1, so decided to drop the R-b for you to take a look at the
> new version. Thanks
>
> v2:
> - Abandon the ideia to add an M_MSR_* macro
> - Instead, use registerfields API as suggested by Richard
> - Add patch 21 to invert MSR_* values to match ISA ordering
>
> v3:
> - Add macro to extract both FE0 and FE1. Use it to simplify the
> conditionals in patch 17
> - Fix the checks that should be a xor
> - Fix incorrect parameter in FIELD_EX64 (was env->msr should be value)
> in patch 16
> - Fix patch 13 title
>
> Víctor Colombo (21):
> target/ppc: Remove fpscr_* macros from cpu.h
> target/ppc: Remove unused msr_* macros
> target/ppc: Remove msr_pr macro
> target/ppc: Remove msr_le macro
> target/ppc: Remove msr_ds macro
> target/ppc: Remove msr_ile macro
> target/ppc: Remove msr_ee macro
> target/ppc: Remove msr_ce macro
> target/ppc: Remove msr_pow macro
> target/ppc: Remove msr_me macro
> target/ppc: Remove msr_gs macro
> target/ppc: Remove msr_fp macro
> target/ppc: Remove msr_cm macro
> target/ppc: Remove msr_ir macro
> target/ppc: Remove msr_dr macro
> target/ppc: Remove msr_ep macro
> target/ppc: Remove msr_fe0 and msr_fe1 macros
> target/ppc: Remove msr_ts macro
> target/ppc: Remove msr_hv macro
> target/ppc: Add unused msr bits FIELDs
> target/ppc: Change MSR_* to follow POWER ISA numbering convention
>
> hw/ppc/pegasos2.c | 2 +-
> hw/ppc/spapr.c | 2 +-
> target/ppc/cpu.c | 2 +-
> target/ppc/cpu.h | 219 ++++++++++++++++++---------------------
> target/ppc/cpu_init.c | 23 ++--
> target/ppc/excp_helper.c | 54 +++++-----
> target/ppc/fpu_helper.c | 28 ++---
> target/ppc/gdbstub.c | 2 +-
> target/ppc/helper_regs.c | 11 +-
> target/ppc/kvm.c | 7 +-
> target/ppc/machine.c | 2 +-
> target/ppc/mem_helper.c | 23 ++--
> target/ppc/misc_helper.c | 2 +-
> target/ppc/mmu-radix64.c | 11 +-
> target/ppc/mmu_common.c | 40 +++----
> target/ppc/mmu_helper.c | 6 +-
> 16 files changed, 217 insertions(+), 217 deletions(-)
>
prev parent reply other threads:[~2022-05-04 20:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-03 20:24 [PATCH v3 00/21] target/ppc: Remove hidden usages of *env Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 01/21] target/ppc: Remove fpscr_* macros from cpu.h Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 02/21] target/ppc: Remove unused msr_* macros Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 03/21] target/ppc: Remove msr_pr macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 04/21] target/ppc: Remove msr_le macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 05/21] target/ppc: Remove msr_ds macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 06/21] target/ppc: Remove msr_ile macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 07/21] target/ppc: Remove msr_ee macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 08/21] target/ppc: Remove msr_ce macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 09/21] target/ppc: Remove msr_pow macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 10/21] target/ppc: Remove msr_me macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 11/21] target/ppc: Remove msr_gs macro Víctor Colombo
2022-05-04 2:03 ` Richard Henderson
2022-05-03 20:24 ` [PATCH v3 12/21] target/ppc: Remove msr_fp macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 13/21] target/ppc: Remove msr_cm macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 14/21] target/ppc: Remove msr_ir macro Víctor Colombo
2022-05-04 2:05 ` Richard Henderson
2022-05-03 20:24 ` [PATCH v3 15/21] target/ppc: Remove msr_dr macro Víctor Colombo
2022-05-04 2:07 ` Richard Henderson
2022-05-03 20:24 ` [PATCH v3 16/21] target/ppc: Remove msr_ep macro Víctor Colombo
2022-05-04 2:08 ` Richard Henderson
2022-05-03 20:24 ` [PATCH v3 17/21] target/ppc: Remove msr_fe0 and msr_fe1 macros Víctor Colombo
2022-05-04 2:08 ` Richard Henderson
2022-05-03 20:24 ` [PATCH v3 18/21] target/ppc: Remove msr_ts macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 19/21] target/ppc: Remove msr_hv macro Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 20/21] target/ppc: Add unused msr bits FIELDs Víctor Colombo
2022-05-03 20:24 ` [PATCH v3 21/21] target/ppc: Change MSR_* to follow POWER ISA numbering convention Víctor Colombo
2022-05-04 2:09 ` Richard Henderson
2022-05-04 20:33 ` Daniel Henrique Barboza [this message]
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=1f75f784-af04-3ed4-f8ad-d13eb4216b6e@gmail.com \
--to=danielhb413@gmail.com \
--cc=balaton@eik.bme.hu \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=victor.colombo@eldorado.org.br \
/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).