Skip to content

Misc PPC exception and BookE MMU clean ups

BALATON Zoltan qemu-devel 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest61 patches 13 repliesIn review
  2. v648 patches 0 repliesSuperseded
  3. v532 patches 1 replySuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v433 patches9 repliesSuperseded
v333 patches24 repliesSuperseded
v228 patches37 repliesSuperseded
v124 patches1 replySuperseded

Changes in v7 from the cover letter

- Added more clean ups

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/61target/ppc: Remove unused struct 'mmu_ctx_hash32'target/ppc/mmu-hash32.c+0 -60 replies
2/61target/ppc: Remove unused helpertarget/ppc/helper.h target/ppc/mmu_helper.c+0 -260 replies
3/61target/ppc/mmu_common.c: Move calculation of a value closer to its usagetarget/ppc/mmu_common.c+17 -190 replies
4/61target/ppc/mmu_common.c: Remove unneeded local variabletarget/ppc/mmu_common.c+13 -170 replies
5/61target/ppc/mmu_common.c: Simplify checking for real modetarget/ppc/mmu_common.c+4 -20 replies
6/61target/ppc/mmu_common.c: Drop cases for unimplemented MPC8xx MMUtarget/ppc/mmu_common.c+2 -100 replies
7/61target/ppc/mmu_common.c: Introduce mmu6xx_get_physical_address()target/ppc/mmu_common.c+12 -140 replies
8/61target/ppc/mmu_common.c: Move else branch to avoid large if blocktarget/ppc/mmu_common.c+34 -370 replies
9/61target/ppc/mmu_common.c: Move some debug loggingtarget/ppc/mmu_common.c+24 -300 replies
10/61target/ppc/mmu_common.c: Eliminate ret from mmu6xx_get_physical_address()target/ppc/mmu_common.c+39 -450 replies
11/61target/ppc/mmu_common.c: Split out BookE cases before checking real modetarget/ppc/mmu_common.c+7 -70 replies
12/61target/ppc/mmu_common.c: Split off real mode cases in get_physical_address_wtlb()target/ppc/mmu_common.c+9 -250 replies
13/61target/ppc/mmu_common.c: Inline and remove check_physical()target/ppc/mmu_common.c+3 -230 replies
14/61target/ppc/mmu_common.c: Fix misindented qemu_log_mask() callstarget/ppc/mmu_common.c+20 -220 replies
15/61target/ppc/mmu_common.c: Deindent ppc_jumbo_xlate()target/ppc/mmu_common.c+159 -1600 replies
16/61target/ppc/mmu_common.c: Replace hard coded constants in ppc_jumbo_xlate()target/ppc/mmu_common.c+2 -20 replies
17/61target/ppc/mmu_common.c: Don't use mmu_ctx_t for mmu40x_get_physical_address()target/ppc/mmu_common.c+15 -220 replies
18/61target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke_get_physical_address()target/ppc/mmu_common.c+10 -200 replies
19/61target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke206_get_physical_address()target/ppc/mmu_common.c+10 -220 replies
20/61target/ppc/mmu_common.c: Remove BookE from direct store handlingtarget/ppc/mmu_common.c+1 -60 replies
21/61target/ppc/mmu_common.c: Split off BookE handling from ppc_jumbo_xlate()target/ppc/mmu_common.c+96 -500 replies
22/61target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 1target/ppc/mmu_common.c+12 -290 replies
23/61target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 2target/ppc/mmu_common.c+20 -320 replies
24/61target/ppc/mmu_common.c: Split off real mode handling from get_physical_address_wtlb()target/ppc/mmu_common.c+27 -191 reply
25/61target/ppc/mmu_common.c: Split off 40x cases from ppc_jumbo_xlate()target/ppc/mmu_common.c+93 -571 reply
26/61target/ppc/mmu_common.c: Transform ppc_jumbo_xlate() into ppc_6xx_xlate()target/ppc/internal.h target/ppc/mmu_common.c+13 -301 reply
27/61target/ppc/mmu_common.c: Move mmu_ctx_t type to mmu_common.ctarget/ppc/internal.h target/ppc/mmu_common.c+11 -120 replies
28/61target/ppc/mmu_common.c: Remove pte_update_flags()target/ppc/mmu_common.c+13 -281 reply
29/61target/ppc: Remove id_tlbs flag from CPU envhw/ppc/pegasos2.c target/ppc/cpu.h target/ppc/cpu_init.c +3 more+14 -350 replies
30/61target/ppc: Split off common embedded TLB inittarget/ppc/cpu_init.c+17 -290 replies
31/61target/ppc/mmu-hash32.c: Drop a local variabletarget/ppc/mmu-hash32.c+2 -50 replies
32/61target/ppc/mmu-radix64.c: Drop a local variabletarget/ppc/mmu-radix64.c+2 -30 replies
33/61target/ppc: Add a function to check for page protection bittarget/ppc/cpu_init.c target/ppc/internal.h target/ppc/mmu-hash32.c +3 more+28 -361 reply
34/61target/ppc: Move out BookE and related MMU functions from mmu_common.ctarget/ppc/cpu.h target/ppc/meson.build target/ppc/mmu-booke.c +3 more+551 -5100 replies
35/61target/ppc: Remove pp_check() and reuse ppc_hash32_pp_prot()target/ppc/mmu-hash32.c target/ppc/mmu-hash32.h target/ppc/mmu_common.c+38 -872 replies
36/61target/ppc/mmu_common.c: Remove local name for a constanttarget/ppc/mmu_common.c+2 -32 replies
37/61target/ppc/mmu_common.c: Remove single use local variabletarget/ppc/mmu_common.c+1 -30 replies
38/61target/ppc/mmu_common.c: Remove single use local variabletarget/ppc/mmu_common.c+2 -30 replies
39/61target/ppc/mmu_common.c: Remove another single use localtarget/ppc/mmu_common.c+3 -40 replies
40/61target/ppc/mmu_common.c: Remove yet another single use localtarget/ppc/mmu_common.c+3 -30 replies
41/61target/ppc/mmu_common.c: Return directly in ppc6xx_tlb_pte_check()target/ppc/mmu_common.c+3 -70 replies
42/61target/ppc/mmu_common.c: Simplify ppc6xx_tlb_pte_check()target/ppc/mmu_common.c+19 -250 replies
43/61target/ppc/mmu_common.c: Remove unused field from mmu_ctx_ttarget/ppc/mmu_common.c+0 -20 replies
44/61target/ppc/mmu_common.c: Remove hash field from mmu_ctx_ttarget/ppc/mmu_common.c+8 -110 replies
45/61target/ppc/mmu_common.c: Remove nx field from mmu_ctx_ttarget/ppc/mmu_common.c+12 -120 replies
46/61target/ppc/mmu_common.c: Convert local variable to booltarget/ppc/mmu_common.c+3 -30 replies
47/61target/ppc/mmu_common.c: Remove single use local variabletarget/ppc/mmu_common.c+1 -30 replies
48/61target/ppc/mmu_common.c: Simplify a switch statementtarget/ppc/mmu_common.c+4 -150 replies
49/61target/ppc/mmu_common.c: Inline and remove ppc6xx_tlb_pte_check()target/ppc/mmu_common.c+22 -490 replies
50/61target/ppc/mmu_common.c: Remove ptem field from mmu_ctx_ttarget/ppc/mmu_common.c+14 -90 replies
51/61target/ppc: Add function to get protection key for hash32 MMUtarget/ppc/mmu-hash32.c target/ppc/mmu-hash32.h target/ppc/mmu_common.c+12 -50 replies
52/61target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_prot()target/ppc/mmu-hash32.c+4 -152 replies
53/61target/ppc/mmu_common.c: Init variable in function that relies on ittarget/ppc/mmu_common.c+2 -20 replies
54/61target/ppc/mmu_common.c: Remove key field from mmu_ctx_ttarget/ppc/mmu_common.c+14 -120 replies
55/61target/ppc/mmu_common.c: Stop using ctx in ppc6xx_tlb_check()target/ppc/mmu_common.c+13 -130 replies
56/61target/ppc/mmu_common.c: Rename function parametertarget/ppc/mmu_common.c+9 -90 replies
57/61targe/ppc/mmu_common.c: Use defines instead of numeric constantstarget/ppc/mmu_common.c+13 -130 replies
58/61target/ppc: Remove bat_size_prot()target/ppc/mmu-hash32.c target/ppc/mmu-hash32.h target/ppc/mmu_common.c+27 -570 replies
59/61target/ppc/mmu_common.c: Stop using ctx in get_bat_6xx_tlb()target/ppc/mmu_common.c+9 -80 replies
60/61target/ppc/mmu_common.c: Remove mmu_ctx_ttarget/ppc/mmu_common.c+7 -180 replies
61/61target/ppc/mmu_common.c: Remove a local variabletarget/ppc/mmu_common.c+2 -20 replies

