tb_invalidate_phys_range() can be used instead. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> --- include/exec/translate-all.h | 1 - accel/tcg/translate-all.c | 25 ------------------------- cpu.c | 4 ++-- 3 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h index a557b4e2bb9e..f313542cdae1 100644 --- a/include/exec/translate-all.h +++ b/include/exec/translate-all.h @@ -29,7 +29,6 @@ void page_collection_unlock(struct page_collection *set); void tb_invalidate_phys_page_fast(struct page_collection *pages, tb_page_addr_t start, int len, uintptr_t retaddr); -void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end); void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr); #ifdef CONFIG_USER_ONLY diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 57bb921bd3ba..3a3a60575141 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1768,31 +1768,6 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages, #endif } -/* - * Invalidate all TBs which intersect with the target physical address range - * [start;end[. NOTE: start and end must refer to the *same* physical page. - * 'is_cpu_write_access' should be true if called from a real cpu write - * access: the virtual CPU will exit the current TB if code is modified inside - * this TB. - * - * Called with mmap_lock held for user-mode emulation - */ -void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end) -{ - struct page_collection *pages; - PageDesc *p; - - assert_memory_lock(); - - p = page_find(start >> TARGET_PAGE_BITS); - if (p == NULL) { - return; - } - pages = page_collection_lock(start, end); - tb_invalidate_phys_page_range__locked(pages, p, start, end, 0); - page_collection_unlock(pages); -} - /* * Invalidate all TBs which intersect with the target physical address range * [start;end[. NOTE: start and end may refer to *different* physical pages. diff --git a/cpu.c b/cpu.c index e8baec294b06..b8ac817cb3fd 100644 --- a/cpu.c +++ b/cpu.c @@ -222,7 +222,7 @@ const char *parse_cpu_option(const char *cpu_option) void tb_invalidate_phys_addr(tb_page_addr_t addr) { mmap_lock(); - tb_invalidate_phys_page_range(addr, addr + 1); + tb_invalidate_phys_range(addr, addr + 1); mmap_unlock(); } #else @@ -243,7 +243,7 @@ void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs) return; } ram_addr = memory_region_get_ram_addr(mr) + addr; - tb_invalidate_phys_page_range(ram_addr, ram_addr + 1); + tb_invalidate_phys_range(ram_addr, ram_addr + 1); } #endif -- 2.31.1