X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/d76bb73549fcac07524aea5135280ea533a94fd6..15408b428f5b4db56da555fbda4f1aaf40d77f4b:/translate-all.c diff --git a/translate-all.c b/translate-all.c index a98c646d92..40b8f3d2b5 100644 --- a/translate-all.c +++ b/translate-all.c @@ -35,9 +35,6 @@ #include "cpu.h" #include "disas/disas.h" #include "tcg.h" -#include "qemu/timer.h" -#include "exec/memory.h" -#include "exec/address-spaces.h" #if defined(CONFIG_USER_ONLY) #include "qemu.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -55,10 +52,13 @@ #include #endif #endif +#else +#include "exec/address-spaces.h" #endif #include "exec/cputlb.h" #include "translate-all.h" +#include "qemu/timer.h" //#define DEBUG_TB_INVALIDATE //#define DEBUG_FLUSH @@ -1354,15 +1354,15 @@ void tb_invalidate_phys_addr(hwaddr addr) { ram_addr_t ram_addr; MemoryRegionSection *section; + hwaddr l = 1; - section = phys_page_find(address_space_memory.dispatch, - addr >> TARGET_PAGE_BITS); + section = address_space_translate(&address_space_memory, addr, &addr, &l, false); if (!(memory_region_is_ram(section->mr) - || (section->mr->rom_device && section->mr->readable))) { + || memory_region_is_romd(section->mr))) { return; } ram_addr = (memory_region_get_ram_addr(section->mr) & TARGET_PAGE_MASK) - + memory_region_section_addr(section, addr); + + addr; tb_invalidate_phys_page_range(ram_addr, ram_addr + 1, 0); } #endif /* TARGET_HAS_ICE && !defined(CONFIG_USER_ONLY) */