diff --git a/include/system/memory.h b/include/system/memory.h index 3acaa30975..7ecad33130 100644 --- a/include/system/memory.h +++ b/include/system/memory.h @@ -2703,7 +2703,7 @@ void address_space_destroy_free(AddressSpace *as); * * @as: an initialized #AddressSpace */ -void address_space_remove_listeners(AddressSpace *as); +void address_space_remove_listeners(const AddressSpace *as); /** * address_space_rw: read from or write to an address space. diff --git a/system/memory.c b/system/memory.c index 93c714104b..8436668c18 100644 --- a/system/memory.c +++ b/system/memory.c @@ -3009,7 +3009,7 @@ void memory_global_dirty_log_stop(unsigned int flags) } static void listener_add_address_space(MemoryListener *listener, - AddressSpace *as) + const AddressSpace *as) { unsigned i; FlatView *view; @@ -3074,7 +3074,7 @@ static void listener_add_address_space(MemoryListener *listener, } static void listener_del_address_space(MemoryListener *listener, - AddressSpace *as) + const AddressSpace *as) { unsigned i; FlatView *view; @@ -3179,7 +3179,7 @@ void memory_listener_unregister(MemoryListener *listener) listener->address_space = NULL; } -void address_space_remove_listeners(AddressSpace *as) +void address_space_remove_listeners(const AddressSpace *as) { while (!QTAILQ_EMPTY(&as->listeners)) { memory_listener_unregister(QTAILQ_FIRST(&as->listeners)); diff --git a/system/physmem.c b/system/physmem.c index a0561177af..e8a2c438c7 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -3565,7 +3565,7 @@ address_space_unregister_map_client_do(AddressSpaceMapClient *client) g_free(client); } -static void address_space_notify_map_clients_locked(AddressSpace *as) +static void address_space_notify_map_clients_locked(const AddressSpace *as) { AddressSpaceMapClient *client;