Skip to content

hexagon: Add HVX context

Brian Cain qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest7 patches 3 repliesIn review
  2. v56 patches 4 repliesSuperseded
  3. v46 patches 1 replySuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v36 patches1 replySuperseded
v26 patches4 repliesSuperseded
v19 patches13 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7tcg: split out _var forms of gvec logical, abs and min/max opsinclude/tcg/tcg-op-gvec-common.h tcg/tcg-op-gvec.c+189 -400 replies
2/7tcg: add base arguments to the gvec 2s, dup_i32 and cmp expandersinclude/tcg/tcg-op-gvec-common.h tcg/tcg-op-gvec.c+192 -850 replies
3/7tcg: split out _var forms of gvec saturating/mul/shift-immediate opsinclude/tcg/tcg-op-gvec-common.h tcg/tcg-op-gvec.c+160 -480 replies
4/7target/hexagon: raise an exception for HVX with SSR:XE cleartarget/hexagon/cpu.c target/hexagon/cpu.h target/hexagon/translate.c +1 more+16 -00 replies
5/7target/hexagon: prepare for separate HVX contextstarget/hexagon/cpu.c target/hexagon/cpu.h target/hexagon/gdbstub.c +8 more+597 -4461 reply
6/7target/hexagon: share HVX contexts among CPUshw/hexagon/hex-subsys.c hw/hexagon/hexagon_hvx_context.c hw/hexagon/meson.build +9 more+294 -72 replies
7/7tests/functional/hexagon: add HVX teststests/functional/hexagon/test_arch_tests.py tests/functional/hexagon/test_systests.py+13 -00 replies

Reviews trailers per patch

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

PatchMarco LiebelRichard HendersonPierrick BouvierPhilippe Mathieu-Daudé
1/7R-b R-b
2/7R-b R-b
3/7R-b R-b
4/7R-b
5/7R-b R-b
6/7R-b
7/7R-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 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/7] hexagon: Add HVX context

Add HVX contexts to Hexagon translation, necessary for system emulation. Change the HVX instruction translation to access the context via a base pointer.

Modeling the HVX context mapping while avoiding the need to copy the context when the OS scheduler decides to remap them required some general TCG gvec changes to enable some more _var forms.

In v6:
- added a nop "prepare for separate HVX contexts" to introduce hex_hvx(), (preserving Richard's R-b across this and "share HVX contexts among CPUs").

In v5:
- added a GUEST_ERROR when SSR:XA value is out-of-range for ext_contexts.

In v4:
- moved the linux-user hvx_ctx from ArchCPU to CPUArchState, eliminating linux-user/main.c change.

In v3:
- fixed HVX context alignment declarations
- created hex_hvx_ptr global for sysemu, abstraction hex_hvx() to refer to the context.
- added some test cases (reset Marco's R-b)

In v2:
- Removed unused default hvx context from target/hexagon/cpu.[ch], add a hexagon_hvx_select_context() to the reset instead.
- combined the HVX pointer, QOM context, and SSR:XA selection work commits into share HVX contexts among CPUs.

v5: https://lore.kernel.org/qemu-devel/[email protected]/
v4: https://lore.kernel.org/qemu-devel/[email protected]/
v3: https://lore.kernel.org/qemu-devel/[email protected]/
v2: https://lore.kernel.org/qemu-devel/[email protected]/
v1: https://lore.kernel.org/qemu-devel/[email protected]/

Brian Cain (7):
tcg: split out _var forms of gvec logical, abs and min/max ops
tcg: add base arguments to the gvec 2s, dup_i32 and cmp expanders
tcg: split out _var forms of gvec saturating/mul/shift-immediate ops target/hexagon: raise an exception for HVX with SSR:XE clear target/hexagon: prepare for separate HVX contexts target/hexagon: share HVX contexts among CPUs tests/functional/hexagon: add HVX tests

 include/hw/hexagon/hexagon.h                |   1 +
 include/hw/hexagon/hexagon_hvx_context.h    |  27 +
 include/tcg/tcg-op-gvec-common.h            |  97 +++
 target/hexagon/cpu.h                        |  26 +-
 target/hexagon/cpu_helper.h                 |   1 +
 target/hexagon/gen_tcg_hvx.h                | 608 ++++++++++---------
 target/hexagon/genptr.h                     |   8 +
 target/hexagon/mmvec/macros.h               |  14 +-
 target/hexagon/translate.h                  |  13 +-
 hw/hexagon/hex-subsys.c                     |  36 ++
 hw/hexagon/hexagon_hvx_context.c            |  84 +++
 target/hexagon/cpu.c                        |  32 +-
 target/hexagon/cpu_helper.c                 |  82 +++
 target/hexagon/gdbstub.c                    |  16 +-
 target/hexagon/genptr.c                     | 102 ++--
 target/hexagon/machine.c                    |  12 +
 target/hexagon/op_helper.c                  |  37 +-
 target/hexagon/translate.c                  |  71 ++-
 tcg/tcg-op-gvec.c                           | 617 ++++++++++++++------
 hw/hexagon/meson.build                      |   1 +
 target/hexagon/hex_common.py                | 179 +++---
 tests/functional/hexagon/test_arch_tests.py |   7 +
 tests/functional/hexagon/test_systests.py   |   6 +
 23 files changed, 1456 insertions(+), 621 deletions(-)
 create mode 100644 include/hw/hexagon/hexagon_hvx_context.h
 create mode 100644 hw/hexagon/hexagon_hvx_context.c
Signature · 1 line
2.34.1