提交 9564f52d 编写于 作者: P Paolo Bonzini

cputlb: remove useless arguments to tlb_unprotect_code_phys, rename

These days modification of the TLB is done in notdirty_mem_write,
so the virtual address and env pointer as unnecessary.

The new name of the function, tlb_unprotect_code, is consistent with
tlb_protect_code.
Reviewed-by: NFam Zheng <famz@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 35865339
...@@ -131,8 +131,7 @@ void tlb_protect_code(ram_addr_t ram_addr) ...@@ -131,8 +131,7 @@ void tlb_protect_code(ram_addr_t ram_addr)
/* update the TLB so that writes in physical page 'phys_addr' are no longer /* update the TLB so that writes in physical page 'phys_addr' are no longer
tested for self modifying code */ tested for self modifying code */
void tlb_unprotect_code_phys(CPUState *cpu, ram_addr_t ram_addr, void tlb_unprotect_code(ram_addr_t ram_addr)
target_ulong vaddr)
{ {
cpu_physical_memory_set_dirty_flag(ram_addr, DIRTY_MEMORY_CODE); cpu_physical_memory_set_dirty_flag(ram_addr, DIRTY_MEMORY_CODE);
} }
......
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
/* cputlb.c */ /* cputlb.c */
void tlb_protect_code(ram_addr_t ram_addr); void tlb_protect_code(ram_addr_t ram_addr);
void tlb_unprotect_code_phys(CPUState *cpu, ram_addr_t ram_addr, void tlb_unprotect_code(ram_addr_t ram_addr);
target_ulong vaddr);
void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry, uintptr_t start, void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry, uintptr_t start,
uintptr_t length); uintptr_t length);
void cpu_tlb_reset_dirty_all(ram_addr_t start1, ram_addr_t length); void cpu_tlb_reset_dirty_all(ram_addr_t start1, ram_addr_t length);
......
...@@ -1158,7 +1158,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, ...@@ -1158,7 +1158,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
if (!p->first_tb) { if (!p->first_tb) {
invalidate_page_bitmap(p); invalidate_page_bitmap(p);
if (is_cpu_write_access) { if (is_cpu_write_access) {
tlb_unprotect_code_phys(cpu, start, cpu->mem_io_vaddr); tlb_unprotect_code(start);
} }
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册