Hi Luca, On 15/05/2024 16:26, Luca Fancellu wrote: > > > The function allocate_bank_memory allocates pages from the heap and > maps them to the guest using guest_physmap_add_page. > > As a preparation work to support static shared memory bank when the > host physical address is not provided, Xen needs to allocate memory > from the heap, so rework allocate_bank_memory moving out the page > allocation in a new function called allocate_domheap_memory. > > The function allocate_domheap_memory takes a callback function and > a pointer to some extra information passed to the callback and this > function will be called for every region, until a defined size is > reached. > > In order to keep allocate_bank_memory functionality, the callback > passed to allocate_domheap_memory is a wrapper for > guest_physmap_add_page. > > Let allocate_domheap_memory be externally visible, in order to use > it in the future from the static shared memory module. > > Take the opportunity to change the signature of allocate_bank_memory > and remove the 'struct domain' parameter, which can be retrieved from > 'struct kernel_info'. > > No functional changes is intended. > > Signed-off-by: Luca Fancellu <luca.fance...@arm.com> Reviewed-by: Michal Orzel <michal.or...@amd.com>
~Michal