[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 6/9] xen: arm: handle variable p2m levels in p2m_lookup
On Thu, 2014-07-31 at 12:14 +0100, Julien Grall wrote: > > + if ( level == 3 && !p2m_table(pte) ) > > + /* Invalid, clobber the pte */ > > + pte.bits = 0; > > + if ( level == 3 || !p2m_table(pte) ) > > + /* Done */ > > + break; > > > > - BUILD_BUG_ON(THIRD_MASK != PAGE_MASK); > > + BUG_ON(level == 3); > > Rather than checking level == 3, I would add > BUG_ON(level < 4) at the end of loop. You mean outside/before the loop? That doesn't work if we hit a superpage mapping, since we will exit the loop with level < 4. I think it needs to stay where it is. > The only drawback to be there is we map one more page. > > And same remark as the previous BUG_ON(). I did make it an ASSERT(level < 3) though. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |