[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 5/7] xen/arm: Rework heap page allocation outside allocate_bank_memory


  • To: Luca Fancellu <luca.fancellu@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Mon, 20 May 2024 11:42:46 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WPU8hD81Pm9J++nH/iyRK9mWmWSLUCEydeiBUSqW8qg=; b=mob5SFvSEO7Q8/QRUGkUgtTS5VNynRM7j+u1AJ/1YwRekgJvbVQwUrJw+2RaFKRAfRamGmWQ1Gi2GRaUNIcmgeh9HBDm1mmUStfV3RgGCpVp9q1QhnhsRzROg0mZNnx9oYh7ygLyTFAs3HN57qTyNFnCy+q+8Aw49aKXaeT+Arpyau/5YnmXVB0ohDZhokBVLH5tcKZz1TVgN4lvDu5GOsZkOHkzugZVLzaZVW36jPl22tYs3MSQCVZRc6N/2q7FMreV0ezerMpLIeBfuosQrRboIZQ0vCpF6b83Jmicet3IV0CyArfksWD4OVARbr8tirvvvUazzWZvbHkOQ+Mckw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bYZqGMdB1jVe/5Nn4thBiKsxaADMj1Jo5+dBo2+5zLAyo5MsOC+AkSehSJgDo/d7nw6sNP2neQ/UGjSUxz0zpVntneuHspBgne8pU8VWdTW6/GshkNMCHKuan0UMxA9tDaJ/GfIEzAdapSVOC0VFQ6cC2FLp3cW4GUbJKglQGwHjZ+xR7zwm0WOeQjA42iW98vU+1w/VkmHlGQJMO7mTvb262wslZQ8im4oM0x1xWdnp85q4ELi/feEVFN63wIg6RtuApl3KyKat91wmdCXxwTmW5IIQMK1SanP+RjDKvPmRlqn77vrjWtwzJKqAVU1zWHb54T6/+bp6Q9sn1U5Z6A==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 20 May 2024 09:42:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.fancellu@xxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.