Reviews trailers per patch

31 of 61 patches have a Reviewed-by or Acked-by.

PatchNicholas PigginBALATON Zoltan
1/61R-b
2/61Reviwed-by
3/61Reviwed-by
4/61R-b
5/61R-b
6/61R-b
7/61R-b
8/61R-b
9/61R-b
10/61R-b
11/61R-b
12/61R-b
13/61R-b
14/61A-b
15/61A-b
16/61R-b
17/61R-b
18/61R-b
19/61R-b
20/61R-b
21/61R-b
22/61R-b
23/61R-b
24/61R-b
25/61R-b
26/61R-b
27/61R-b
28/61
29/61R-b
30/61R-b
31/61R-b
32/61R-b
33/61Reivewed-by
34/61A-b
35/61R-b
36/61
37/61
38/61
39/61
40/61
41/61
42/61
43/61
44/61
45/61
46/61
47/61
48/61
49/61
50/61
51/61
52/61
53/61
54/61
55/61
56/61
57/61
58/61
59/61
60/61
61/61

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 00/61] Misc PPC exception and BookE MMU clean ups

This series does some further clean up mostly around BookE MMU to untangle it from other MMU models. It also contains some other changes that I've come up with while working on this. The Simplify ppc_booke_xlate() part 1 and part 2 patches could be squashed together but left them separate for easier review. This could still be continued which I might do in the future but this is long enough now to be merged.

