RE: [PATCH v5 7/7] xen/arm: introduce allocate_static_memory

2021-09-06 Thread Penny Zheng
Hi Julien and Stefano > -Original Message- > From: Julien Grall > Sent: Friday, September 3, 2021 3:42 PM > To: Stefano Stabellini > Cc: Penny Zheng ; xen-devel@lists.xenproject.org; > Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH v5

RE: [PATCH v5 1/7] xen/arm: introduce new helper device_tree_get_meminfo

2021-09-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Wednesday, September 1, 2021 4:57 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH v5 1/7] xen/a

[PATCH v5 7/7] xen/arm: introduce allocate_static_memory

2021-08-24 Thread Penny Zheng
function guest_physmap_add_pages to cope with adding guest RAM p2m mapping with nr_pages. Signed-off-by: Penny Zheng --- v5 changes: - don't split comment over multi-line (even they are more than 80 characters) - simply use dt_find_property(node, "xen,static-mem", NULL) to tell whe

[PATCH v5 5/7] xen: re-define assign_pages and introduce assign_page

2021-08-24 Thread Penny Zheng
In order to deal with the trouble of count-to-order conversion when page number is not in a power-of-two, this commit re-define assign_pages for nr pages and assign_page for original page with a single order. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- v5 change: - Having both

[PATCH v5 4/7] xen/arm: static memory initialization

2021-08-24 Thread Penny Zheng
new CONFIG_STATIC_MEMORY to wrap all static-allocation-related codes. Put asynchronous scrubbing for pages of static memory in TODO list. Signed-off-by: Penny Zheng --- v5 change: - make CONFIG_STATIC_MEMORY user selectable and gated by UNSUPPORTED. - wrap all static-allocation-related codes

[PATCH v5 6/7] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-08-24 Thread Penny Zheng
introduces a new page flag PGC_reserved, then mark pages of static memory PGC_reserved when initializing them. Signed-off-by: Penny Zheng --- v5 changes - bundle all the functions for static allocation in a single place - return an error and revert the changes, when the page is not free and reserved

[PATCH v5 3/7] xen: introduce mark_page_free

2021-08-24 Thread Penny Zheng
be potentially non-trivial. As the function is internal, pass the MFN and the page. They are both expected to match. Signed-off-by: Penny Zheng Acked-by: Jan Beulich Reviewed-by: Julien Grall --- xen/common/page_alloc.c | 89 ++--- 1 file changed, 48

[PATCH v5 0/7] Domain on Static Allocation

2021-08-24 Thread Penny Zheng
mapping() and introduce guest_physmap_add_pages to cope with adding guest RAM p2m mapping with nr_pages. - check both pbase and psize are page aligned - simplify the code in the loops by moving append_static_memory_to_bank() outside of the if/else. --- TODO: - reboot domain on static allocation - Im

[PATCH v5 2/7] xen/arm: introduce domain on Static Allocation

2021-08-24 Thread Penny Zheng
ole hardware resource, or bind to one specific xen domain node, through "xen,static-mem" Signed-off-by: Penny Zheng --- v5 changes: - check the node using the Xen domain binding whether contains the property "xen,static-mem", not the property itself - add "rc = ..."

[PATCH v5 1/7] xen/arm: introduce new helper device_tree_get_meminfo

2021-08-24 Thread Penny Zheng
A few functions iterate over the device tree property to get memory info, like "reg" or the later "xen,static-mem", so this commit creates a new helper device_tree_get_meminfo to extract the common codes. Signed-off-by: Penny Zheng --- xen/arc

RE: [PATCH V4 07/10] xen: re-define assign_pages and introduce assign_page

2021-08-17 Thread Penny Zheng
Hi Julian and Jan > -Original Message- > From: Julien Grall > Sent: Friday, August 13, 2021 8:27 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 07/10] xen

RE: [PATCH V4 10/10] xen/arm: introduce allocate_static_memory

2021-08-16 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Tuesday, August 17, 2021 1:55 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 10/10] xen/arm: introduc

RE: [PATCH V4 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-08-16 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Tuesday, August 17, 2021 1:44 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 08/10] xen/arm: introduce

