From patchwork Thu May 24 02:41:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 161055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A7F10B6FC4 for ; Thu, 24 May 2012 12:42:10 +1000 (EST) Received: from localhost ([::1]:53367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXO08-0007ae-Ip for incoming@patchwork.ozlabs.org; Wed, 23 May 2012 22:42:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXO01-0007Zg-1F for qemu-devel@nongnu.org; Wed, 23 May 2012 22:42:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXNzz-0003h6-4O for qemu-devel@nongnu.org; Wed, 23 May 2012 22:42:00 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:42057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXNzy-0003g3-O7; Wed, 23 May 2012 22:41:58 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate01.web.de (Postfix) with ESMTP id 95B601AE9A2D8; Thu, 24 May 2012 04:41:56 +0200 (CEST) Received: from mchn199C.mchp.siemens.de ([187.105.9.40]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0Lbrk4-1RoBHD31Vs-00jIXa; Thu, 24 May 2012 04:41:56 +0200 Message-ID: <4FBD9FF1.9020908@web.de> Date: Wed, 23 May 2012 23:41:53 -0300 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: qemu-trivial , qemu-devel X-Enigmail-Version: 1.4.1 X-Provags-ID: V02:K0:cGIvXkcWFPW4fhtAon8TTLH7xPvjA1rAlu98zaV4Crc 0fwStiCox1LqQmSuZKuqx9IZwoP0pf0KywmcmB3x3PrwyAH7yU sYagYtMY/YjA6uX83C3OCgMX3zFFbBYx6zpiTyL11AWBckto0b bWCeriijwJfvcya2VzdNyehAIsZSXZjX1neiyNlSSu+nWGji7C 3RT5CuJgkeD9+b0YkLfKg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.221 Subject: [Qemu-devel] [PATCH] Clarify comments of tb_invalidate_phys_[page_]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 From: Jan Kiszka They could suggest that all TBs of the page containing the range would be invalidated. Signed-off-by: Jan Kiszka --- exec.c | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/exec.c b/exec.c index efa1345..a1c12ec 100644 --- a/exec.c +++ b/exec.c @@ -1076,11 +1076,11 @@ TranslationBlock *tb_gen_code(CPUArchState *env, } /* - * invalidate all TBs which intersect with the target physical pages - * starting in range [start;end[. NOTE: start and end may refer to - * different physical pages. 'is_cpu_write_access' should be true if called - * from a real cpu write access: the virtual CPU will exit the current - * TB if code is modified inside this TB. + * Invalidate all TBs which intersect with the target physical address range + * [start;end[. NOTE: start and end may refer to *different* physical pages. + * 'is_cpu_write_access' should be true if called from a real cpu write + * 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) @@ -1092,11 +1092,13 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, } } -/* invalidate all TBs which intersect with the target physical page - starting in range [start;end[. NOTE: start and end must refer to - the same physical page. 'is_cpu_write_access' should be true if called - from a real cpu write access: the virtual CPU will exit the current - TB if code is modified inside this TB. */ +/* + * Invalidate all TBs which intersect with the target physical address range + * [start;end[. NOTE: start and end must refer to the *same* physical page. + * 'is_cpu_write_access' should be true if called from a real cpu write + * access: the virtual CPU will exit the current TB if code is modified inside + * this TB. + */ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, int is_cpu_write_access) {