Skip to content

add LVZ support for TCG

SignKirigami qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest26 patches 5 repliesIn review
  2. v523 patches 12 repliesSuperseded
  3. v414 patches 11 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v38 patches7 repliesSuperseded
v24 patches2 repliesSuperseded
v14 patches15 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26target/loongarch: add get_sys() helpertarget/loongarch/cpu.c target/loongarch/cpu.h+6 -10 replies
2/26target/loongarch: add LVZ feature switchertarget/loongarch/cpu.c target/loongarch/cpu.h target/loongarch/translate.h+34 -20 replies
3/26target/loongarch: add LVZ CSR metadatatarget/loongarch/cpu-csr.h target/loongarch/cpu.h target/loongarch/csr.c +2 more+104 -480 replies
4/26target/loongarch: add vm level 1 definitiontarget/loongarch/cpu.h target/loongarch/tcg/tcg_cpu.c+24 -12 replies
5/26target/loongarch: add definition about guest mmu_idxtarget/loongarch/cpu.h target/loongarch/tcg/insn_trans/trans_privileged.c.inc target/loongarch/tcg/tcg_cpu.c +1 more+29 -11 reply
6/26target/loongarch: move timer initialization to loongarh_cpu_realizefn()target/loongarch/cpu.c+15 -220 replies
7/26target/loongarch: add LVZ guest interrupt statetarget/loongarch/cpu.c target/loongarch/cpu.h target/loongarch/internals.h +2 more+55 -221 reply
8/26target/loongarch: add LVZ guest timertarget/loongarch/cpu.c target/loongarch/cpu.h+20 -21 reply
9/26target/loongarch: handle return to guest in ertntarget/loongarch/cpu.h target/loongarch/tcg/op_helper.c+22 -00 replies
10/26target/loongarch: handle LVZ exception and vm_exittarget/loongarch/cpu.h target/loongarch/tcg/tcg_cpu.c+20 -80 replies
11/26target/loongarch: add host TLBRet and handletarget/loongarch/cpu-mmu.h target/loongarch/tcg/tlb_helper.c+24 -20 replies
12/26target/loongarch: add gid management functionstarget/loongarch/cpu.h target/loongarch/tcg/tlb_helper.c+18 -00 replies
13/26target/loongarch: add LVZ parameters to TLB functionstarget/loongarch/cpu-mmu.h target/loongarch/cpu_helper.c target/loongarch/tcg/helper.h +2 more+120 -910 replies
14/26target/loongarch: add LVZ to TLB functionstarget/loongarch/cpu.h target/loongarch/cpu_helper.c target/loongarch/tcg/tlb_helper.c+44 -200 replies
15/26target/loongarch: add 2-level address mapping to loongarch_cpu_tlb_fill()target/loongarch/tcg/tlb_helper.c+36 -130 replies
16/26target/loongarch: add LVZ to invtlb 0x0-0x6target/loongarch/tcg/tlb_helper.c+17 -80 replies
17/26target/loongarch: add LVZ to invtlb 0xa-0xetarget/loongarch/tcg/insn_trans/trans_privileged.c.inc target/loongarch/tcg/tlb_helper.c+70 -100 replies
18/26target/loongarch: add LVZ to ptwtarget/loongarch/cpu-mmu.h target/loongarch/cpu_helper.c target/loongarch/tcg/tlb_helper.c+39 -330 replies
19/26target/loongarch: add LVZ migration statetarget/loongarch/machine.c+139 -00 replies
20/26target/loongarch: add LVZ to CSR operationstarget/loongarch/tcg/csr_helper.c target/loongarch/tcg/helper.h target/loongarch/tcg/insn_trans/trans_privileged.c.inc+93 -420 replies
21/26target/loongarch: add LVZ to CSR helperstarget/loongarch/tcg/csr_helper.c+32 -170 replies
22/26target/loongarch: add guest CSR operationstarget/loongarch/disas.c target/loongarch/insns.decode target/loongarch/tcg/insn_trans/trans_privileged.c.inc+36 -00 replies
23/26target/loongarch: add LVZ CSRstarget/loongarch/tcg/csr_helper.c target/loongarch/tcg/helper.h target/loongarch/tcg/insn_trans/trans_privileged.c.inc+59 -00 replies
24/26target/loongarch: translate LVZ guest traps and HVCtarget/loongarch/disas.c target/loongarch/insns.decode target/loongarch/tcg/helper.h +3 more+43 -10 replies
25/26target/loongarch: initialize CSR related to LVZtarget/loongarch/cpu.c+4 -10 replies
26/26target/loongarch: exit to vm level 0 for fpd, sxd and asxd of vm level 0target/loongarch/tcg/op_helper.c target/loongarch/tcg/tcg_cpu.c+32 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 00/26] add LVZ support for TCG