RE: [PATCH V4 01/10] xen/arm: introduce domain on Static Allocation

2021-08-16 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, August 17, 2021 1:28 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 01/10] xen/arm: in

RE: [PATCH V4 10/10] xen/arm: introduce allocate_static_memory

2021-08-16 Thread Penny Zheng
Hi julien > -Original Message- > From: Julien Grall > Sent: Friday, August 13, 2021 9:37 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 10/10] xen/arm: introduc

RE: [PATCH V4 09/10] xen/arm: check "xen,static-mem" property during domain construction

2021-08-16 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Friday, August 13, 2021 9:12 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 09/10] xen/arm: check &

RE: [PATCH V4 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-08-16 Thread Penny Zheng
Hi Julien, > -Original Message- > From: Julien Grall > Sent: Friday, August 13, 2021 9:00 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 08/10] xen/arm: introduce

RE: [PATCH V4 06/10] xen/arm: introduce PGC_reserved

2021-08-16 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Friday, August 13, 2021 8:22 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 06/10] xen/arm: introduce PG

RE: [PATCH V4 05/10] xen/arm: static memory initialization

2021-08-16 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Friday, August 13, 2021 8:21 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 05/10] xen/arm: static memor

RE: [PATCH V4 03/10] xen/arm: handle static memory in dt_unreserved_regions

2021-08-16 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Wednesday, August 11, 2021 9:48 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 03/10] xen/a

RE: [PATCH V4 02/10] xen/arm: introduce new helper device_tree_get_meminfo

2021-08-15 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Wednesday, August 11, 2021 9:35 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 02/10] xen/a

RE: [PATCH V4 01/10] xen/arm: introduce domain on Static Allocation

2021-08-15 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Wednesday, August 11, 2021 9:32 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH V4 01/10] xen/arm: in

[PATCH V4 10/10] xen/arm: introduce allocate_static_memory

2021-07-28 Thread Penny Zheng
shall be firstly mapped to the fixed guest RAM address `GUEST_RAM0_BASE`. And until it exhausts the `GUEST_RAM0_SIZE`, it will seek to `GUEST_RAM1_BASE`, and so on. `GUEST_RAM0` may take up several pre-defined physical RAM regions. Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c | 137

[PATCH V4 04/10] xen: introduce mark_page_free

2021-07-28 Thread Penny Zheng
This commit defines a new helper mark_page_free to extract common code, like following the same cache/TLB coherency policy, between free_heap_pages and the new function free_staticmem_pages, which will be introduced later. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- xen/common

