From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: xen/x86: Question about alloc_domheap_page in pod code Date: Thu, 22 Oct 2015 16:10:16 +0100 Message-ID: <5628FC58.1010403@citrix.com> References: <5628FB0D.5070402@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZpHVy-0001tT-SU for xen-devel@lists.xenproject.org; Thu, 22 Oct 2015 15:10:50 +0000 In-Reply-To: <5628FB0D.5070402@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 , George Dunlap , Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 22/10/15 16:04, Julien Grall wrote: > Hi, > > I was looking to the pod code (arch/x86/mm/p2m-pod.c) and noticed that > the calls to alloc_domheap_page{s,} seems to take wrong parameter: > > page = alloc_domheap_pages(d, order, PAGE_ORDER_4K); > > p = alloc_domheap_page(d, PAGE_ORDER_4K); > > AFAICT the last parameter is the memory flags and not the order so using > PAGE_ORDER_4K is wrong. Am I right? > > I don't know much x86, hence my question before sending a patch to fix it. You are completely correct. It is wrong. It happens to function as PAGE_ORDER_4K is 0, and means "no memflag restrictions". ~Andrew