From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkxnN-00062H-H4 for qemu-devel@nongnu.org; Wed, 22 Apr 2015 12:46:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkxnH-0000Mg-IZ for qemu-devel@nongnu.org; Wed, 22 Apr 2015 12:46:41 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkxnH-0000Lh-BA for qemu-devel@nongnu.org; Wed, 22 Apr 2015 12:46:35 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0E29D20AF6 for ; Wed, 22 Apr 2015 12:46:32 -0400 (EDT) Date: Wed, 22 Apr 2015 12:47:01 -0400 From: "Emilio G. Cota" Message-ID: <20150422164701.GA2378@flamenco> References: <1426919142-20770-1-git-send-email-cota@braap.org> <55379E61.5080104@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55379E61.5080104@redhat.com> Subject: Re: [Qemu-devel] [PATCH] translate-all: use bitmap helpers for PageDesc's bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Wed, Apr 22, 2015 at 15:13:05 +0200, Paolo Bonzini wrote: > On 21/03/2015 07:25, Emilio G. Cota wrote: > > Note that this test > > if (b & ((1 << len) - 1)) > > can be simplified to > > if (b & 1) > > , since we know that iff the first bit of a tb is set, > > all other bits from that tb are set too. > > I don't think this optimization is valid, unfortunately. It is possible > that say a tb starts at 0x12340001 and tb_invalidate_phys_page_fast is > called for the range starting at 0x12340000 and ending at 0x12340003. > > In this case you need the full test that was used before. Good catch, haven't seen this in my tests but it could possibly happen. v2 coming up. Thanks, Emilio