[PATCH V4 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-07-28 Thread Penny Zheng
contiguous pages of static memory and assign them to one specific domain. It uses acquire_staticmem_pages to acquire nr_mfns pre-configured pages of static memory, then on success, it will use assign_pages to assign those pages to one specific domain. Signed-off-by: Penny Zheng --- v4 change

[PATCH V4 09/10] xen/arm: check "xen,static-mem" property during domain construction

2021-07-28 Thread Penny Zheng
the moment. Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 6c86d52781..cdb16f2086 100644 --- a/xen/arch/arm/doma

[PATCH V4 07/10] xen: re-define assign_pages and introduce assign_page

2021-07-28 Thread Penny Zheng
, such that the compiler would point out that adjustments at call sites are needed. Signed-off-by: Penny Zheng --- v4 change: - in all cases where order-0 pages get passed, prefer using assign_pages to pass literal 1 - reconstruct the order of assign_pages parameters - remove the unnecessary

[PATCH V4 01/10] xen/arm: introduce domain on Static Allocation

2021-07-28 Thread Penny Zheng
` feature, and also documents and parses this new attribute at boot time and stores related info in static_mem for later initialization. Signed-off-by: Penny Zheng --- docs/misc/arm/device-tree/booting.txt | 40 + xen/arch/arm/bootfdt.c| 51

[PATCH V4 05/10] xen/arm: static memory initialization

2021-07-28 Thread Penny Zheng
new CONFIG_STATIC_MEMORY to avoid bringing dead codes in other archs. Put asynchronous scrubbing for pages of static memory in TODO list. Signed-off-by: Penny Zheng --- v4 change: - move the option CONFIG_STATIC_MEMORY to common code, and with Arm "select"ing it - replace round_

[PATCH V4 04/10] xen: introduce mark_page_free

2021-07-28 Thread Penny Zheng
This commit defines a new helper mark_page_free to extract common code, like following the same cache/TLB coherency policy, between free_heap_pages and the new function free_staticmem_pages, which will be introduced later. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- xen/common

[PATCH V4 06/10] xen/arm: introduce PGC_reserved

2021-07-28 Thread Penny Zheng
This patch introduces a new page flag PGC_reserved in order to differentiate pages of static memory from those allocated from heap. Mark pages of static memory PGC_reserved when initializing them. Signed-off-by: Penny Zheng --- xen/common/page_alloc.c | 3 +++ xen/include/asm-arm/mm.h | 3

[PATCH V4 03/10] xen/arm: handle static memory in dt_unreserved_regions

2021-07-28 Thread Penny Zheng
static memory regions overlap with memory nodes. The overlapping memory is reserved-memory and should be handled accordingly: dt_unreserved_regions should skip these regions the same way they are already skipping mem-reserved regions. Signed-off-by: Penny Zheng --- xen/arch/arm/setup.c | 47

[PATCH V4 00/10] Domain on Static Allocation

2021-07-28 Thread Penny Zheng
- make acquire_staticmem_pages/acquire_domstatic_pages being __init TODO: - reboot domain on static allocation - Implement all memory-ops(hypercalls) regarding domain on static allocation to balloon in/out memory - asynchronously scrubbing PGC_reserved pages - consider domain on static allocation on NUMA-sup

[PATCH V4 02/10] xen/arm: introduce new helper device_tree_get_meminfo

2021-07-28 Thread Penny Zheng
A few functions iterate over the device tree property to get memory info, like "reg" or "xen,static-mem", so this commit creates a new helper device_tree_get_meminfo to extract the common codes. Signed-off-by: Penny Zheng --- xen/arch

RE: [PATCH V3 10/10] xen/arm: introduce allocate_static_memory

2021-07-27 Thread Penny Zheng
Hi Julien > -Original Message- > From: Penny Zheng > Sent: Tuesday, July 27, 2021 11:45 AM > To: jul...@xen.org > Cc: Bertrand Marquis ; Wei Chen > ; jbeul...@suse.com; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Subject: RE: [PATCH V3 1

RE: [PATCH V3 10/10] xen/arm: introduce allocate_static_memory

2021-07-26 Thread Penny Zheng
Hi Julien > -Original Message- > From: Penny Zheng > Sent: Thursday, July 15, 2021 1:18 PM > To: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Cc: Bertrand Marquis ; Penny Zheng > ; Wei Chen ; > jbeul...@suse.com; nd > Subject:

RE: [PATCH V3 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-07-21 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, July 19, 2021 6:00 PM > To: Jan Beulich ; Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Subject: Re: [PATCH V3 0

RE: [PATCH V3 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-07-21 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Monday, July 19, 2021 5:26 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH V3 0

RE: [PATCH V3 07/10] xen: re-define assign_pages and introduce assign_page

2021-07-20 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Monday, July 19, 2021 4:41 PM > To: Penny Zheng ; jul...@xen.org > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Subject: Re: [PATCH V3 07/10] xen

RE: [PATCH V3 05/10] xen/arm: static memory initialization

2021-07-20 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Monday, July 19, 2021 4:20 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH V3 05/10

[PATCH V3 09/10] xen/arm: check "xen,static-mem" property during domain construction

2021-07-14 Thread Penny Zheng
the moment. Signed-off-by: Penny Zheng --- v3 change: - parse "xen,static-mem" in way of phandle back to property - The return for dt_property_read_u32() shall be checked. - "memory" property shall be mandatory --- xen/arch/arm/domain_build.c | 37 +++

[PATCH V3 10/10] xen/arm: introduce allocate_static_memory

2021-07-14 Thread Penny Zheng
shall be firstly mapped to the fixed guest RAM address `GUEST_RAM0_BASE`. And until it exhausts the `GUEST_RAM0_SIZE`, it will seek to `GUEST_RAM1_BASE`, and so on. `GUEST_RAM0` may take up several pre-defined physical RAM regions. Signed-off-by: Penny Zheng --- v3 changes: - parse "xen,s

[PATCH V3 07/10] xen: re-define assign_pages and introduce assign_page

2021-07-14 Thread Penny Zheng
, such that the compiler would point out that adjustments at call sites are needed. Signed-off-by: Penny Zheng --- v3 change: - rename assign_pages_nr to assign_pages - alter the order of assign_pages parameters --- xen/arch/x86/pv/dom0_build.c | 2 +- xen/common/grant_table.c | 2 +- xen

[PATCH V3 06/10] xen/arm: introduce PGC_reserved

2021-07-14 Thread Penny Zheng
This patch introduces a new page flag PGC_reserved in order to differentiate pages of static memory from those allocated from heap. Mark pages of static memory PGC_reserved when initializing them. Signed-off-by: Penny Zheng --- v3 change: - introduce PGC_reserved when it is firstly used

[PATCH V3 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-07-14 Thread Penny Zheng
nr_mfns contiguous pages of static memory and assign them to one specific domain. It uses acquire_staticmem_pages to acquire nr_mfns pre-configured pages of static memory, then on success, it will use assign_pages to assign those pages to one specific domain. Signed-off-by: Penny Zheng --- v3 change

[PATCH V3 05/10] xen/arm: static memory initialization

2021-07-14 Thread Penny Zheng
new CONFIG_STATIC_MEMORY to avoid bringing dead codes in other archs. Put asynchronous scrubbing for pages of static memory in TODO list. Signed-off-by: Penny Zheng --- v3 change: - include addition of CONFIG_STATIC_ALLOCATION in this commit, where it is firstly used and also change the name

[PATCH V3 03/10] xen/arm: handle static memory in dt_unreserved_regions

2021-07-14 Thread Penny Zheng
static memory regions overlap with memory nodes. The overlapping memory is reserved-memory and should be handled accordingly: dt_unreserved_regions should skip these regions the same way they are already skipping mem-reserved regions. Signed-off-by: Penny Zheng --- v3 changes: - extract common

[PATCH V3 04/10] xen: introduce mark_page_free

2021-07-14 Thread Penny Zheng
This commit defines a new helper mark_page_free to extract common code, like following the same cache/TLB coherency policy, between free_heap_pages and the new function free_staticmem_pages, which will be introduced later. Signed-off-by: Penny Zheng --- v3 changes: - rename from "free

[PATCH V3 02/10] xen/arm: introduce new helper device_tree_get_meminfo

2021-07-14 Thread Penny Zheng
A few functions iterate over the device tree property to get memory info, like "reg" or "xen,static-mem", so this commit creates a new helper device_tree_get_meminfo to extract the common codes. Signed-off-by: Penny Zheng --- xen/arch

[PATCH V3 00/10] Domain on Static Allocation

2021-07-14 Thread Penny Zheng
atic_pages. - remove hunks' #ifdef-ary by introducing PGC_reserved = 0 - remove DMA restriction - "memory" property shall be mandatory - rename allocate_static_bank_memory to append_static_memory_to_bank - infer the next GFN from the bank information in append_static_memory_to_bank - simplif

[PATCH V3 01/10] xen/arm: introduce domain on Static Allocation

2021-07-14 Thread Penny Zheng
` feature, and also documents and parses this new attribute at boot time and stores related info in static_mem for later initialization. Signed-off-by: Penny Zheng --- v3 changes: - use "xen,static-mem" property to be compatible with System Sevice Tree in the future --- docs/misc/arm/d

RE: [PATCH 6/9] xen/arm: introduce alloc_staticmem_pages and alloc_domstatic_pages

2021-07-08 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Thursday, July 8, 2021 6:06 PM > To: Penny Zheng > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; Julien Grall > ; Wei Chen > Subject: Re: [PATCH 6/9] xen/arm: introdu

RE: [PATCH 6/9] xen/arm: introduce alloc_staticmem_pages and alloc_domstatic_pages

2021-07-08 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, July 6, 2021 2:54 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; Julien Grall > Subject: Re: [PATCH 6/9] xen/arm: introdu

RE: [PATCH 4/9] xen/arm: static memory initialization

2021-07-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, July 6, 2021 5:10 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jbeul...@suse.com > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 4/9] xen/arm: stat

