From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC] xen/arm: Find automatically the gnttab region for DOM0 Date: Tue, 26 May 2015 11:01:56 +0200 Message-ID: <55643684.5010703@citrix.com> References: <1432251520-31598-1-git-send-email-julien.grall@citrix.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 1YxAkO-0002au-O2 for xen-devel@lists.xenproject.org; Tue, 26 May 2015 09:02:04 +0000 In-Reply-To: <1432251520-31598-1-git-send-email-julien.grall@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: Julien Grall , xen-devel@lists.xenproject.org Cc: tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, parth.dixit@linaro.org List-Id: xen-devel@lists.xenproject.org Hi, On 22/05/2015 01:38, Julien Grall wrote: > Currently, the grant table region is hardcoded per-platform. When a new > board is coming up, we have to check the spec in order to find a space > in the memory layout free. Depending on the platform it may be tedious. > > A good candidate for the gnttab region is the one used by Xen binary as > some part will never be mapped to the DOM0 address, MMIO are mapped 1:1 > and the RAM will be either: > - direct mapped: 1:1 mapping is used => no problem > - non direct mapped: Xen always relocates himself as high as possible > (limited to 4GB on ARM32) and the RAM bank are filled from the first > one. It's very unlikely that the gnttab region will overlap with the > RAM. Although for safety a check may be necessary when we will reenable > the option. > > Futhermore, there is plenty of space to contain a big gnttab, the default > size is 32 frame (i.e 32KB) but it can be changed via a command option. I miscalculate the size here. It should be 32 * 4KB = 128KB. Regards, -- Julien Grall