This patch implements Loongson VirtualiZation (LVZ) extension support for LoongArch's TCG target. With this patch, it is now possible to start a nested KVM-accelerated virtual machine on a TCG-emulated virtual machine.

SignKirigami (26):
target/loongarch: add get_sys() helper
target/loongarch: add LVZ feature switcher target/loongarch: add LVZ CSR metadata
target/loongarch: add vm level 1 definition target/loongarch: add definition about guest mmu_idx target/loongarch: move timer initialization to
loongarh_cpu_realizefn()
target/loongarch: add LVZ guest interrupt state target/loongarch: add LVZ guest timer
target/loongarch: handle return to guest in ertn target/loongarch: handle LVZ exception and vm_exit target/loongarch: add host TLBRet and handle target/loongarch: add gid management functions target/loongarch: add LVZ parameters to TLB functions target/loongarch: add LVZ to TLB functions target/loongarch: add 2-level address mapping to
loongarch_cpu_tlb_fill()
target/loongarch: add LVZ to invtlb 0x0-0x6 target/loongarch: add LVZ to invtlb 0xa-0xe target/loongarch: add LVZ to ptw
target/loongarch: add LVZ migration state target/loongarch: add LVZ to CSR operations target/loongarch: add LVZ to CSR helpers
target/loongarch: add guest CSR operations target/loongarch: add LVZ CSRs
target/loongarch: translate LVZ guest traps and HVC target/loongarch: initialize CSR related to LVZ target/loongarch: exit to vm level 0 for fpd, sxd and asxd of vm level

    0
 target/loongarch/cpu-csr.h                    |  38 ++
 target/loongarch/cpu-mmu.h                    |  31 +-
 target/loongarch/cpu.c                        | 117 +++++--
 target/loongarch/cpu.h                        |  90 ++++-
 target/loongarch/cpu_helper.c                 |  52 +--
 target/loongarch/csr.c                        | 102 +++---
 target/loongarch/csr.h                        |   1 +
 target/loongarch/disas.c                      |   9 +
 target/loongarch/insns.decode                 |   7 +
 target/loongarch/internals.h                  |   4 +-
 target/loongarch/machine.c                    | 139 ++++++++
 target/loongarch/tcg/csr_helper.c             | 131 +++++--
 target/loongarch/tcg/helper.h                 |  37 +-
 .../tcg/insn_trans/trans_extra.c.inc          |   5 +
 .../tcg/insn_trans/trans_privileged.c.inc     | 212 ++++++++++--
 target/loongarch/tcg/op_helper.c              |  37 ++
 target/loongarch/tcg/tcg_cpu.c                |  89 +++--
 target/loongarch/tcg/tlb_helper.c             | 324 ++++++++++++------
 target/loongarch/tcg/translate.c              |   3 +
 target/loongarch/translate.h                  |   1 +
 20 files changed, 1107 insertions(+), 322 deletions(-)

base-commit: 49559567804523cb28cad002aa8e97f444e23ad7

Signature · 1 line
2.56.0