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

Re: [PATCH v2 2/8] xen/arm: re-define a set of data structures for static shared memory region


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Thu, 13 Apr 2023 15:55:14 -0400
  • 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
  • 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=AbR0ZOV6YHp3unjdtxF89oo88L3tukNm7J1yJytBJd0=; b=QTMbF4uNartpWetvgEmx3ru55X6arkT+yBkDaX8mGDJ+vFgEZbKRDPeFdLbgDLseFrrGU6Wo0D+EL1Ggnf+sThQaio1j582NYVQ8XGYt1vb36Hzu+Xh6fxcs2+SVjC/686NvGhujk9Dhy4wgpA9+3aVLVlAoZjsnq1clYaBVC4h9V9+rSDIEG20oYEBJU0wSpjjtPRpgouJBvQ9cuO71nY8AeXfZ6ylA+ztcrjnz+AD2wkZmhAFVpGA8BTc7OA+wldiNH3E89xGLzNxNVuGm4276IxojDBFq/A/oBMTtZqUXDwwTB1oRC6FOlGphV/knxT3gLbZdO1o5QOfvGNHzgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=giPucoljItkLXmTWzh2BABJFAT5txkUAwDWrNXk0NdmxXMrULw3GB85YcmaTvxsqYr4KJ0CbUkbXTdsTVhU61C+x9br/ieUX9QxfxZjZmqJq7okvS9+H3NA4f97Igs1UcqmQ8EQFJHNyVW1wpdbH5Hkj12Y8J76STRGubPfXqsh4wpj3YodYR3LsJI36UGRBueNRqtEtIVc8fs4ezklnrVAfKNTdFs1kd9M0EQ6m9JYAft9yp35n8C1i3hrzYOuzi+Pg09ZpzWwemf0zwp1q0OakZmsmcxXxMRW8pbGgMr/tugOzrHnJkO+zOz6XdkBif6N0kgUFNTITh7wbTomKxA==
  • Cc: <wei.chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 13 Apr 2023 19:55:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Penny

On 2/23/23 00:40, Penny Zheng wrote:
> This commit introduces a set of separate data structures to deal with
> static shared memory at different stages.
> 
> In boot-time host device tree parsing, we introduce a new structure
> "struct shm_node" and a new field "shm_info" in bootinfo to describe and
> store parsed shm info.
> only SHMID and "nr_borrowers", which describes the number of borrower domain,
> are considered here for per shm node.
> We also introduce a new local global data "shm_data" in bootfdt.c, in which,
> reserved memory bank is recorded together with shm node, to assist doing
> shm node verification.
> 
> In order to apply above changes in acquire_nr_borrower_domain, we now use 
> SHMID
> to iterate "shminfo" to find requested shm node, then acquiring the 
> information
> of "nr_borrowers".
> 
> In the last, a new anonymized structure "shminfo", which is a array of
> compound structure that contains SHMID and a "struct membank membank"
> describing shared memory regions in guest address space, is created in "kinfo"
> when dealing with domain information.
> 
> Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> ---
> v1 -> v2:
> - As the original "struct shm_membank" was making reserving memory more
> complex and actually memory information could be still got from host Device\
> Tree when dealing with domain construction, we introduce a new simple 
> structure
> "struct shm_node" in bootinfo to only store SHMID and "nr_borrowers"
> - Further restrict the scope of the local variable
> "struct meminfo *mem = &bootinfo.reserved_mem"
> - Introduce a new local global data "shm_data" in bootfdt.c. In which, 
> reserved
> memory bank is recorded together with the shm node, to assist doing shm node
> verification.
> - Define a set of local variables that point to
> "shm_data.shm_nodes[i].membank->start", etc, to make the code more readable.
> - Use SHMID to iterate "shminfo" to find requested shm node, as we no
> longer store host memory bank info in shm node.
> - A new anonymized structure, which is a array of compound structure that
> contains SHMID and a "struct membank membank", describing shared memory region
> in guest, is introduced in "kinfo".

This patch no longer applies cleanly to master since 64c21916167e ("xen/arm: 
Use the correct format specifier")



 


Rackspace

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