@@ -1761,6 +1761,7 @@ static void release_dispatch_map(AllocInfo *info)
*/
static void core_commit(MemoryListener *listener)
{
+ CPUArchState *env;
AllocInfo *info = cur_alloc_info;
info->map = cur_map_nodes;
info->sections = cur_phys_sections;
@@ -1772,20 +1773,15 @@ static void core_commit(MemoryListener *listener)
cur_phys_sections = next_phys_sections;
cur_alloc_info = next_alloc_info;
- /* Fix me, will changed to call_rcu */
- release_dispatch_map(info);
-}
-
-static void tcg_commit(MemoryListener *listener)
-{
- CPUArchState *env;
-
/* since each CPU stores ram addresses in its TLB cache, we must
reset the modified entries */
/* XXX: slow ! */
- for(env = first_cpu; env != NULL; env = env->next_cpu) {
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
tlb_flush(env, 1);
}
+
+ /* Fix me, will changed to call_rcu */
+ release_dispatch_map(info);
}
static void core_log_global_start(MemoryListener *listener)
@@ -1830,10 +1826,6 @@ static MemoryListener io_memory_listener = {
.priority = 0,
};
-static MemoryListener tcg_memory_listener = {
- .commit = tcg_commit,
-};
-
void address_space_init_dispatch(AddressSpace *as)
{
AddressSpaceDispatch *d = g_new(AddressSpaceDispatch, 1);
@@ -1870,7 +1862,6 @@ static void memory_map_init(void)
memory_listener_register(&core_memory_listener, &address_space_memory);
memory_listener_register(&io_memory_listener, &address_space_io);
- memory_listener_register(&tcg_memory_listener, &address_space_memory);
}
MemoryRegion *get_system_memory(void)