RE: [PATCH 8/9] xen/arm: check `xen,static-mem` property during domain construction

2021-07-06 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, July 6, 2021 2:58 PM > To: Penny Zheng ; Julien Grall > Cc: Bertrand Marquis ; Wei Chen > ; sstabell...@kernel.org; xen- > de...@lists.xenproject.org > Subject: Re: [PATCH 8/9] xen/arm: check `

RE: [PATCH 9/9] xen/arm: introduce allocate_static_memory

2021-07-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Saturday, July 3, 2021 10:18 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jbeul...@suse.com > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH

RE: [PATCH 8/9] xen/arm: check `xen,static-mem` property during domain construction

2021-07-06 Thread Penny Zheng
Hi > -Original Message- > From: Julien Grall > Sent: Saturday, July 3, 2021 9:26 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jbeul...@suse.com > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 8/9] xen/arm: check `

RE: [PATCH 6/9] xen/arm: introduce alloc_staticmem_pages and alloc_domstatic_pages

2021-07-05 Thread Penny Zheng
Hi > -Original Message- > From: Jan Beulich > Sent: Thursday, June 10, 2021 6:23 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 6/9] xen/arm: introdu

RE: [PATCH 4/9] xen/arm: static memory initialization

2021-07-05 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Monday, July 5, 2021 3:51 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; Julien Grall > Subject: Re: [PATCH 4/9] xen/arm: stat

