qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] target/arm: Misc cleanups surrounding TBI
@ 2020-02-25  3:12 Richard Henderson
  2020-02-25  3:12 ` [PATCH 1/8] target/arm: Replicate TBI/TBID bits for single range regimes Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Richard Henderson @ 2020-02-25  3:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, qemu-arm

We have a bug at present wherein we do not supply the memory tag to
the memory system, so that on fault FAR_ELx does not contain the
correct value.

For system mode, we already handle ignoring TBI in get_phys_addr_lpae,
as long as we don't actually drop the tag during translation.
For user mode, we don't have that option, so for now we must simply
accept that we'll get the wrong value in the siginfo_t.

In the process of looking at all that I found:

  * Exception return was not applying TBI in copying ELR_ELx to PC,
    - Extracting the current mmu_idx can be improved,
    - Replicating the TBI bits can allow bit 55 to be used
      unconditionally, eliminating a test.

  * DC_ZVA was not handling TBI (now only for user-mode)
    - The helper need not have been in op_helper.c,
    - The helper could have better tcg markup.

  * TBI still applies when translation is disabled, and we weren't
    raising AddressSpace for bad physical addresses.

  * SVE hasn't been updated to handle TBI.  I have done nothing about
    this for now.  For the moment, system mode will work properly, while
    user-only will only work without tags.  I'll have to touch the same
    places to add MTE support, so it'll get done shortly.


r~


Richard Henderson (8):
  target/arm: Replicate TBI/TBID bits for single range regimes
  target/arm: Optimize cpu_mmu_index
  target/arm: Apply TBI to ESR_ELx in helper_exception_return
  target/arm: Move helper_dc_zva to helper-a64.c
  target/arm: Use DEF_HELPER_FLAGS for helper_dc_zva
  target/arm: Clean address for DC ZVA
  target/arm: Check addresses for disabled regimes
  target/arm: Disable clean_data_tbi for system mode

 target/arm/cpu.h           |  23 ++++----
 target/arm/helper-a64.h    |   1 +
 target/arm/helper.h        |   1 -
 target/arm/helper-a64.c    | 114 ++++++++++++++++++++++++++++++++++++-
 target/arm/helper.c        |  44 +++++++++++---
 target/arm/op_helper.c     |  93 ------------------------------
 target/arm/translate-a64.c |  13 ++++-
 7 files changed, 175 insertions(+), 114 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-03-02 16:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-25  3:12 [PATCH 0/8] target/arm: Misc cleanups surrounding TBI Richard Henderson
2020-02-25  3:12 ` [PATCH 1/8] target/arm: Replicate TBI/TBID bits for single range regimes Richard Henderson
2020-03-02 12:00   ` Peter Maydell
2020-02-25  3:14 ` [PATCH 2/8] target/arm: Optimize cpu_mmu_index Richard Henderson
2020-02-25  3:14   ` [PATCH 3/8] target/arm: Apply TBI to ESR_ELx in helper_exception_return Richard Henderson
2020-03-02 12:08     ` Peter Maydell
2020-02-25  3:14   ` [PATCH 4/8] target/arm: Move helper_dc_zva to helper-a64.c Richard Henderson
2020-03-02 12:08     ` Peter Maydell
2020-02-25  3:14   ` [PATCH 5/8] target/arm: Use DEF_HELPER_FLAGS for helper_dc_zva Richard Henderson
2020-03-02 12:10     ` Peter Maydell
2020-02-25  3:14   ` [PATCH 6/8] target/arm: Clean address for DC ZVA Richard Henderson
2020-02-25  3:14   ` [PATCH 7/8] target/arm: Check addresses for disabled regimes Richard Henderson
2020-02-25  3:14   ` [PATCH 8/8] target/arm: Disable clean_data_tbi for system mode Richard Henderson
2020-03-02 12:03   ` [PATCH 2/8] target/arm: Optimize cpu_mmu_index Peter Maydell
2020-03-02 16:24     ` Richard Henderson
2020-03-02 11:56 ` [PATCH 0/8] target/arm: Misc cleanups surrounding TBI Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).