* xen/x86: Question about alloc_domheap_page in pod code
@ 2015-10-22 15:04 Julien Grall
2015-10-22 15:10 ` Andrew Cooper
0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2015-10-22 15:04 UTC (permalink / raw)
To: George Dunlap, Andrew Cooper, Jan Beulich; +Cc: xen-devel
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.
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: xen/x86: Question about alloc_domheap_page in pod code
2015-10-22 15:04 xen/x86: Question about alloc_domheap_page in pod code Julien Grall
@ 2015-10-22 15:10 ` Andrew Cooper
2015-10-22 15:17 ` George Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2015-10-22 15:10 UTC (permalink / raw)
To: Julien Grall, George Dunlap, Jan Beulich; +Cc: xen-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: xen/x86: Question about alloc_domheap_page in pod code
2015-10-22 15:10 ` Andrew Cooper
@ 2015-10-22 15:17 ` George Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: George Dunlap @ 2015-10-22 15:17 UTC (permalink / raw)
To: Andrew Cooper, Julien Grall, George Dunlap, Jan Beulich; +Cc: xen-devel
On 22/10/15 16:10, Andrew Cooper wrote:
> 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".
+1
-George
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-22 15:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22 15:04 xen/x86: Question about alloc_domheap_page in pod code Julien Grall
2015-10-22 15:10 ` Andrew Cooper
2015-10-22 15:17 ` George Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.