v7:
- Added more clean ups

v6:
- Finish breaking up ppc_jumbo_xlate by MMU model as the TODO comment said and remove it completely
- Add some more small clean ups

v5:
- drop sc patches from this series
- eliminate uninit warning work arounds and also get rid of get_physical_address_wtlb() (one memset is still needed temporarily but can be removed at the end)
- use function instead of macro

v4:
- Add a (probably redundant) check for MPC8xx case in ppc_xlate so we don't have to care about it in lower levels
- Detangle BookE related functions from mmu_ctx_t to avoid some used uninit work arounds and allow these to be moved out to mmu-booke.c
- Some other tweaks asked during review

v3:
- Address review comments from Nick
- Rebase on master
- Squashed some patches together
- Add some more patches I've done since last version

v2:
- Fix user mode issue in patch 1 by keeping old behaviour for user mode
- Add some more MMU clean up patches

Regards,
BALATON Zoltan

Dr. David Alan Gilbert (1):
target/ppc: Remove unused struct 'mmu_ctx_hash32'

BALATON Zoltan (60):
target/ppc: Remove unused helper target/ppc/mmu_common.c: Move calculation of a value closer to its
usage
target/ppc/mmu_common.c: Remove unneeded local variable target/ppc/mmu_common.c: Simplify checking for real mode target/ppc/mmu_common.c: Drop cases for unimplemented MPC8xx MMU target/ppc/mmu_common.c: Introduce mmu6xx_get_physical_address() target/ppc/mmu_common.c: Move else branch to avoid large if block target/ppc/mmu_common.c: Move some debug logging target/ppc/mmu_common.c: Eliminate ret from
mmu6xx_get_physical_address()
target/ppc/mmu_common.c: Split out BookE cases before checking real
mode
target/ppc/mmu_common.c: Split off real mode cases in
get_physical_address_wtlb()
target/ppc/mmu_common.c: Inline and remove check_physical() target/ppc/mmu_common.c: Fix misindented qemu_log_mask() calls target/ppc/mmu_common.c: Deindent ppc_jumbo_xlate() target/ppc/mmu_common.c: Replace hard coded constants in
ppc_jumbo_xlate()
target/ppc/mmu_common.c: Don't use mmu_ctx_t for

    mmu40x_get_physical_address()
  target/ppc/mmu_common.c: Don't use mmu_ctx_t in
    mmubooke_get_physical_address()
  target/ppc/mmu_common.c: Don't use mmu_ctx_t in
    mmubooke206_get_physical_address()
  target/ppc/mmu_common.c: Remove BookE from direct store handling
  target/ppc/mmu_common.c: Split off BookE handling from
    ppc_jumbo_xlate()
  target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 1
  target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 2
  target/ppc/mmu_common.c: Split off real mode handling from
    get_physical_address_wtlb()
  target/ppc/mmu_common.c: Split off 40x cases from ppc_jumbo_xlate()
  target/ppc/mmu_common.c: Transform ppc_jumbo_xlate() into
    ppc_6xx_xlate()

