From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 04/10] xen/arm: Store p2m type in each page of the guest Date: Tue, 10 Dec 2013 01:55:18 +0000 Message-ID: <52A67486.4020702@linaro.org> References: <1386560047-17500-1-git-send-email-julien.grall@linaro.org> <1386560047-17500-5-git-send-email-julien.grall@linaro.org> <1386608007.7812.68.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VqCXh-0003Ym-UF for xen-devel@lists.xenproject.org; Tue, 10 Dec 2013 01:55:22 +0000 Received: by mail-wi0-f170.google.com with SMTP id hq4so4681886wib.1 for ; Mon, 09 Dec 2013 17:55:20 -0800 (PST) In-Reply-To: <1386608007.7812.68.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org 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). -- Julien Grall