From patchwork Tue May 26 16:54:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 476661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 904901400B7 for ; Wed, 27 May 2015 03:04:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=DOKsnEKw; dkim-atps=neutral Received: from localhost ([::1]:49314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxIGk-0002xj-Fs for incoming@patchwork.ozlabs.org; Tue, 26 May 2015 13:03:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxI9E-00055I-Hq for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxI9D-0004qM-53 for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:12 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:38010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxI9C-0004oq-KZ for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:10 -0400 Received: by wichy4 with SMTP id hy4so89309521wic.1 for ; Tue, 26 May 2015 09:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=Gyy6d77WAgIKpzTb2yZyNNLqfpXzfQvp1mGJ40LZIYg=; b=DOKsnEKw2+ONhbCA7B7JLigeg3uSXSSXwzH2RccyL5voWej8UbA/H88rqcU1GZdLnA Ce+2wCl1QGV1LDHZFHupDn1JRiHFINBtL0IRpiCUhWy00K4QHYbXuKeXgstmDsok49Pt PWWoRtLhlQQkFU9QeN6FncfrE4UDC4hSrunOHcZr2v2RtmnI7tG6SB1OaYFZmszOhiDv HuVfFHeZHScZXZiHsS6OsmJBYQuvvcgpjhPzeZmYsMewsRYB2ciofup/M6AZs14JdFsT RYzKNceql9+niJyagga3wIqMt6AhmQ8Aee+urtka9XP8xAbfaxJ3hN6G+MMdy3ak5CCk iP4A== X-Received: by 10.194.81.234 with SMTP id d10mr51660136wjy.84.1432659354831; Tue, 26 May 2015 09:55:54 -0700 (PDT) Received: from 640k.localdomain (dynamic-adsl-94-39-199-114.clienti.tiscali.it. [94.39.199.114]) by mx.google.com with ESMTPSA id x3sm17749309wiy.20.2015.05.26.09.55.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 09:55:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 26 May 2015 18:54:52 +0200 Message-Id: <1432659305-54578-17-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1432659305-54578-1-git-send-email-pbonzini@redhat.com> References: <1432659305-54578-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::235 Subject: [Qemu-devel] [PATCH v3 16/29] translate-all: remove unnecessary argument to tb_invalidate_phys_range X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The is_cpu_write_access argument is always 0, remove it. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- exec.c | 2 +- linux-user/mmap.c | 6 +++--- translate-all.c | 5 ++--- translate-all.h | 3 +-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/exec.c b/exec.c index 9486347..0a0b89e 100644 --- a/exec.c +++ b/exec.c @@ -2260,7 +2260,7 @@ static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr, if (cpu_physical_memory_range_includes_clean(addr, length)) { uint8_t dirty_log_mask = memory_region_get_dirty_log_mask(mr); if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) { - tb_invalidate_phys_range(addr, addr + length, 0); + tb_invalidate_phys_range(addr, addr + length); dirty_log_mask &= ~(1 << DIRTY_MEMORY_CODE); } if (dirty_log_mask) { diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 959ff4d..78e1b2d 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -575,7 +575,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, page_dump(stdout); printf("\n"); #endif - tb_invalidate_phys_range(start, start + len, 0); + tb_invalidate_phys_range(start, start + len); mmap_unlock(); return start; fail: @@ -680,7 +680,7 @@ int target_munmap(abi_ulong start, abi_ulong len) if (ret == 0) { page_set_flags(start, start + len, 0); - tb_invalidate_phys_range(start, start + len, 0); + tb_invalidate_phys_range(start, start + len); } mmap_unlock(); return ret; @@ -759,7 +759,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, page_set_flags(old_addr, old_addr + old_size, 0); page_set_flags(new_addr, new_addr + new_size, prot | PAGE_VALID); } - tb_invalidate_phys_range(new_addr, new_addr + new_size, 0); + tb_invalidate_phys_range(new_addr, new_addr + new_size); mmap_unlock(); return new_addr; } diff --git a/translate-all.c b/translate-all.c index 536008f..d118c6c 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1042,11 +1042,10 @@ TranslationBlock *tb_gen_code(CPUState *cpu, * access: the virtual CPU will exit the current TB if code is modified inside * this TB. */ -void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, - int is_cpu_write_access) +void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end) { while (start < end) { - tb_invalidate_phys_page_range(start, end, is_cpu_write_access); + tb_invalidate_phys_page_range(start, end, 0); start &= TARGET_PAGE_MASK; start += TARGET_PAGE_SIZE; } diff --git a/translate-all.h b/translate-all.h index 9d115a6..ef9166c 100644 --- a/translate-all.h +++ b/translate-all.h @@ -23,8 +23,7 @@ void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len); void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, int is_cpu_write_access); -void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, - int is_cpu_write_access); +void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end); void cpu_unlink_tb(CPUState *cpu); void tb_check_watchpoint(CPUState *cpu);