@@ -1155,7 +1155,7 @@ void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
* Return the requested address space of this CPU. @asidx
* specifies which address space to read.
*/
-AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);
+AddressSpace *cpu_get_address_space(const CPUState *cpu, int asidx);
G_NORETURN void cpu_abort(CPUState *cpu, const char *fmt, ...)
G_GNUC_PRINTF(2, 3);
@@ -805,7 +805,7 @@ void cpu_address_space_destroy(CPUState *cpu, int asidx)
}
}
-AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx)
+AddressSpace *cpu_get_address_space(const CPUState *cpu, int asidx)
{
/* Return the AddressSpace corresponding to the specified index */
return cpu->cpu_ases[asidx].as;
CPUState structure is not modified, make it const. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/core/cpu.h | 2 +- system/physmem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)