CPUState structure is not modified, make it const. Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> --- include/hw/core/cpu.h | 2 +- system/physmem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 782c43ac8b3..04fede0e69a 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -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); diff --git a/system/physmem.c b/system/physmem.c index c76503aea82..0ac6acb9764 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -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; -- 2.47.1