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