qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] translate-all: use bitmap helpers for PageDesc'


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH] translate-all: use bitmap helpers for PageDesc's bitmap
Date: Wed, 22 Apr 2015 12:47:01 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]