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 <[email protected]>
> ---
> 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")

Reply via email to