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:
Paolo Bonzini 2018-02-13 09:07:25 -05:00 committed by Lioncash
parent b5c9645a0f
commit f578c89e8b
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
17 changed files with 17 additions and 19 deletions

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_aarch64
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_aarch64
#define token_get_value token_get_value_aarch64

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_aarch64eb
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_aarch64eb
#define token_get_value token_get_value_aarch64eb

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_arm
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_arm
#define token_get_value token_get_value_arm

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_armeb
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_armeb
#define token_get_value token_get_value_armeb

View file

@ -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
tested for self modifying code */
void tlb_unprotect_code_phys(CPUState *cpu, ram_addr_t ram_addr,
target_ulong vaddr)
void tlb_unprotect_code(CPUState *cpu, ram_addr_t ram_addr)
{
cpu_physical_memory_set_dirty_flag(cpu->uc, ram_addr, DIRTY_MEMORY_CODE);
}

View file

@ -3024,7 +3024,7 @@ symbols = (
'tlb_reset_dirty_range_all',
'tlb_set_dirty',
'tlb_set_dirty1',
'tlb_unprotect_code_phys',
'tlb_unprotect_code',
'tlb_vaddr_to_host',
'token_get_type',
'token_get_value',

View file

@ -22,8 +22,7 @@
#if !defined(CONFIG_USER_ONLY)
/* cputlb.c */
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,
target_ulong vaddr);
void tlb_unprotect_code(CPUState *cpu, ram_addr_t ram_addr);
void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry,
uintptr_t start, uintptr_t length);
void cpu_tlb_reset_dirty_all(struct uc_struct *uc, ram_addr_t start1, ram_addr_t length);

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_m68k
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_m68k
#define token_get_value token_get_value_m68k

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_mips
#define token_get_value token_get_value_mips

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips64
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_mips64
#define token_get_value token_get_value_mips64

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mips64el
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_mips64el
#define token_get_value token_get_value_mips64el

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_mipsel
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_mipsel
#define token_get_value token_get_value_mipsel

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_powerpc
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_powerpc
#define token_get_value token_get_value_powerpc

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_sparc
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_sparc
#define token_get_value token_get_value_sparc

View file

@ -3018,7 +3018,7 @@
#define tlb_reset_dirty_range_all tlb_reset_dirty_range_all_sparc64
#define tlb_set_dirty tlb_set_dirty_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 token_get_type token_get_type_sparc64
#define token_get_value token_get_value_sparc64

View file

@ -1252,7 +1252,7 @@ void tb_invalidate_phys_page_range(struct uc_struct *uc, tb_page_addr_t start, t
if (!p->first_tb) {
invalidate_page_bitmap(p);
if (is_cpu_write_access) {
tlb_unprotect_code_phys(cpu, start, cpu->mem_io_vaddr);
tlb_unprotect_code(cpu, start);
}
}
#endif

View file

@ -3018,7 +3018,7 @@
#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_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 token_get_type token_get_type_x86_64
#define token_get_value token_get_value_x86_64