Commit 5c1cfd3af5 for qemu.org
commit 5c1cfd3af5be31692a4a3532391597976f4d34ec
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Thu May 28 17:14:50 2026 +0100
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>
diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c
index 16f048c956..14eb4ed87f 100644
--- a/hw/core/cpu-system.c
+++ b/hw/core/cpu-system.c
@@ -63,15 +63,8 @@ bool cpu_translate_for_debug(CPUState *cpu, vaddr addr,
return cpu->cc->sysemu_ops->translate_for_debug(cpu, addr, result);
} else {
/* Fallbacks for CPUs which don't implement translate_for_debug */
- if (cpu->cc->sysemu_ops->get_phys_addr_attrs_debug) {
- result->physaddr =
- cpu->cc->sysemu_ops->get_phys_addr_attrs_debug(cpu, addr,
- &result->attrs);
- } else {
- result->physaddr
- = cpu->cc->sysemu_ops->get_phys_addr_debug(cpu, addr);
- result->attrs = MEMTXATTRS_UNSPECIFIED;
- }
+ result->physaddr = cpu->cc->sysemu_ops->get_phys_addr_debug(cpu, addr);
+ result->attrs = MEMTXATTRS_UNSPECIFIED;
if (result->physaddr == -1) {
return false;
}
diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h
index 441901fae8..8be6a84bd5 100644
--- a/include/hw/core/sysemu-cpu-ops.h
+++ b/include/hw/core/sysemu-cpu-ops.h
@@ -39,20 +39,6 @@ typedef struct SysemuCPUOps {
* for a complete target page or they use memory attributes).
*/
hwaddr (*get_phys_addr_debug)(CPUState *cpu, vaddr addr);
- /**
- * @get_phys_addr_attrs_debug: Callback for obtaining a physical address
- * and the associated memory transaction attributes to use for the
- * access.
- *
- * This must be able to handle a non-page-aligned address, and will
- * return the physical address corresponding to that address.
- *
- * CPUs should prefer to implement translate_for_debug instead of
- * this (and must do so if their translations are not always valid
- * for a complete target page).
- */
- hwaddr (*get_phys_addr_attrs_debug)(CPUState *cpu, vaddr addr,
- MemTxAttrs *attrs);
/**
* @translate_for_debug: Callback for translating a virtual address into
* a physical address for debug purposes.