RE: [PATCH 4/9] xen/arm: static memory initialization

2021-07-05 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, July 1, 2021 2:10 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jbeul...@suse.com > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 4/9] xen/arm: stat

RE: [PATCH 4/9] xen/arm: static memory initialization

2021-07-05 Thread Penny Zheng
Hi Jan > -Original Message- > From: Penny Zheng > Sent: Monday, July 5, 2021 1:22 PM > To: Julien Grall ; Jan Beulich > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Subject: RE: [PATCH 4/9] xen/arm: static memor

RE: [PATCH 4/9] xen/arm: static memory initialization

2021-07-04 Thread Penny Zheng
Hi Julien and Jan > -Original Message- > From: Julien Grall > Sent: Thursday, July 1, 2021 1:46 AM > To: Jan Beulich ; Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Subject: Re: [PATCH 4/9

RE: [PATCH 3/9] xen/arm: introduce CONFIG_STATIC_ALLOCATION

2021-07-04 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, July 1, 2021 1:45 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jbeul...@suse.com > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH

RE: [PATCH 2/9] xen/arm: introduce PGC_reserved

2021-07-04 Thread Penny Zheng
Hi Julien Sorry for so long to respond, just back from a long holiday.  > -Original Message- > From: Julien Grall > Sent: Thursday, July 1, 2021 1:44 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jbeul...@suse.com > Cc: Bertrand

RE: [PATCH 01/10] xen/arm: introduce domain on Static Allocation

2021-06-15 Thread Penny Zheng
Hi julien > -Original Message- > From: Julien Grall > Sent: Wednesday, June 9, 2021 6:47 PM > To: Bertrand Marquis > Cc: Stefano Stabellini ; Julien Grall > ; Penny Zheng ; xen- > de...@lists.xenproject.org; Wei Chen ; nd > > Subject: Re: [PATCH 01/10

[PATCH 9/9] xen/arm: introduce allocate_static_memory

2021-06-06 Thread Penny Zheng
ranges shall be firstly mapped to the fixed guest RAM address `GUEST_RAM0_BASE`. And until it exhausts the `GUEST_RAM0_SIZE`, it will seek to `GUEST_RAM1_BASE`. `GUEST_RAM0` may take up several pre-defined physical RAM regions. Signed-off-by: Penny Zheng --- changes v2: - rename the values, like

[PATCH 7/9] xen/arm: take care of concurrency on static memory allocation

2021-06-06 Thread Penny Zheng
In the future, user may want to allocate static memory at runtime, and it is quite important to get the code protected from concurrent access. Re-use heap_lock to protect concurrent access in alloc_staticmem_pages. Signed-off-by: Penny Zheng --- changes v2: - new commit --- xen/common

[PATCH 8/9] xen/arm: check `xen,static-mem` property during domain construction

2021-06-06 Thread Penny Zheng
. And if the `memory` property and `xen,static-mem` are both set, it shall be verified that if the memory size defined in both is consistent. Signed-off-by: Penny Zheng --- changes v2: - remove parsing procedure here - check the consistency when `xen,static-mem` and `memory` are both defined

[PATCH 6/9] xen/arm: introduce alloc_staticmem_pages and alloc_domstatic_pages

2021-06-06 Thread Penny Zheng
nr_mfns pages of static memory and assign them to one specific domain. It uses alloc_staticmen_pages to get nr_mfns pages of static memory, then on success, it will use assign_pages_nr to assign those pages to one specific domain. Signed-off-by: Penny Zheng --- changes v2: - use mfn_valid() to do

[PATCH 5/9] xen: introduce assign_pages_nr

2021-06-06 Thread Penny Zheng
Introduce new interface assign_pages_nr to deal with when page number is not in a power-of-two, which will save the trouble each time user needs to split the size in a power of 2 to use assign_pages. Signed-off-by: Penny Zheng --- changes v2: - introduce new interface assign_pages_nr --- xen

[PATCH 4/9] xen/arm: static memory initialization

2021-06-06 Thread Penny Zheng
. scrub the page in need synchronously. Signed-off-by: Penny Zheng --- changes v2: - rename to nr_mfns - extract common code from free_heap_pages and free_staticmem_pages - remove dead codes in other archs, including move some to arm-specific file, and put some under CONFIG_ARM - mark

[PATCH 3/9] xen/arm: introduce CONFIG_STATIC_ALLOCATION

2021-06-06 Thread Penny Zheng
For now, since the feature of Domain on Static Allocation is only supported on ARM Architecture, this commit introduces new CONFIG_STATIC_ALLOCATION to avoid bringing dead codes in other archs. Signed-off-by: Penny Zheng --- changes v2: - new commit --- xen/arch/arm/Kconfig | 3 +++ 1 file

[PATCH 2/9] xen/arm: introduce PGC_reserved

2021-06-06 Thread Penny Zheng
In order to differentiate pages of static memory, from those allocated from heap, this patch introduces a new page flag PGC_reserved to tell. Signed-off-by: Penny Zheng --- changes v2: - remove unused reserved field in struct page_info - remove unused helper page_get_reserved_owner

[PATCH 1/9] xen/arm: introduce domain on Static Allocation

2021-06-06 Thread Penny Zheng
-memory. This patch introduces this new static memory device tree node, and also documents and parses this new attribute at boot time and stores related info in static_mem for later initialization. Signed-off-by: Penny Zheng --- v2 changes: - fix typos - consider reserved-memory binding and use

[PATCH V2 0/9] Domain on Static Allocation

2021-06-06 Thread Penny Zheng
` and `memory` are both defined - fix the scalability issue in allocate_static_memory - allocate static memory when parse Penny Zheng (9): xen/arm: introduce domain on Static Allocation xen/arm: introduce PGC_reserved xen/arm: introduce CONFIG_STATIC_ALLOCATION xen/arm: static memory

RE: [PATCH 01/10] xen/arm: introduce domain on Static Allocation

2021-06-03 Thread Penny Zheng
Hi stefano and julien > -Original Message- > From: Stefano Stabellini > Sent: Friday, June 4, 2021 7:56 AM > To: Julien Grall > Cc: Stefano Stabellini ; Penny Zheng > ; xen-devel@lists.xenproject.org; Bertrand Marquis > ; Wei Chen ; nd > > Subject: Re: [PATC

RE: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages

2021-06-02 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Friday, May 21, 2021 3:09 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 0

RE: [PATCH 01/10] xen/arm: introduce domain on Static Allocation

2021-06-02 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, May 20, 2021 4:51 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 01/10] xen/arm: introduce dom

RE: [PATCH 05/10] xen/arm: introduce alloc_staticmem_pages

2021-05-24 Thread Penny Zheng
Hi Julien > -Original Message- > From: Penny Zheng > Sent: Wednesday, May 19, 2021 1:24 PM > To: Julien Grall ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: RE: [PATCH 05/10] xen/arm: introduce alloc

RE: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages

2021-05-21 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 18, 2021 7:23 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 0

RE: [PATCH 04/10] xen/arm: static memory initialization

2021-05-20 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 18, 2021 6:43 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 04/10] xen/arm: stat

RE: [PATCH 03/10] xen/arm: introduce PGC_reserved

2021-05-20 Thread Penny Zheng
Hi julien > -Original Message- > From: Penny Zheng > Sent: Thursday, May 20, 2021 2:20 PM > To: Julien Grall ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: RE: [PATCH 03/10] xen/arm: introduce PGC

RE: [PATCH 10/10] xen/arm: introduce allocate_static_memory

2021-05-20 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, May 20, 2021 4:10 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 10/10] xen/arm: introduc

RE: [PATCH 03/10] xen/arm: introduce PGC_reserved

2021-05-20 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, May 20, 2021 3:46 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 03/10] xen/arm: introduce PGC_r

RE: [PATCH 01/10] xen/arm: introduce domain on Static Allocation

2021-05-20 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, May 20, 2021 2:27 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 01/10] xen/arm: introduce dom

RE: [PATCH] Xen: Design doc for 1:1 direct-map and static allocation

2021-05-19 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 7:48 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH] Xen: Design doc for 1:1 direct-m

RE: [PATCH 09/10] xen/arm: parse `xen,static-mem` info during domain construction

2021-05-19 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 8:09 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 09/10] xen/arm: parse `xen

RE: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages

2021-05-19 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 8:13 PM > To: Penny Zheng ; Jan Beulich > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Subject: Re: [PATCH 0

RE: [PATCH 10/10] xen/arm: introduce allocate_static_memory

2021-05-19 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 8:06 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 10/10] xen/arm: introduce alloca

RE: [PATCH 08/10] xen/arm: introduce reserved_page_list

2021-05-19 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 18, 2021 7:25 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 08/10] xen/arm: intr

RE: [PATCH 08/10] xen/arm: introduce reserved_page_list

2021-05-19 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 7:02 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 08/10] xen/arm: introduce re

