From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMT-0002YP-J2 for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0tMS-0008EZ-MA for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMS-0008ET-As for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:44 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 1375B3798BD for ; Fri, 5 Jun 2015 15:16:44 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-29.ams2.redhat.com [10.36.112.29]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t55FG4kY012808 for ; Fri, 5 Jun 2015 11:16:42 -0400 From: Paolo Bonzini Date: Fri, 5 Jun 2015 17:15:23 +0200 Message-Id: <1433517363-32335-23-git-send-email-pbonzini@redhat.com> In-Reply-To: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> References: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 22/62] cputlb: remove useless arguments to tlb_unprotect_code_phys, rename List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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: Fam Zheng Signed-off-by: Paolo Bonzini --- cputlb.c | 3 +-- include/exec/cputlb.h | 3 +-- translate-all.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cputlb.c b/cputlb.c index 7606548..dd1203b 100644 --- a/cputlb.c +++ b/cputlb.c @@ -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 tested for self modifying code */ -void tlb_unprotect_code_phys(CPUState *cpu, ram_addr_t ram_addr, - target_ulong vaddr) +void tlb_unprotect_code(ram_addr_t ram_addr) { cpu_physical_memory_set_dirty_flag(ram_addr, DIRTY_MEMORY_CODE); } diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h index e0da9d7..360815e 100644 --- a/include/exec/cputlb.h +++ b/include/exec/cputlb.h @@ -22,8 +22,7 @@ #if !defined(CONFIG_USER_ONLY) /* cputlb.c */ void tlb_protect_code(ram_addr_t ram_addr); -void tlb_unprotect_code_phys(CPUState *cpu, ram_addr_t ram_addr, - target_ulong vaddr); +void tlb_unprotect_code(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(ram_addr_t start1, ram_addr_t length); diff --git a/translate-all.c b/translate-all.c index d118c6c..0e2ad8a 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1158,7 +1158,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, 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(start); } } #endif -- 2.4.1