Hi Julien > -----Original Message----- > From: Julien Grall <[email protected]> > Sent: Tuesday, June 7, 2022 5:20 PM > To: Penny Zheng <[email protected]>; [email protected] > Cc: Wei Chen <[email protected]>; Stefano Stabellini > <[email protected]>; Bertrand Marquis <[email protected]>; > Volodymyr Babchuk <[email protected]>; Andrew Cooper > <[email protected]>; George Dunlap <[email protected]>; > Jan Beulich <[email protected]>; Wei Liu <[email protected]> > Subject: Re: [PATCH v6 7/9] xen/arm: unpopulate memory when domain is > static > > Hi Penny, > > On 07/06/2022 08:30, Penny Zheng wrote: > > Today when a domain unpopulates the memory on runtime, they will > > always hand the memory back to the heap allocator. And it will be a > > problem if domain is static. > > > > Pages as guest RAM for static domain shall be reserved to only this > > domain and not be used for any other purposes, so they shall never go > > back to heap allocator. > > > > This commit puts reserved pages on the new list resv_page_list only > > after having taken them off the "normal" list, when the last ref dropped. > > > > Signed-off-by: Penny Zheng <[email protected]> > > Acked-by: Jan Beulich <[email protected]> > > --- > > v6 changes: > > - refine in-code comment > > - move PGC_static !CONFIG_STATIC_MEMORY definition to common header > > I don't understand why this change is necessary for this patch. AFAICT, all > the > users of PGC_static will be protected by #ifdef CONFIG_STATIC_MEMORY and > therefore PGC_static should always be defined. >
True, I notice that arch_free_heap_page has already been guarded with #ifdef CONFIG_STATIC_MEMORY. I'll revert the change. > Cheers, > > -- > Julien Grall
