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

Re: [Xen-devel] [PATCH v2 04/10] xen/arm: Store p2m type in each page of the guest



On Tue, 2013-12-10 at 13:50 +0000, Julien Grall wrote:
> 
> On 12/10/2013 09:37 AM, Ian Campbell wrote:
> > On Tue, 2013-12-10 at 01:55 +0000, Julien Grall wrote:
> >> On 12/09/2013 04:53 PM, Ian Campbell wrote:
> >>> On Mon, 2013-12-09 at 03:34 +0000, Julien Grall wrote:
> >>>> +    BUILD_BUG_ON(p2m_max_real_type > (2 << 4));
> >>>
> >>> 2<<4 is 32.
> >>>
> >>> I think you want either 1<<4, 2^4 or just 16 (my preference is 16). And
> >>
> >> Right.
> >>
> >>> I think it should be >= since the valid values are 0..15 inclusive.
> >>
> >> No, because p2m_max_real_type won't be store in the p2m, so we can have
> >> 16 values [0..15] and p2m_max_real_type will be the 17th (ie 16).
> >
> > If p2m_max_real_type will be the 17th (ie 16) then the check needs to be
> > p2m_max_real_type >= 16.
> 
> No because p2m_max_real_type = 16 is valid.
> Which is invalid is foo = 16 and p2m_max_real_type = 17.

Oh right, because it's actually the one after the last valid one.

OK.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.