Skip to content

RFC accel/split/arm: Run EL2 using TCG and EL1/EL0 in hardware with HVF

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest42 patches 40 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/42accel/split: Minimal stubs for split acceleratoraccel/Kconfig accel/meson.build accel/split/meson.build +3 more+258 -01 reply
2/42accel/split: Define SplitAccelStateaccel/split/split-accel.h accel/split/split-all.c+42 -11 reply
3/42accel/split: Implement cpus_are_resettable()accel/split/split-all.c+12 -11 reply
4/42accel/split: Implement accel_init_machine()accel/split/split-accel.h accel/split/split-all.c+32 -12 replies
5/42accel/split: Expose 'hw' and 'sw' propertiesaccel/split/split-all.c+46 -01 reply
6/42accel/split: Empty setup_post()accel/split/split-all.c+0 -61 reply
7/42accel/split: Implement supports_guest_debug()accel/split/split-all.c+12 -11 reply
8/42accel/split: Implement gdbstub_supported_sstep_flags()accel/split/split-all.c+13 -11 reply
9/42accel/split: Add cpu_thread_routine() stubaccel/split/split-accel-ops.c+69 -11 reply
10/42accel/split: Define and allocate AccelCPUStateaccel/split/split-accel-ops.c accel/split/split-accel.h+15 -11 reply
11/42accel/split: Register MTTCGaccel/split/split-accel-ops.c+5 -01 reply
12/42accel/split: Have thread routine ready to dispatch over HW/SWaccel/split/split-accel-ops.c+16 -61 reply
13/42accel/split: Implement cpu_reset_hold()accel/split/split-accel-ops.c+11 -11 reply
14/42accel/split: Implement synchronize_post_init()accel/split/split-accel-ops.c+10 -11 reply
15/42accel/split: Implement synchronize_pre_resume()accel/split/split-accel-ops.c+11 -11 reply
16/42accel/split: Implement synchronize_state()accel/split/split-accel-ops.c+10 -12 replies
17/42accel/split: Implement synchronize_post_reset()accel/split/split-accel-ops.c+10 -10 replies
18/42accel/split: Implement synchronize_pre_loadvm()accel/split/split-accel-ops.c+10 -10 replies
19/42accel/split: Implement kick_vcpu_thread()accel/split/split-accel-ops.c+7 -11 reply
20/42accel/split: Implement cpu_common_realize()accel/split/split-accel-ops.c+9 -11 reply
21/42accel/split: Set use_hw in cpu_thread_routine() and switch overaccel/split/split-accel-ops.c accel/split/split-accel.h include/exec/cpu-common.h+13 -01 reply
22/42accel/split: Add few trace events in cpu_thread_routine handleraccel/split/split-accel-ops.c accel/split/trace-events accel/split/trace.h +1 more+19 -00 replies
23/42target/arm: Implement SysemuCPUOps::can_accelerate() handlertarget/arm/cpu.c+8 -01 reply
24/42accel/split: Implement handle_interrupt()accel/split/split-accel-ops.c+9 -11 reply
25/42accel/split: Empty ops_init()accel/split/split-accel-ops.c+0 -61 reply
26/42accel/split: Empty set/get_virtual_clock()accel/split/split-accel-ops.c+0 -121 reply
27/42accel/split: Empty get_elapsed_ticks()accel/split/split-accel-ops.c+0 -71 reply
28/42accel/split: Empty cpu_thread_is_idle()accel/split/split-accel-ops.c+0 -61 reply
29/42accel/split: Kludge qemu_tcg_mttcg_enabled()accel/tcg/tcg-all.c+1 -00 replies
30/42accel/split: Implement remove_all_breakpoints()accel/split/split-accel-ops.c+10 -11 reply
31/42accel/split: Implement remove_breakpoint()accel/split/split-accel-ops.c+12 -11 reply
32/42accel/split: Implement insert_breakpoint()accel/split/split-accel-ops.c+12 -11 reply
33/42accel/split: Implement update_guest_debug()accel/split/split-accel-ops.c+10 -11 reply
34/42accel/split: Implement get_[vcpu]_stats()accel/split/split-accel-ops.c accel/split/split-accel.h accel/split/split-all.c+43 -21 reply
35/42target/arm: Emulate EL2 under TCGtarget/arm/cpu64.c+5 -21 reply
36/42target/arm: Have ERET switch to hw accel for EL0/EL1target/arm/tcg/helper-a64.c+9 -01 reply
37/42accel/hvf: Emulate HVC at EL2target/arm/hvf/hvf.c+6 -02 replies
38/42accel/tcg: Introduce TCGCPUOps::rebuild_tb_hflags handleraccel/tcg/cpu-exec.c accel/tcg/internal-common.h accel/tcg/tcg-accel-ops.c +2 more+21 -01 reply
39/42target/arm: Implement TCGCPUOps::rebuild_tb_hflags()target/arm/cpu.c target/arm/cpu.h target/arm/tcg/cpu-v7m.c +1 more+9 -00 replies
40/42accel/split: Call TCGCPUOps::rebuild_tb_hflags()accel/split/split-accel-ops.c+3 -01 reply
41/42tests/functional: Add split_available() helperpython/qemu/utils/__init__.py python/qemu/utils/accel.py tests/functional/qemu_test/testcase.py+15 -21 reply
42/42tests/functional: Test Aarch64 virt machine with split-acceleratortests/functional/meson.build tests/functional/test_aarch64_virt_split.py+70 -00 replies

Reviews trailers per patch

22 of 42 patches have a Reviewed-by or Acked-by.

PatchRichard Henderson
1/42R-b
2/42R-b
3/42R-b
4/42R-b
5/42
6/42R-b
7/42
8/42
9/42R-b
10/42
11/42R-b
12/42R-b
13/42R-b
14/42R-b
15/42R-b
16/42
17/42
18/42
19/42R-b
20/42
21/42
22/42
23/42R-b
24/42
25/42R-b
26/42R-b
27/42R-b
28/42
29/42
30/42R-b
31/42R-b
32/42R-b
33/42R-b
34/42R-b
35/42R-b
36/42
37/42
38/42
39/42
40/42
41/42
42/42

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

Read the v1 thread

Cover letter [RFC PATCH RESEND 00/42] accel/split/arm: Run EL2 using TCG and EL1/EL0 in hardware with HVF

Hi,

This RFC is a proof-of-concept we can have QEMU run both software emulator (TCG) and hardware accelerator (here HVF). Unfortunately I'm exhausted so I'll let Alex explain what this is about, otherwise I'll post the real cover letter next Monday after getting some rest.

Full work available in the split-accel-rfc-v5 tag:
https://gitlab.com/philmd/qemu/-/commits/split-accel-rfc-v5

Regards,

Phil.

Julian Armistead (1):
accel/split: Minimal stubs for split accelerator

Philippe Mathieu-Daudé (41):
accel/split: Define SplitAccelState
accel/split: Implement cpus_are_resettable() accel/split: Implement accel_init_machine() accel/split: Expose 'hw' and 'sw' properties accel/split: Empty setup_post()
accel/split: Implement supports_guest_debug() accel/split: Implement gdbstub_supported_sstep_flags() accel/split: Add cpu_thread_routine() stub
accel/split: Define and allocate AccelCPUState accel/split: Register MTTCG
accel/split: Have thread routine ready to dispatch over HW/SW accel/split: Implement cpu_reset_hold()
accel/split: Implement synchronize_post_init() accel/split: Implement synchronize_pre_resume() accel/split: Implement synchronize_state()
accel/split: Implement synchronize_post_reset() accel/split: Implement synchronize_pre_loadvm() accel/split: Implement kick_vcpu_thread()
accel/split: Implement cpu_common_realize() accel/split: Set use_hw in cpu_thread_routine() and switch over accel/split: Add few trace events in cpu_thread_routine handler target/arm: Implement SysemuCPUOps::can_accelerate() handler accel/split: Implement handle_interrupt()
accel/split: Empty ops_init()
accel/split: Empty set/get_virtual_clock()
accel/split: Empty get_elapsed_ticks()
accel/split: Empty cpu_thread_is_idle()
accel/split: Kludge qemu_tcg_mttcg_enabled() accel/split: Implement remove_all_breakpoints() accel/split: Implement remove_breakpoint()
accel/split: Implement insert_breakpoint()
accel/split: Implement update_guest_debug() accel/split: Implement get_[vcpu]_stats()
target/arm: Emulate EL2 under TCG
target/arm: Have ERET switch to hw accel for EL0/EL1 accel/hvf: Emulate HVC at EL2
accel/tcg: Introduce TCGCPUOps::rebuild_tb_hflags handler target/arm: Implement TCGCPUOps::rebuild_tb_hflags() accel/split: Call TCGCPUOps::rebuild_tb_hflags() tests/functional: Add split_available() helper tests/functional: Test Aarch64 virt machine with split-accelerator

 meson.build                                 |   1 +
 accel/split/split-accel.h                   |  54 +++
 accel/split/trace.h                         |   2 +
 accel/tcg/internal-common.h                 |   1 +
 include/accel/tcg/cpu-ops.h                 |   2 +
 include/exec/cpu-common.h                   |   1 +
 include/system/accel-ops.h                  |   8 +
 target/arm/cpu.h                            |   2 +
 accel/split/split-accel-ops.c               | 381 ++++++++++++++++++++
 accel/split/split-all.c                     | 196 ++++++++++
 accel/tcg/cpu-exec.c                        |   9 +
 accel/tcg/tcg-accel-ops.c                   |   1 +
 accel/tcg/tcg-all.c                         |   1 +
 system/vl.c                                 |   4 +
 target/arm/cpu.c                            |   9 +
 target/arm/cpu64.c                          |   7 +-
 target/arm/hvf/hvf.c                        |   6 +
 target/arm/tcg/cpu-v7m.c                    |   1 +
 target/arm/tcg/helper-a64.c                 |   9 +
 target/arm/tcg/hflags.c                     |   5 +
 accel/Kconfig                               |   6 +
 accel/meson.build                           |   1 +
 accel/split/meson.build                     |   9 +
 accel/split/trace-events                    |   9 +
 python/qemu/utils/__init__.py               |   3 +-
 python/qemu/utils/accel.py                  |  10 +
 tests/functional/meson.build                |   1 +
 tests/functional/qemu_test/testcase.py      |   4 +-
 tests/functional/test_aarch64_virt_split.py |  69 ++++
 29 files changed, 808 insertions(+), 4 deletions(-)
 create mode 100644 accel/split/split-accel.h
 create mode 100644 accel/split/trace.h
 create mode 100644 accel/split/split-accel-ops.c
 create mode 100644 accel/split/split-all.c
 create mode 100644 accel/split/meson.build
 create mode 100644 accel/split/trace-events
 create mode 100644 tests/functional/test_aarch64_virt_split.py
Signature · 1 line
2.49.0