From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 14/33] xen/arm: vgic: Correctly calculate GICD_TYPER.ITLinesNumber Date: Tue, 31 Mar 2015 12:28:52 +0100 Message-ID: <551A84F4.6070602@linaro.org> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> <1426793399-6283-15-git-send-email-julien.grall@linaro.org> <1427798779.2115.57.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 1YcuMD-000229-4m for xen-devel@lists.xenproject.org; Tue, 31 Mar 2015 11:29:21 +0000 Received: by wgbdm7 with SMTP id dm7so15574686wgb.1 for ; Tue, 31 Mar 2015 04:29:19 -0700 (PDT) In-Reply-To: <1427798779.2115.57.camel@citrix.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 List-Id: xen-devel@lists.xenproject.org On 31/03/15 11:46, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +0000, Julien Grall wrote: >> The formula of GICD_TYPER.ITLinesNumber is 32(N + 1). >> >> As the number of SPIs suppported by the domain may not be a multiple of >> 32, we have to round up the number before using it. >> >> At the same time remove the mask GICD_TYPE_LINES which is pointless. > > I presume because something else has ensured that nr_spis is less than > the maximum value represented by the mask? The number of SPIs is validated in domain_vgic_init. We would be in trouble in the IRQ guest injection if this number is too high. > >> Signed-off-by: Julien Grall > > Acked-by: Ian Campbell Thanks, -- Julien Grall