|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 03/10] xen/arm: introduce PGC_reserved
On 19/05/2021 04:16, Penny Zheng wrote: Hi Julien Hi Penny, -----Original Message----- From: Julien Grall <julien@xxxxxxx> Sent: Tuesday, May 18, 2021 5:46 PM To: Penny Zheng <Penny.Zheng@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx; sstabellini@xxxxxxxxxx Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen <Wei.Chen@xxxxxxx>; nd <nd@xxxxxxx> Subject: Re: [PATCH 03/10] xen/arm: introduce PGC_reserved On 18/05/2021 06:21, Penny Zheng wrote:In order to differentiate pages of static memory, from those allocated from heap, this patch introduces a new page flag PGC_reserved to tell. New struct reserved in struct page_info is to describe reserved page info, that is, which specific domain this page is reserved to. > Helper page_get_reserved_owner and page_set_reserved_owner are designated to get/set reserved page's owner. Struct domain is enlarged to more than PAGE_SIZE, due to newly-imported struct reserved in struct page_info.struct domain may embed a pointer to a struct page_info but never directly embed the structure. So can you clarify what you mean?Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx> --- xen/include/asm-arm/mm.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.hindex Hmmm... With this series it is still possible to allocate memory at runtime outside of the static allocation (see my comment on the design document [1]). So is it meant to be complete? You would need to make sure the domid to be reserved. But I am not entirely convinced this is necessary here.And when rebooting domain on static allocation, all these reserved pages could not go back to heap when freeing them. So I am considering to use one global `struct page_info*[DOMID]` value to store.As Jan suggested, when domain get rebooted, struct domain will not exist anymore.But I think DOMID info could last. When recreating the domain, you need a way to know its configuration. Mostly likely this will come from the Device-Tree. At which point, you can also find the static region from there. Cheers, [1] <7ab73cb0-39d5-f8bf-660f-b3d77f3247bd@xxxxxxx> -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |