RFC Add RISC-V TCG backend support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 posting 2/223 patches 6 repliesApplied
- v3 RFC Latest24 patches 10 repliesIn review
- v2 RFC posting 1/224 patches 13 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 23 patches | 40 replies | Superseded |
Changes in v3 from the cover letter
- Update the MAINTAINERS file
- Enusre that RISC-V 32-bit works
- More changes based on Richard's feedback and contributions
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/24 | elf.h: Add the RISCV ELF magic numbersinclude/ | +55 | 0 replies | |
| 2/24 | linux-user: Add host dependency for RISC-V 32-bitMAINTAINERS linux-user/ | +12 | 0 replies | |
| 3/24 | linux-user: Add host dependency for RISC-V 64-bitMAINTAINERS linux-user/ | +12 | 0 replies | |
| 4/24 | linux-user: riscv: Fix compile failure on riscv32 hostslinux-user/ | +5 | 2 replies | |
| 5/24 | exec: Add RISC-V GCC poison macroinclude/ | +1 | 0 replies | |
| 6/24 | riscv: Add the tcg-target header fileMAINTAINERS tcg/ | +176 | 0 replies | |
| 7/24 | riscv: Add the tcg target registerstcg/ | +118 | 0 replies | |
| 8/24 | riscv: tcg-target: Add support for the constraintstcg/ | +168 | 1 reply | |
| 9/24 | riscv: tcg-target: Add the immediate encoderstcg/ | +90 | 0 replies | |
| 10/24 | riscv: tcg-target: Add the instruction emitterstcg/ | +48 | 0 replies | |
| 11/24 | riscv: tcg-target: Add the relocation functionstcg/ | +75 | 0 replies | |
| 12/24 | riscv: tcg-target: Add the mov and movi instructiontcg/ | +85 | 0 replies | |
| 13/24 | riscv: tcg-target: Add the extract instructionstcg/ | +34 | 0 replies | |
| 14/24 | riscv: tcg-target: Add the out load and store instructionstcg/ | +65 | 0 replies | |
| 15/24 | riscv: tcg-target: Add the add2 and sub2 instructionstcg/ | +55 | 2 replies | |
| 16/24 | riscv: tcg-target: Add branch and jump instructionstcg/ | +142 | 0 replies | |
| 17/24 | riscv: tcg-target: Add slowpath load and store instructionstcg/ | +254 | 1 reply | |
| 18/24 | riscv: tcg-target: Add direct load and store instructionstcg/ | +158 | 1 reply | |
| 19/24 | riscv: tcg-target: Add the out op decodertcg/ | +493 | 3 replies | |
| 20/24 | riscv: tcg-target: Add the prologue generation and register the JITtcg/ | +111 | 0 replies | |
| 21/24 | riscv: tcg-target: Add the target init codetcg/ | +31 | 0 replies | |
| 22/24 | tcg: Add RISC-V cpu signal handleraccel/ | +75 | 0 replies | |
| 23/24 | dias: Add RISC-V supportdisas.c | +8 | 0 replies | |
| 24/24 | configure: Add support for building RISC-V hostconfigure | +10 | 0 replies |
Reviews trailers per patch
18 of 24 patches have a Reviewed-by or Acked-by.
| Patch | Richard Henderson |
|---|---|
| 1/24 | R-b |
| 2/24 | R-b |
| 3/24 | R-b |
| 4/24 | |
| 5/24 | R-b |
| 6/24 | R-b |
| 7/24 | R-b |
| 8/24 | R-b |
| 9/24 | R-b |
| 10/24 | R-b |
| 11/24 | |
| 12/24 | |
| 13/24 | R-b |
| 14/24 | R-b |
| 15/24 | R-b |
| 16/24 | |
| 17/24 | |
| 18/24 | R-b |
| 19/24 | R-b |
| 20/24 | R-b |
| 21/24 | R-b |
| 22/24 | |
| 23/24 | R-b |
| 24/24 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [RFC v3 00/24] Add RISC-V TCG backend support
This patch set adds RISC-V backend support to QEMU. This is based on Michael Clark's original work with extra work ontop.
This has been somewhat tested and can run other architecture softmmu code. It seems like any OS will eventually hang, but we can run the BIOS and OS startup code for a number of different operating systems.
I haven't tested linux user support at all yet. I think Michael had that working reliably though and hopefully my changes haven't broken it. I'll have to test it before I send a full patchset.
There are still some todos in the code (there are missing instructions and byte swapping). I think this series will have to be rebased ontop of Richard's TCG work before merging (although maybe we can get this in and then work on the rebase).
This branch can be found here:
https://github.com/alistair23/qemu/tree/mainline/alistair/tcg-backend-upstream.next
The working version with Michael's orignal patch and work ontop can be found here:
https://github.com/alistair23/qemu/tree/mainline/alistair/tcg-backend.next
RFC v3:
- Update the MAINTAINERS file
- Enusre that RISC-V 32-bit works
- More changes based on Richard's feedback and contributions
RFC v2:
- A large number of changes based on Richard's feedback
Alistair Francis (24):
elf.h: Add the RISCV ELF magic numbers
linux-user: Add host dependency for RISC-V 32-bit
linux-user: Add host dependency for RISC-V 64-bit
linux-user: riscv: Fix compile failure on riscv32 hosts
exec: Add RISC-V GCC poison macro
riscv: Add the tcg-target header file
riscv: Add the tcg target registers
riscv: tcg-target: Add support for the constraints
riscv: tcg-target: Add the immediate encoders
riscv: tcg-target: Add the instruction emitters
riscv: tcg-target: Add the relocation functions
riscv: tcg-target: Add the mov and movi instruction
riscv: tcg-target: Add the extract instructions
riscv: tcg-target: Add the out load and store instructions
riscv: tcg-target: Add the add2 and sub2 instructions
riscv: tcg-target: Add branch and jump instructions
riscv: tcg-target: Add slowpath load and store instructions
riscv: tcg-target: Add direct load and store instructions
riscv: tcg-target: Add the out op decoder
riscv: tcg-target: Add the prologue generation and register the JIT
riscv: tcg-target: Add the target init code
tcg: Add RISC-V cpu signal handler
dias: Add RISC-V support
configure: Add support for building RISC-V host
MAINTAINERS | 3 + accel/tcg/user-exec.c | 75 ++ configure | 12 +- disas.c | 10 +- include/elf.h | 55 + include/exec/poison.h | 1 + linux-user/host/riscv32/hostdep.h | 11 + linux-user/host/riscv64/hostdep.h | 11 + linux-user/riscv/target_syscall.h | 5 + tcg/riscv/tcg-target.h | 175 +++ tcg/riscv/tcg-target.inc.c | 1927 +++++++++++++++++++++++++++++ 11 files changed, 2281 insertions(+), 4 deletions(-) create mode 100644 linux-user/host/riscv32/hostdep.h create mode 100644 linux-user/host/riscv64/hostdep.h create mode 100644 tcg/riscv/tcg-target.h create mode 100644 tcg/riscv/tcg-target.inc.c
Signature · 1 line
2.19.1