On 12/25/25 02:13, Philippe Mathieu-Daudé wrote:
Commit 500131154d6 ("exec.c: Add new address_space_ld*/st* functions") added a new API to fix a shortcoming of the ld/st*_phys() API, which does blind bus access, not reporting failure (and it also allow to provide transaction attributes).Later commit 42874d3a8c6 ("Switch non-CPU callers from ld/st*_phys to address_space_ld/st*") automatically converted the legacy uses to the new API, not precising transaction attributes (MEMTXATTRS_UNSPECIFIED) and ignoring the transation result (passing NULL pointer as MemTxResult). While this is a faithful replacement, without any logical change, we later realized better is to not use MEMTXATTRS_UNSPECIFIED or NULL MemTxResult, and adapt each call site on a pair basis, looking at the device model datasheet to do the correct behavior (which is unlikely to ignore transaction failures). Since this is quite some work, we defer that to device model maintainers. Meanwhile we introduce a definition, to allow a target which removed all legacy API call to prohibit further legacy API uses, named "TARGET_NOT_USING_LEGACY_LDST_PHYS_API". Since all targets should be able to check this definition, we take care to not poison it. Suggested-by: Pierrick Bouvier<[email protected]> Signed-off-by: Philippe Mathieu-Daudé<[email protected]> --- include/system/memory.h | 2 ++ scripts/make-config-poison.sh | 1 + 2 files changed, 3 insertions(+)
Reviewed-by: Richard Henderson <[email protected]> r~
