[PATCH v2 0/5] hexagon: fix HVX scatter gather, BE host

Brian Cain posted 5 patches 22 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260820215117.1788954-1-brian.cain@oss.qualcomm.com
Maintainers: Brian Cain <brian.cain@oss.qualcomm.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
target/hexagon/gen_tcg_hvx.h            |  10 +-
target/hexagon/mmvec/macros.h           |  50 +++++----
target/hexagon/mmvec/mmvec.h            |  18 ++++
target/hexagon/cpu.c                    |  17 +--
target/hexagon/genptr.c                 |   3 +-
target/hexagon/mmvec/system_ext_mmvec.c |   2 +-
target/hexagon/op_helper.c              |  17 ++-
tests/tcg/hexagon/hvx_misc.c            |  45 ++++++++
tests/tcg/hexagon/scatter_gather.c      | 138 +++++++++++++++++++++++-
9 files changed, 261 insertions(+), 39 deletions(-)
[PATCH v2 0/5] hexagon: fix HVX scatter gather, BE host
Posted by Brian Cain 22 hours ago
Anton pointed out this endianness issue with HVX,
and found this region length issue along the way.

Fixed in v2:
* byte access helpers now all use hexagon_ prefix.
* Predicate bytes are extracted from 32-bit words rather than 64-bit words,
  matching the host-native predicate layout.
* Gather only reads memory for lanes that are both in range and predicate
  enabled.  So dropped lanes cannot fault or otherwise access memory.
* The gather region-length test now places an out-of-range offset on an
  inaccessible page, verifying that a dropped lane performs no read.

Added v2 commits:
* fix for histogram predicates - were using the wrong size
* test to cover predicate byte permutation

Brian Cain (5):
  target/hexagon: fix HVX big-endian byte access
  target/hexagon: fix HVX scatter/gather region-length check
  tests/tcg/hexagon: add vgather/vscatter region-length tests
  target/hexagon: fix HVX predicate save size for histogram ops
  tests/tcg/hexagon: check the two HVX predicate build paths agree

 target/hexagon/gen_tcg_hvx.h            |  10 +-
 target/hexagon/mmvec/macros.h           |  50 +++++----
 target/hexagon/mmvec/mmvec.h            |  18 ++++
 target/hexagon/cpu.c                    |  17 +--
 target/hexagon/genptr.c                 |   3 +-
 target/hexagon/mmvec/system_ext_mmvec.c |   2 +-
 target/hexagon/op_helper.c              |  17 ++-
 tests/tcg/hexagon/hvx_misc.c            |  45 ++++++++
 tests/tcg/hexagon/scatter_gather.c      | 138 +++++++++++++++++++++++-
 9 files changed, 261 insertions(+), 39 deletions(-)

-- 
2.34.1