mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-10 15:17:32 +00:00
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. Backports commit 9564f52da7eb061326956ed9a468935e3352512d from qemu
This commit is contained in:
parent
b5c9645a0f
commit
f578c89e8b
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_aarch64
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_aarch64
|
||||||
#define tlb_set_dirty tlb_set_dirty_aarch64
|
#define tlb_set_dirty tlb_set_dirty_aarch64
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_aarch64
|
#define tlb_set_dirty1 tlb_set_dirty1_aarch64
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_aarch64
|
#define tlb_unprotect_code tlb_unprotect_code_aarch64
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_aarch64
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_aarch64
|
||||||
#define token_get_type token_get_type_aarch64
|
#define token_get_type token_get_type_aarch64
|
||||||
#define token_get_value token_get_value_aarch64
|
#define token_get_value token_get_value_aarch64
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_aarch64eb
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_aarch64eb
|
||||||
#define tlb_set_dirty tlb_set_dirty_aarch64eb
|
#define tlb_set_dirty tlb_set_dirty_aarch64eb
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_aarch64eb
|
#define tlb_set_dirty1 tlb_set_dirty1_aarch64eb
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_aarch64eb
|
#define tlb_unprotect_code tlb_unprotect_code_aarch64eb
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_aarch64eb
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_aarch64eb
|
||||||
#define token_get_type token_get_type_aarch64eb
|
#define token_get_type token_get_type_aarch64eb
|
||||||
#define token_get_value token_get_value_aarch64eb
|
#define token_get_value token_get_value_aarch64eb
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_arm
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_arm
|
||||||
#define tlb_set_dirty tlb_set_dirty_arm
|
#define tlb_set_dirty tlb_set_dirty_arm
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_arm
|
#define tlb_set_dirty1 tlb_set_dirty1_arm
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_arm
|
#define tlb_unprotect_code tlb_unprotect_code_arm
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_arm
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_arm
|
||||||
#define token_get_type token_get_type_arm
|
#define token_get_type token_get_type_arm
|
||||||
#define token_get_value token_get_value_arm
|
#define token_get_value token_get_value_arm
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_armeb
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_armeb
|
||||||
#define tlb_set_dirty tlb_set_dirty_armeb
|
#define tlb_set_dirty tlb_set_dirty_armeb
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_armeb
|
#define tlb_set_dirty1 tlb_set_dirty1_armeb
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_armeb
|
#define tlb_unprotect_code tlb_unprotect_code_armeb
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_armeb
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_armeb
|
||||||
#define token_get_type token_get_type_armeb
|
#define token_get_type token_get_type_armeb
|
||||||
#define token_get_value token_get_value_armeb
|
#define token_get_value token_get_value_armeb
|
||||||
|
|
|
@ -130,8 +130,7 @@ void tlb_protect_code(struct uc_struct *uc, 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(CPUState *cpu, ram_addr_t ram_addr)
|
||||||
target_ulong vaddr)
|
|
||||||
{
|
{
|
||||||
cpu_physical_memory_set_dirty_flag(cpu->uc, ram_addr, DIRTY_MEMORY_CODE);
|
cpu_physical_memory_set_dirty_flag(cpu->uc, ram_addr, DIRTY_MEMORY_CODE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3024,7 +3024,7 @@ symbols = (
|
||||||
'tlb_reset_dirty_range_all',
|
'tlb_reset_dirty_range_all',
|
||||||
'tlb_set_dirty',
|
'tlb_set_dirty',
|
||||||
'tlb_set_dirty1',
|
'tlb_set_dirty1',
|
||||||
'tlb_unprotect_code_phys',
|
'tlb_unprotect_code',
|
||||||
'tlb_vaddr_to_host',
|
'tlb_vaddr_to_host',
|
||||||
'token_get_type',
|
'token_get_type',
|
||||||
'token_get_value',
|
'token_get_value',
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
#if !defined(CONFIG_USER_ONLY)
|
#if !defined(CONFIG_USER_ONLY)
|
||||||
/* cputlb.c */
|
/* cputlb.c */
|
||||||
void tlb_protect_code(struct uc_struct *uc, ram_addr_t ram_addr);
|
void tlb_protect_code(struct uc_struct *uc, ram_addr_t ram_addr);
|
||||||
void tlb_unprotect_code_phys(CPUState *cpu, ram_addr_t ram_addr,
|
void tlb_unprotect_code(CPUState *cpu, ram_addr_t ram_addr);
|
||||||
target_ulong vaddr);
|
|
||||||
void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry,
|
void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry,
|
||||||
uintptr_t start, uintptr_t length);
|
uintptr_t start, uintptr_t length);
|
||||||
void cpu_tlb_reset_dirty_all(struct uc_struct *uc, ram_addr_t start1, ram_addr_t length);
|
void cpu_tlb_reset_dirty_all(struct uc_struct *uc, ram_addr_t start1, ram_addr_t length);
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_m68k
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_m68k
|
||||||
#define tlb_set_dirty tlb_set_dirty_m68k
|
#define tlb_set_dirty tlb_set_dirty_m68k
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_m68k
|
#define tlb_set_dirty1 tlb_set_dirty1_m68k
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_m68k
|
#define tlb_unprotect_code tlb_unprotect_code_m68k
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_m68k
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_m68k
|
||||||
#define token_get_type token_get_type_m68k
|
#define token_get_type token_get_type_m68k
|
||||||
#define token_get_value token_get_value_m68k
|
#define token_get_value token_get_value_m68k
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips
|
||||||
#define tlb_set_dirty tlb_set_dirty_mips
|
#define tlb_set_dirty tlb_set_dirty_mips
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_mips
|
#define tlb_set_dirty1 tlb_set_dirty1_mips
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_mips
|
#define tlb_unprotect_code tlb_unprotect_code_mips
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_mips
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_mips
|
||||||
#define token_get_type token_get_type_mips
|
#define token_get_type token_get_type_mips
|
||||||
#define token_get_value token_get_value_mips
|
#define token_get_value token_get_value_mips
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips64
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips64
|
||||||
#define tlb_set_dirty tlb_set_dirty_mips64
|
#define tlb_set_dirty tlb_set_dirty_mips64
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_mips64
|
#define tlb_set_dirty1 tlb_set_dirty1_mips64
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_mips64
|
#define tlb_unprotect_code tlb_unprotect_code_mips64
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_mips64
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_mips64
|
||||||
#define token_get_type token_get_type_mips64
|
#define token_get_type token_get_type_mips64
|
||||||
#define token_get_value token_get_value_mips64
|
#define token_get_value token_get_value_mips64
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips64el
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips64el
|
||||||
#define tlb_set_dirty tlb_set_dirty_mips64el
|
#define tlb_set_dirty tlb_set_dirty_mips64el
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_mips64el
|
#define tlb_set_dirty1 tlb_set_dirty1_mips64el
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_mips64el
|
#define tlb_unprotect_code tlb_unprotect_code_mips64el
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_mips64el
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_mips64el
|
||||||
#define token_get_type token_get_type_mips64el
|
#define token_get_type token_get_type_mips64el
|
||||||
#define token_get_value token_get_value_mips64el
|
#define token_get_value token_get_value_mips64el
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mipsel
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mipsel
|
||||||
#define tlb_set_dirty tlb_set_dirty_mipsel
|
#define tlb_set_dirty tlb_set_dirty_mipsel
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_mipsel
|
#define tlb_set_dirty1 tlb_set_dirty1_mipsel
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_mipsel
|
#define tlb_unprotect_code tlb_unprotect_code_mipsel
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_mipsel
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_mipsel
|
||||||
#define token_get_type token_get_type_mipsel
|
#define token_get_type token_get_type_mipsel
|
||||||
#define token_get_value token_get_value_mipsel
|
#define token_get_value token_get_value_mipsel
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_powerpc
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_powerpc
|
||||||
#define tlb_set_dirty tlb_set_dirty_powerpc
|
#define tlb_set_dirty tlb_set_dirty_powerpc
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_powerpc
|
#define tlb_set_dirty1 tlb_set_dirty1_powerpc
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_powerpc
|
#define tlb_unprotect_code tlb_unprotect_code_powerpc
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_powerpc
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_powerpc
|
||||||
#define token_get_type token_get_type_powerpc
|
#define token_get_type token_get_type_powerpc
|
||||||
#define token_get_value token_get_value_powerpc
|
#define token_get_value token_get_value_powerpc
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_sparc
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_sparc
|
||||||
#define tlb_set_dirty tlb_set_dirty_sparc
|
#define tlb_set_dirty tlb_set_dirty_sparc
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_sparc
|
#define tlb_set_dirty1 tlb_set_dirty1_sparc
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_sparc
|
#define tlb_unprotect_code tlb_unprotect_code_sparc
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_sparc
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_sparc
|
||||||
#define token_get_type token_get_type_sparc
|
#define token_get_type token_get_type_sparc
|
||||||
#define token_get_value token_get_value_sparc
|
#define token_get_value token_get_value_sparc
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_sparc64
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_sparc64
|
||||||
#define tlb_set_dirty tlb_set_dirty_sparc64
|
#define tlb_set_dirty tlb_set_dirty_sparc64
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_sparc64
|
#define tlb_set_dirty1 tlb_set_dirty1_sparc64
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_sparc64
|
#define tlb_unprotect_code tlb_unprotect_code_sparc64
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_sparc64
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_sparc64
|
||||||
#define token_get_type token_get_type_sparc64
|
#define token_get_type token_get_type_sparc64
|
||||||
#define token_get_value token_get_value_sparc64
|
#define token_get_value token_get_value_sparc64
|
||||||
|
|
|
@ -1252,7 +1252,7 @@ void tb_invalidate_phys_page_range(struct uc_struct *uc, tb_page_addr_t start, t
|
||||||
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(cpu, start);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3018,7 +3018,7 @@
|
||||||
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_x86_64
|
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_x86_64
|
||||||
#define tlb_set_dirty tlb_set_dirty_x86_64
|
#define tlb_set_dirty tlb_set_dirty_x86_64
|
||||||
#define tlb_set_dirty1 tlb_set_dirty1_x86_64
|
#define tlb_set_dirty1 tlb_set_dirty1_x86_64
|
||||||
#define tlb_unprotect_code_phys tlb_unprotect_code_phys_x86_64
|
#define tlb_unprotect_code tlb_unprotect_code_x86_64
|
||||||
#define tlb_vaddr_to_host tlb_vaddr_to_host_x86_64
|
#define tlb_vaddr_to_host tlb_vaddr_to_host_x86_64
|
||||||
#define token_get_type token_get_type_x86_64
|
#define token_get_type token_get_type_x86_64
|
||||||
#define token_get_value token_get_value_x86_64
|
#define token_get_value token_get_value_x86_64
|
||||||
|
|
Loading…
Reference in a new issue