Commit 588db67422 for qemu.org
commit 588db67422887db53aad78b3f8e316efbf6cd70e
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Thu Apr 30 10:38:10 2026 +0100
Remove cpu_get_phys_addr_debug() and cpu_get_phys_addr_attrs_debug()
All the callers of cpu_get_phys_addr_debug() and
cpu_get_phys_addr_attrs_debug() have now been updated to use
cpu_translate_for_debug(), so we can remove them.
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: <20260430093810.2762539-26-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 954b81931d..16f048c956 100644
--- a/hw/core/cpu-system.c
+++ b/hw/core/cpu-system.c
@@ -87,26 +87,6 @@ bool cpu_translate_for_debug(CPUState *cpu, vaddr addr,
}
}
-hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr,
- MemTxAttrs *attrs)
-{
- TranslateForDebugResult result;
-
- if (!cpu_translate_for_debug(cpu, addr, &result)) {
- return -1;
- }
-
- *attrs = result.attrs;
- return result.physaddr;
-}
-
-hwaddr cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr)
-{
- MemTxAttrs attrs = {};
-
- return cpu_get_phys_addr_attrs_debug(cpu, addr, &attrs);
-}
-
int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
{
int ret = 0;
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index a7256aeb9d..59d601465b 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -738,40 +738,6 @@ enum CPUDumpFlags {
*/
void cpu_dump_state(CPUState *cpu, FILE *f, int flags);
-/**
- * cpu_get_phys_addr_attrs_debug:
- * @cpu: The CPU to use for the virtual-to-physical translation
- * @addr: The virtual address.
- * @attrs: Updated on return with the memory transaction attributes to use
- * for this access.
- *
- * Obtains the physical address corresponding to a virtual one, together
- * with the corresponding memory transaction attributes to use for the access.
- * Use it only for debugging because no protection checks are done.
- *
- * The address need not be page-aligned; the returned address will
- * be the physical address corresponding to that virtual address.
- *
- * Returns: Corresponding physical page address or -1 if no page found.
- */
-hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr,
- MemTxAttrs *attrs);
-
-/**
- * cpu_get_phys_addr_debug:
- * @cpu: The CPU to use for the virtual-to-physical translation
- * @addr: The virtual address.
- *
- * Obtains the physical address corresponding to a virtual one.
- * Use it only for debugging because no protection checks are done.
- *
- * The address need not be page-aligned; the returned address will
- * be the physical address corresponding to that virtual address.
- *
- * Returns: Corresponding physical address, or -1 if no page found.
- */
-hwaddr cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);
-
/**
* TranslateForDebugResult: gives result of cpu_translate_for_debug()
*