Skip to content

Add some checks before translating instructions

Philippe Mathieu-Daudé qemu-devel 2 versions Applied

Status from this message: Applied to loongarch-to-apply queue

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest posting 2/219 patches 1 replyApplied
  2. v5 posting 1/29 of 19 patches 1 replySuperseded

Changes in v5 from the cover letter

- Split 2 patches, extracting helpers
- R-b

Patches in v5 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/19target/loongarch: Support LoongArch32 TLB entrytarget/loongarch/cpu-csr.h target/loongarch/tlb_helper.c+17 -90 replies
2/19target/loongarch: Support LoongArch32 DMWtarget/loongarch/cpu-csr.h target/loongarch/tlb_helper.c+26 -70 replies
3/19target/loongarch: Support LoongArch32 VPPNtarget/loongarch/cpu-csr.h target/loongarch/tlb_helper.c+22 -70 replies
4/19target/loongarch: Add LA64 & VA32 to DisasContexttarget/loongarch/cpu.h target/loongarch/translate.c target/loongarch/translate.h+18 -00 replies
5/19target/loongarch: Extract make_address_x() helpertarget/loongarch/insn_trans/trans_fmemory.c.inc target/loongarch/insn_trans/trans_lsx.c.inc target/loongarch/insn_trans/trans_memory.c.inc +1 more+22 -200 replies
6/19target/loongarch: Extract make_address_i() helpertarget/loongarch/insn_trans/trans_atomic.c.inc target/loongarch/insn_trans/trans_branch.c.inc target/loongarch/insn_trans/trans_fmemory.c.inc +3 more+29 -570 replies
7/19target/loongarch: Extract make_address_pc() helpertarget/loongarch/insn_trans/trans_arith.c.inc target/loongarch/insn_trans/trans_branch.c.inc target/loongarch/translate.c+8 -30 replies
8/19target/loongarch: Extract set_pc() helpertarget/loongarch/cpu.c target/loongarch/cpu.h target/loongarch/gdbstub.c +1 more+16 -110 replies
9/19target/loongarch: Truncate high 32 bits of address in VA32 modetarget/loongarch/cpu.h target/loongarch/translate.c+20 -20 replies
10/19target/loongarch: Sign extend results in VA32 modetarget/loongarch/translate.c+3 -00 replies
11/19target/loongarch: Add a check parameter to the TRANS macrotarget/loongarch/insn_trans/trans_arith.c.inc target/loongarch/insn_trans/trans_atomic.c.inc target/loongarch/insn_trans/trans_bit.c.inc +11 more+903 -9010 replies
12/19target/loongarch: Add avail_64 to check la64-only instructionstarget/loongarch/insn_trans/trans_arith.c.inc target/loongarch/insn_trans/trans_atomic.c.inc target/loongarch/insn_trans/trans_bit.c.inc +7 more+152 -1230 replies
13/19target/loongarch: Add LoongArch32 cpu la132target/loongarch/cpu.c+30 -00 replies
14/19hw/loongarch: Remove restriction of la464 cores in the virt machinehw/loongarch/virt.c+0 -50 replies
15/19target/loongarch: Add avail_FP/FP_SP/FP_DP to check fpu instructionstarget/loongarch/insn_trans/trans_farith.c.inc target/loongarch/insn_trans/trans_fcmp.c.inc target/loongarch/insn_trans/trans_fcnv.c.inc +4 more+159 -860 replies
16/19target/loongarch: Add avail_LSPW to check LSPW instructionstarget/loongarch/insn_trans/trans_privileged.c.inc target/loongarch/translate.h+9 -00 replies
17/19target/loongarch: Add avail_LAM to check atomic instructionstarget/loongarch/insn_trans/trans_atomic.c.inc target/loongarch/translate.h+37 -360 replies
18/19target/loongarch: Add avail_LSX to check LSX instructionstarget/loongarch/insn_trans/trans_lsx.c.inc target/loongarch/translate.h+780 -6180 replies
19/19target/loongarch: Add avail_IOCSR to check iocsr instructionstarget/loongarch/insn_trans/trans_privileged.c.inc target/loongarch/translate.h+9 -90 replies

Reviews trailers per patch

