From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen: arm: configure correct dom0_gnttab_start/size Date: Fri, 12 Sep 2014 12:20:49 -0700 Message-ID: <54134791.7000806@linaro.org> References: <1410448889-18731-1-git-send-email-ian.campbell@citrix.com> <54120207.8060000@linaro.org> <1410515658.567.30.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1410515658.567.30.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: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 12/09/14 02:54, Ian Campbell wrote: > On Thu, 2014-09-11 at 13:11 -0700, Julien Grall wrote: >> Hi Ian, >> >> On 11/09/14 08:21, Ian Campbell wrote: >>> This just fixes vexpress, I wonder if a followup patch should either remove the >>> default dom0_gnttab (forcing all platforms to specify one explicitly) or make >>> the default something less arbitrary than 0xb0000000, e.g. 0x0-0x20000 or >>> 0xfffe0000-0x100000000 (very start or very end of RAM). Perhaps with a command >>> line option to override for new platform hacking. >> >> Dropping the default value sounds a good solution. >> >>> Or maybe we should search for an unused hole in the dom0 RAM space? >> >> I'm not sure to understand your suggestion here. Did you mean that as >> DOM0 will never use all the host RAM, we could find a space in the RAM >> to use for grant table? > > Something like that, yes. > > In fact it occurred to me last night that that since the gnttab needs to > be populate anyway we could allocate it early in the case of 1:1 dom0 > and then use that address as a 1:1 value for the gnttab IPA passed to > dom0. > > For non-1:1 dom0 we could safely put it right over the dom0 memory > allocation, which as you observe is never going to be all of host ram > (since Xen must be using something...) > > In fact, maybe using Xen's own 2M IPA would work everywhere. The default size of the grant table can be changed via the command line. This is something we don't handle actually. So a "malloc" would be the best solution here. Regards, -- Julien Grall