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

Re: [PATCH v3 6/7] xen/arm: Implement the logic for static shared memory from Xen heap


  • To: Luca Fancellu <luca.fancellu@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 22 May 2024 15:19:57 +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=EO6KUCu3JGuzHIVuVIM4KDT+40PD1yt4ONaC+056r/Q=; b=awrdrld6ja5ztkDiI5Y0TcTAKW/kN0AFEYFwBUTYeZd4yy470twnlCRiPoucsltVBwDfSTifMAJMzv7KE0WME6+HyNj2IyugZwQH+lO1bg++wvsBdV8HhZhel+6gMOes47Y9J5fjT2N8uOzLl61uBOK5X4WTkBkIcqdAWd1WHAF/6CPfXRchUGjX/XWkBDolrFo6vnyC7B46oHmF3jk2wrkohYkEy+jvDfmt0pMZGzeUnND941yUHvQi7CSRWuZ5J4PGc1bO/P8P0f7HmIJlHPf/gFyWoxvi8Ye3fRcNpRKdxOmgu2Oowzfymxtpv0BTjZ8N0E4WpdHc4Lkytu8GSA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T++K8TuLf8+kKlPCIGYoDDpxLlk0txDOpSrH6tkWvSsoxjUUDiOlwLTYkJEyNBlYk0jm9kYQMJMu9I5ZVPlVVsm/8kW8OKPFXgbiAb1lt12oNJNlH9RLpYJQdg94wW3dQHlPbStsZpF+WH2pmT/K1sX/F9RsITJpVgCSB5lJ4SDwAD2MLNDx+vt4IppD+Bt07hTUdsgjcxtlrDSBIgylyoVHEIl/mQK8H0nT0C5MmFzSUldoDt77ONchLC1y+VHD+FppxoluWKNM06Ck9iiP7QLCWcD6LBpjEnEZRPDqZ8C27LOqyNmkwErKIkFUUvX3y9/abQqlS7Q7COiqfc4kpA==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 22 May 2024 13:20:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Luca,

On 22/05/2024 09:51, Luca Fancellu wrote:
> 
> 
> This commit implements the logic to have the static shared memory banks
> from the Xen heap instead of having the host physical address passed from
> the user.
> 
> When the host physical address is not supplied, the physical memory is
> taken from the Xen heap using allocate_domheap_memory, the allocation
> needs to occur at the first handled DT node and the allocated banks
> need to be saved somewhere.
> 
> Introduce the 'shm_heap_banks' for that reason, a struct that will hold
> the banks allocated from the heap, its field bank[].shmem_extra will be
> used to point to the bootinfo shared memory banks .shmem_extra space, so
> that there is not further allocation of memory and every bank in
> shm_heap_banks can be safely identified by the shm_id to reconstruct its
> traceability and if it was allocated or not.
> 
> A search into 'shm_heap_banks' will reveal if the banks were allocated
> or not, in case the host address is not passed, and the callback given
> to allocate_domheap_memory will store the banks in the structure and
> map them to the current domain, to do that, some changes to
> acquire_shared_memory_bank are made to let it differentiate if the bank
> is from the heap and if it is, then assign_pages is called for every
> bank.
> 
> When the bank is already allocated, for every bank allocated with the
> corresponding shm_id, handle_shared_mem_bank is called and the mapping
> are done.
> 
> 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®.