All 19 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPhilippe Mathieu-DaudéJiajie Chen
1/19R-b
2/19R-b
3/19R-b
4/19R-b
5/19Co-authored-by R-b R-b
6/19Co-authored-by R-b R-b
7/19R-b R-b
8/19Co-authored-by R-b R-b
9/19Co-authored-by R-b R-b
10/19R-b R-b
11/19R-b R-b
12/19R-b Co-authored-by
13/19A-b R-b
14/19R-b R-b Co-authored-by
15/19A-b
16/19R-b
17/19R-b
18/19R-b
19/19R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH RESEND v5 00/19] Add some checks before translating instructions

Based-on: https://patchew.org/QEMU/[email protected]/

(all series reviewed, for Song Gao to pick whichever v4/v5 is preferred)

Hi,

This series adds some checks before translating instructions

This includes:

CPUCFG[1].IOCSR

CPUCFG[2].FP
CPUCFG[2].FP_SP
CPUCFG[2].FP_DP
CPUCFG[2].LSPW
CPUCFG[2].LAM
CPUCFG[2].LSX

V5:
- Split 2 patches, extracting helpers
- R-b

V4:
- Rebase;
- Split patch 'Add LoongArch32 cpu la132' in two patch; (PMD)
- Remove unrelated cpucfgX;(PMD)
- R-b.

V3:
- Rebase;
- The la32 instructions following Table 2 at [2].

V2:
- Add a check parameter to the TRANS macro.
- remove TRANS_64.
- Add avail_ALL/64/FP/FP_SP/FP_DP/LSPW/LAM/LSX/IOCSR to check instructions.

[1]: https://patchew.org/QEMU/[email protected]/
[2]: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#overview-of-basic-integer-instructions

Jiajie Chen (11):
target/loongarch: Support LoongArch32 TLB entry target/loongarch: Support LoongArch32 DMW target/loongarch: Support LoongArch32 VPPN target/loongarch: Add LA64 & VA32 to DisasContext target/loongarch: Extract make_address_x() helper target/loongarch: Extract make_address_i() helper target/loongarch: Extract make_address_pc() helper target/loongarch: Extract set_pc() helper target/loongarch: Truncate high 32 bits of address in VA32 mode target/loongarch: Sign extend results in VA32 mode target/loongarch: Add LoongArch32 cpu la132

Song Gao (8):
target/loongarch: Add a check parameter to the TRANS macro target/loongarch: Add avail_64 to check la64-only instructions hw/loongarch: Remove restriction of la464 cores in the virt machine target/loongarch: Add avail_FP/FP_SP/FP_DP to check fpu instructions target/loongarch: Add avail_LSPW to check LSPW instructions target/loongarch: Add avail_LAM to check atomic instructions target/loongarch: Add avail_LSX to check LSX instructions target/loongarch: Add avail_IOCSR to check iocsr instructions

 target/loongarch/cpu-csr.h                    |   22 +-
 target/loongarch/cpu.h                        |   22 +
 target/loongarch/translate.h                  |   19 +-
 hw/loongarch/virt.c                           |    5 -
 target/loongarch/cpu.c                        |   46 +-
 target/loongarch/gdbstub.c                    |    2 +-
 target/loongarch/op_helper.c                  |    4 +-
 target/loongarch/tlb_helper.c                 |   66 +-
 target/loongarch/translate.c                  |   46 +
 target/loongarch/insn_trans/trans_arith.c.inc |   98 +-
 .../loongarch/insn_trans/trans_atomic.c.inc   |   85 +-
 target/loongarch/insn_trans/trans_bit.c.inc   |   56 +-
 .../loongarch/insn_trans/trans_branch.c.inc   |   27 +-
 target/loongarch/insn_trans/trans_extra.c.inc |   24 +-
 .../loongarch/insn_trans/trans_farith.c.inc   |   96 +-
 target/loongarch/insn_trans/trans_fcmp.c.inc  |    8 +
 target/loongarch/insn_trans/trans_fcnv.c.inc  |   56 +-
 .../loongarch/insn_trans/trans_fmemory.c.inc  |   62 +-
 target/loongarch/insn_trans/trans_fmov.c.inc  |   52 +-
 target/loongarch/insn_trans/trans_lsx.c.inc   | 1434 +++++++++--------
 .../loongarch/insn_trans/trans_memory.c.inc   |  118 +-
 .../insn_trans/trans_privileged.c.inc         |   24 +-
 target/loongarch/insn_trans/trans_shift.c.inc |   34 +-
 23 files changed, 1386 insertions(+), 1020 deletions(-)
Signature · 1 line
2.41.0