[PATCH v4 00/10] target/arm: Fix insn exception priorities

Richard Henderson posted 10 patches 2 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211103040352.373688-1-richard.henderson@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Laurent Vivier <laurent@vivier.eu>
target/arm/helper.h               |  1 +
target/arm/syndrome.h             |  5 +++
linux-user/aarch64/cpu_loop.c     | 46 ++++++++++++----------
target/arm/debug_helper.c         | 23 +++++++++++
target/arm/gdbstub.c              |  9 ++++-
target/arm/machine.c              | 10 +++++
target/arm/tlb_helper.c           | 63 ++++++++++++++++++++++---------
target/arm/translate-a64.c        | 23 +++++++++--
target/arm/translate.c            | 58 ++++++++++++++++++++--------
tests/tcg/aarch64/pcalign-a64.c   | 37 ++++++++++++++++++
tests/tcg/arm/pcalign-a32.c       | 46 ++++++++++++++++++++++
tests/tcg/aarch64/Makefile.target |  4 +-
tests/tcg/arm/Makefile.target     |  4 ++
13 files changed, 271 insertions(+), 58 deletions(-)
create mode 100644 tests/tcg/aarch64/pcalign-a64.c
create mode 100644 tests/tcg/arm/pcalign-a32.c
[PATCH v4 00/10] target/arm: Fix insn exception priorities
Posted by Richard Henderson 2 years, 5 months ago
Raise pc alignment faults.
Fix single-step and pc-align priority over breakpoints.
Not yet fixing insn abort priority over breakpoints.


r~


Changes for v4:
  * Rebase on master.
  * Split some cleanups into new patches.
  * No special cases in helper_exception_pc_alignment.

Changes for v3:
  * Rebase on siginfo_t patch set -- while probably only
    force_sig_fault is required, I suspect minor conflicts
    with the other cleanups.
  * Typo fix.

Changes for v2:
  * Handle the exceptions in cpu_loop.
  * Fix how the instruction is raised for aa32 el1.
  * Add pc alignment test cases.

Richard Henderson (10):
  target/arm: Hoist pc_next to a local variable in
    aarch64_tr_translate_insn
  target/arm: Hoist pc_next to a local variable in arm_tr_translate_insn
  target/arm: Hoist pc_next to a local variable in
    thumb_tr_translate_insn
  target/arm: Split arm_pre_translate_insn
  target/arm: Advance pc for arch single-step exception
  target/arm: Split compute_fsr_fsc out of arm_deliver_fault
  target/arm: Take an exception if PC is misaligned
  target/arm: Assert thumb pc is aligned
  target/arm: Suppress bp for exceptions with more priority
  tests/tcg: Add arm and aarch64 pc alignment tests

 target/arm/helper.h               |  1 +
 target/arm/syndrome.h             |  5 +++
 linux-user/aarch64/cpu_loop.c     | 46 ++++++++++++----------
 target/arm/debug_helper.c         | 23 +++++++++++
 target/arm/gdbstub.c              |  9 ++++-
 target/arm/machine.c              | 10 +++++
 target/arm/tlb_helper.c           | 63 ++++++++++++++++++++++---------
 target/arm/translate-a64.c        | 23 +++++++++--
 target/arm/translate.c            | 58 ++++++++++++++++++++--------
 tests/tcg/aarch64/pcalign-a64.c   | 37 ++++++++++++++++++
 tests/tcg/arm/pcalign-a32.c       | 46 ++++++++++++++++++++++
 tests/tcg/aarch64/Makefile.target |  4 +-
 tests/tcg/arm/Makefile.target     |  4 ++
 13 files changed, 271 insertions(+), 58 deletions(-)
 create mode 100644 tests/tcg/aarch64/pcalign-a64.c
 create mode 100644 tests/tcg/arm/pcalign-a32.c

-- 
2.25.1


Re: [PATCH v4 00/10] target/arm: Fix insn exception priorities
Posted by Peter Maydell 2 years, 5 months ago
On Wed, 3 Nov 2021 at 04:04, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Raise pc alignment faults.
> Fix single-step and pc-align priority over breakpoints.
> Not yet fixing insn abort priority over breakpoints.

Do you have a view on whether we should put this into 6.2
or hold it for 7.0 ?

-- PMM

Re: [PATCH v4 00/10] target/arm: Fix insn exception priorities
Posted by Richard Henderson 2 years, 5 months ago
On 11/8/21 3:16 PM, Peter Maydell wrote:
> On Wed, 3 Nov 2021 at 04:04, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> Raise pc alignment faults.
>> Fix single-step and pc-align priority over breakpoints.
>> Not yet fixing insn abort priority over breakpoints.
> 
> Do you have a view on whether we should put this into 6.2
> or hold it for 7.0 ?

I think it's safe enough to go in.
But it's something that has been broken since forever, so it could also wait.


r~