target/ppc/mmu_common.c: Move mmu_ctx_t type to mmu_common.c target/ppc/mmu_common.c: Remove pte_update_flags() target/ppc: Remove id_tlbs flag from CPU env
target/ppc: Split off common embedded TLB init target/ppc/mmu-hash32.c: Drop a local variable target/ppc/mmu-radix64.c: Drop a local variable target/ppc: Add a function to check for page protection bit target/ppc: Move out BookE and related MMU functions from mmu_common.c target/ppc: Remove pp_check() and reuse ppc_hash32_pp_prot() target/ppc/mmu_common.c: Remove local name for a constant target/ppc/mmu_common.c: Remove single use local variable target/ppc/mmu_common.c: Remove single use local variable target/ppc/mmu_common.c: Remove another single use local target/ppc/mmu_common.c: Remove yet another single use local target/ppc/mmu_common.c: Return directly in ppc6xx_tlb_pte_check() target/ppc/mmu_common.c: Simplify ppc6xx_tlb_pte_check() target/ppc/mmu_common.c: Remove unused field from mmu_ctx_t target/ppc/mmu_common.c: Remove hash field from mmu_ctx_t target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t target/ppc/mmu_common.c: Convert local variable to bool target/ppc/mmu_common.c: Remove single use local variable target/ppc/mmu_common.c: Simplify a switch statement target/ppc/mmu_common.c: Inline and remove ppc6xx_tlb_pte_check() target/ppc/mmu_common.c: Remove ptem field from mmu_ctx_t target/ppc: Add function to get protection key for hash32 MMU target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_prot() target/ppc/mmu_common.c: Init variable in function that relies on it target/ppc/mmu_common.c: Remove key field from mmu_ctx_t target/ppc/mmu_common.c: Stop using ctx in ppc6xx_tlb_check() target/ppc/mmu_common.c: Rename function parameter targe/ppc/mmu_common.c: Use defines instead of numeric constants target/ppc: Remove bat_size_prot() target/ppc/mmu_common.c: Stop using ctx in get_bat_6xx_tlb() target/ppc/mmu_common.c: Remove mmu_ctx_t target/ppc/mmu_common.c: Remove a local variable

 hw/ppc/pegasos2.c        |    2 +-
 target/ppc/cpu.h         |    9 +-
 target/ppc/cpu_init.c    |   70 +-
 target/ppc/helper.h      |    2 -
 target/ppc/helper_regs.c |    1 -
 target/ppc/internal.h    |   40 +-
 target/ppc/meson.build   |    1 +
 target/ppc/mmu-booke.c   |  531 +++++++++++++++
 target/ppc/mmu-booke.h   |   17 +
 target/ppc/mmu-hash32.c  |  104 +--
 target/ppc/mmu-hash32.h  |   55 ++
 target/ppc/mmu-hash64.c  |    2 +-
 target/ppc/mmu-radix64.c |    5 +-
 target/ppc/mmu_common.c  | 1400 ++++++++++----------------------------
 target/ppc/mmu_helper.c  |   37 +-
 15 files changed, 1010 insertions(+), 1266 deletions(-)
 create mode 100644 target/ppc/mmu-booke.c
 create mode 100644 target/ppc/mmu-booke.h
Signature · 1 line
2.30.9