Hi Penny,
On 18/05/2021 06:21, Penny Zheng wrote:
Function parameter order in assign_pages is always used as 1ul << order,
referring to 2@order pages.
Now, for better compatibility with new static memory, order shall
be replaced with nr_pfns pointing to page count with no constraint,
like 250MB.
We have similar requirements for LiveUpdate because are preserving the
memory with a number of pages (rather than a power-of-two). With the
current interface would be need to split the range in a power of 2 which
is a bit of pain.
However, I think I would prefer if we introduce a new interface (maybe
assign_pages_nr()) rather than change the meaning of the field. This is
for two reasons:
1) We limit the risk to make mistake when backporting a patch touch
assign_pages().
2) Adding (1UL << order) for pretty much all the caller is not nice.
Cheers,
--
Julien Grall