RE: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages

2021-05-19 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 6:30 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 07/10] xen/arm: intruduce alloc

RE: [PATCH 06/10] xen: replace order with nr_pfns in assign_pages for better compatibility

2021-05-18 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 6:21 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 06/10] xen: replace order with

RE: [PATCH 05/10] xen/arm: introduce alloc_staticmem_pages

2021-05-18 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 6:15 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 05/10] xen/arm: introduce alloc

RE: [PATCH 04/10] xen/arm: static memory initialization

2021-05-18 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 6:01 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 04/10] xen/arm: static memor

RE: [PATCH 03/10] xen/arm: introduce PGC_reserved

2021-05-18 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 5:46 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 03/10] xen/arm: introduce PGC_r

RE: [PATCH 01/10] xen/arm: introduce domain on Static Allocation

2021-05-18 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 18, 2021 4:58 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH 01/10] xen/arm: introduce dom

RE: [PATCH 04/10] xen/arm: static memory initialization

2021-05-18 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 18, 2021 3:16 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 04/10] xen/arm: stat

RE: [PATCH 05/10] xen/arm: introduce alloc_staticmem_pages

2021-05-18 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 18, 2021 3:24 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 0

RE: [PATCH 06/10] xen: replace order with nr_pfns in assign_pages for better compatibility

2021-05-18 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, May 18, 2021 3:28 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; nd ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 06/10] xen: re

<    2   3   4   5   6   7   8   >