hw/core: Remove SysemuCPUOps::get_phys_addr_attrs_debug
No targets use the SysemuCPUOps::get_phys_addr_attrs_debug method any more, so we can remove it, together with the handling of it in cpu_translate_for_debug(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20260528161450.3564396-4-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Peter Maydell committed
May 28, 2026 at 17:14 UTC
5c1cfd3af5be31692a4a3532391597976f4d34ec
2 files changed
+2
-23
hw/core/cpu-system.c
+2
-9
@@ -63,15 +63,8 @@ bool cpu_translate_for_debug(CPUState *cpu, vaddr addr,
63
return cpu->cc->sysemu_ops->translate_for_debug(cpu, addr, result);
64
} else {
65
/* Fallbacks for CPUs which don't implement translate_for_debug */
66
- if (cpu->cc->sysemu_ops->get_phys_addr_attrs_debug) {
67
- result->physaddr =
68
- cpu->cc->sysemu_ops->get_phys_addr_attrs_debug(cpu, addr,
69
- &result->attrs);
70
- } else {
71
- result->physaddr
72
- = cpu->cc->sysemu_ops->get_phys_addr_debug(cpu, addr);
73
- result->attrs = MEMTXATTRS_UNSPECIFIED;
74
- }
66
+ result->physaddr = cpu->cc->sysemu_ops->get_phys_addr_debug(cpu, addr);
67
+ result->attrs = MEMTXATTRS_UNSPECIFIED;
68
if (result->physaddr == -1) {
69
return false;
70
}
include/hw/core/sysemu-cpu-ops.h
-14
@@ -39,20 +39,6 @@ typedef struct SysemuCPUOps {
39
* for a complete target page or they use memory attributes).
40
*/
41
hwaddr (*get_phys_addr_debug)(CPUState *cpu, vaddr addr);
42
- /**
43
- * @get_phys_addr_attrs_debug: Callback for obtaining a physical address
44
- * and the associated memory transaction attributes to use for the
45
- * access.
46
- *
47
- * This must be able to handle a non-page-aligned address, and will
48
- * return the physical address corresponding to that address.
49
- *
50
- * CPUs should prefer to implement translate_for_debug instead of
51
- * this (and must do so if their translations are not always valid
52
- * for a complete target page).
53
- */
54
- hwaddr (*get_phys_addr_attrs_debug)(CPUState *cpu, vaddr addr,
55
- MemTxAttrs *attrs);
42
/**
43
* @translate_for_debug: Callback for translating a virtual address into
44
* a physical address for debug purposes.