Earlier this year I did some work on the API that target CPUs use to
provide "translate this virtual address to physical for a debug
access". We now have a new method, translate_for_debug, but still
support the old get_phys_addr_debug method as well.
This series does a bit of cleanup by converting five target
architectures from the legacy method to the new one. Conversion
is straightforward.
I have opted to follow the riscv translate_for_debug implementation in
having the returned attrs set .debug and not also .unspecified (via
MEMTXATTRS_UNSPECIFIED or otherwise), since on a per-architecture
basis we can see that we don't want to set any of the other attributes
in MemTxAttrs. This is a minor behaviour change from using the
fallback codepath in cpu_translate_for_debug(), which starts with
MEMTXATTRS_UNSPECIFIED and adds .debug, since it can't know whether
the target architecture makes use of the various attribute fields.
The only thing that we use the .unspecified field for is that the
IOMMUs check it to see if they can look at attrs.requester_id etc, and
debug accesses aren't going to be going through an IOMMU anyway, so
this isn't a behaviour change in practice.
(There are another 10 archs still to convert, but I figured I'd just
start with these five and see if there were review comments before
doing the rest of them.)
thanks
--PMM
Peter Maydell (5):
target/alpha: Convert to translate_for_debug
target/avr: Convert to translate_for_debug
target/or1k: Convert to translate_for_debug
target/rx: Convert to translate_for_debug
target/tricore: Convert to translate_for_debug
target/alpha/cpu.h | 3 ++-
target/avr/cpu.h | 3 ++-
target/or1k/cpu.h | 3 ++-
target/rx/cpu.h | 3 ++-
target/tricore/cpu.h | 3 ++-
target/alpha/cpu.c | 2 +-
target/alpha/helper.c | 15 +++++++++++++--
target/avr/cpu.c | 2 +-
target/avr/helper.c | 11 +++++++++--
target/or1k/cpu.c | 2 +-
target/or1k/mmu.c | 21 ++++++++++++++++-----
target/rx/cpu.c | 2 +-
target/rx/helper.c | 10 ++++++++--
target/tricore/cpu.c | 2 +-
target/tricore/helper.c | 13 ++++++++++---
15 files changed, 71 insertions(+), 24 deletions(-)
--
2.43.0