[PATCH v6 07/11] xen/arm: if direct-map domain use native addresses for GICv2

2022-02-13 Thread Penny Zheng
address as vgic_dist_base, other than the dbase. So this patch also introduces vgic_dist_base/vgic_cpu_base accessor to access correct distributor base address/cpu interface base address on varied scenarios, Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Reviewed-by: Julien Grall Tested

[PATCH v6 10/11] xen/arm: if direct-map domain use native UART address and IRQ number for vPL011

2022-02-13 Thread Penny Zheng
number: instead of always using GUEST_VPL011_SPI, try to reuse the physical SPI number if possible. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Reviewed-by: Julien Grall Tested-by: Stefano Stabellini --- v2 changes: - explain why vpl011 initialization before creating its

[PATCH v6 08/11] xen/arm: gate make_gicv3_domU_node with CONFIG_GICV3

2022-02-13 Thread Penny Zheng
This commit gates function make_gicv3_domU_node with CONFIG_GICV3. Signed-off-by: Penny Zheng Acked-by: Stefano Stabellini Tested-by: Stefano Stabellini --- v4 changes: - remove ASSERT_UNREACHABLE() to avoid breaking compilation on prod build with CONFIG_GICV3=n --- v5 changes: - nothing

[PATCH v6 11/11] xen/docs: Document how to do passthrough without IOMMU

2022-02-13 Thread Penny Zheng
From: Stefano Stabellini This commit creates a new doc to document how to do passthrough without IOMMU. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Acked-by: Julien Grall Tested-by: Stefano Stabellini --- v2 changes: - nothing changed --- v3 changes: - nothing changed

[PATCH v6 09/11] xen/arm: if direct-map domain use native addresses for GICv3

2022-02-13 Thread Penny Zheng
future, this patch introduces a new helper "domain_use_host_layout()" that wraps both two check "is_domain_direct_mapped(d) || is_hardware_domain(d)" for more flexible usage. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Reviewed-by: Julien Grall Tested-by

RE: Proposal for Porting Xen to Armv8-R64 - DraftA

2022-03-01 Thread Penny Zheng
Hi julien > -Original Message- > From: Wei Chen > Sent: Tuesday, March 1, 2022 3:52 PM > To: Julien Grall ; xen-devel@lists.xenproject.org; Stefano > Stabellini > Cc: Bertrand Marquis ; Penny Zheng > ; Henry Wang ; nd > > Subject: RE: Proposal for Portin

RE: [PATCH v9 8/8] xen: retrieve reserved pages on populate_physmap

2022-08-09 Thread Penny Zheng
Hi Jan Sorry for the delayed response. > -Original Message- > From: Xen-devel On Behalf Of Jan > Beulich > Sent: Monday, July 25, 2022 11:44 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini

RE: [PATCH v9 8/8] xen: retrieve reserved pages on populate_physmap

2022-08-09 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, August 9, 2022 3:59 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini ; > Wei Liu ; xen-devel@lists.xenproject.org > Subject: Re: [

RE: [PATCH v9 8/8] xen: retrieve reserved pages on populate_physmap

2022-08-09 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, August 9, 2022 4:27 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini ; > Wei Liu ; xen-devel@lists.xenproject.org > Subject: Re: [

RE: [PATCH] xen/arm: Add xen/arch/arm/efi/stub.c in .gitignore

2022-08-14 Thread Penny Zheng
ot;xen: reuse x86 EFI stub functions for Arm") > Signed-off-by: Julien Grall Reviewed-by: Penny Zheng > --- > .gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitignore b/.gitignore > index ed7bd8bdc76c..0d53eb304993 100644 > --- a/.gitignore >

[PATCH v10 4/9] xen: add field "flags" to cover all internal CDF_XXX

2022-08-15 Thread Penny Zheng
With more and more CDF_xxx internal flags in and to save the space, this commit introduces a new field "flags" in struct domain to store CDF_* internal flags directly. Another new CDF_xxx will be introduced in the next patch. Signed-off-by: Penny Zheng Acked-by: Julien Grall --- v

[PATCH v10 1/9] xen/arm: rename PGC_reserved to PGC_static

2022-08-15 Thread Penny Zheng
PGC_reserved could be ambiguous, and we have to tell what the pages are reserved for, so this commit intends to rename PGC_reserved to PGC_static, which clearly indicates the page is reserved for static memory. Signed-off-by: Penny Zheng Acked-by: Jan Beulich Acked-by: Julien Grall --- v10

[PATCH v10 0/9] populate/unpopulate memory when domain on static allocation

2022-08-15 Thread Penny Zheng
;normal" list - introduce acquire_reserved_page to retrieve reserved pages from resv_page_list - forbid non-zero-order requests in populate_physmap - let is_domain_static return ((void)(d), false) on x86 - fix coding style Penny Zheng (9): xen/arm: rename PGC_reserved to PGC_static xen: do not free

[PATCH v10 2/9] xen: do not free reserved memory into heap

2022-08-15 Thread Penny Zheng
, and free_staticmem_pages will be called by it in runtime, so let's drop the __init flag. Wrapper #ifdef CONFIG_STATIC_MEMORY around function declaration( free_staticmem_pages, free_domstatic_page, etc) is kinds of redundant, so we decide to remove it here. Signed-off-by: Penny Zheng Review

[PATCH v10 3/9] xen: do not merge reserved pages in free_heap_pages()

2022-08-15 Thread Penny Zheng
result. So in order to avoid the above scenario, this commit updates free_heap_pages() to check whether the predecessor and/or successor has PGC_static set, when trying to merge the about-to-be-freed chunk with the predecessor and/or successor. Suggested-by: Julien Grall Signed-off-by: Penny Zheng

[PATCH v10 5/9] xen/arm: introduce CDF_staticmem

2022-08-15 Thread Penny Zheng
In order to have an easy and quick way to find out whether this domain memory is statically configured, this commit introduces a new flag CDF_staticmem and a new helper is_domain_using_staticmem() to tell. Signed-off-by: Penny Zheng Acked-by: Julien Grall Acked-by: Jan Beulich --- v10 changes

[PATCH v10 6/9] xen: unpopulate memory when domain is static

2022-08-15 Thread Penny Zheng
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 --- v10 change: - Do not skip the list addition in that one special case --- v9 change

[PATCH v10 9/9] xen: rename free_staticmem_pages to unprepare_staticmem_pages

2022-08-15 Thread Penny Zheng
The name of free_staticmem_pages is inappropriate, considering it is the opposite of function prepare_staticmem_pages. Rename free_staticmem_pages to unprepare_staticmem_pages. Signed-off-by: Penny Zheng --- v10 changes: - new commit --- xen/arch/arm/setup.c| 3 ++- xen/common

[PATCH v10 7/9] xen: introduce prepare_staticmem_pages

2022-08-15 Thread Penny Zheng
acquire_staticmem_pages() in two parts, and introduces prepare_staticmem_pages to bypass all "pointless work". Signed-off-by: Penny Zheng Acked-by: Jan Beulich Acked-by: Julien Grall --- v10 changes: - no change --- v9 changes: - no change --- v8 changes: - no change --- v7 changes: -

[PATCH v10 8/9] xen: retrieve reserved pages on populate_physmap

2022-08-15 Thread Penny Zheng
. Signed-off-by: Penny Zheng --- v10 changes: - add lock on the fail path --- v9 changes: - Use ASSERT_ALLOC_CONTEXT() in acquire_reserved_page - Add free_staticmem_pages to undo prepare_staticmem_pages when assign_domstatic_pages - Remove redundant static in error message --- v8 changes: - As

RE: [PATCH for-4.17] xen/arm: Support properly __ro_after_init on Arm

2022-08-16 Thread Penny Zheng
region permission is not updated. > > Address that, but moving the sections .data.ro_after_init out of .data and > then mark the region read-only once we finish to boot. > > Signed-off-by: Julien Grall > Reviewed-by: Penny Zheng > --- > > This patch is targeting Xe

RE: [PATCH v6 9/9] xen: Add static memory sharing in SUPPORT.md

2022-08-28 Thread Penny Zheng
> -Original Message- > From: Michal Orzel > Sent: Friday, August 26, 2022 3:21 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; George Dunlap > ; Jan Beulich ; Julien Grall > ; Stefano Stabellini ; Wei Liu > > Subject: Re: [PATCH v6

RE: [PATCH v6 1/9] xen/arm: introduce static shared memory

2022-08-28 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Friday, August 26, 2022 9:17 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Bertrand Marquis > ; Volodymyr Babchuk > > Subject: Re: [PATCH v6 1/9] xen/arm: introduce static sha

[PATCH v11 1/6] xen: do not free reserved memory into heap

2022-08-30 Thread Penny Zheng
, and free_staticmem_pages will be called by it in runtime, so let's drop the __init flag. Wrapper #ifdef CONFIG_STATIC_MEMORY around function declaration( free_staticmem_pages, free_domstatic_page, etc) is kinds of redundant, so we decide to remove it here. Signed-off-by: Penny Zheng Review

[PATCH v11 2/6] xen/arm: introduce CDF_staticmem

2022-08-30 Thread Penny Zheng
In order to have an easy and quick way to find out whether this domain memory is statically configured, this commit introduces a new flag CDF_staticmem and a new helper is_domain_using_staticmem() to tell. Signed-off-by: Penny Zheng Acked-by: Julien Grall Acked-by: Jan Beulich --- v11 changes

[PATCH v11 0/6] populate/unpopulate memory when domain on static allocation

2022-08-30 Thread Penny Zheng
in_static()" - put reserved pages on resv_page_list after having taken them off the "normal" list - introduce acquire_reserved_page to retrieve reserved pages from resv_page_list - forbid non-zero-order requests in populate_physmap - let is_domain_static return ((void)(d), false) on x86 -

[PATCH v11 3/6] xen: unpopulate memory when domain is static

2022-08-30 Thread Penny Zheng
go back to heap allocator. This commit puts reserved page on the new list resv_page_list after it has been freed. Signed-off-by: Penny Zheng Acked-by: Jan Beulich Acked-by: Julien Grall --- v11 change: - commit message tweak --- v10 change: - Do not skip the list addition in that one special

[PATCH v11 4/6] xen: introduce prepare_staticmem_pages

2022-08-30 Thread Penny Zheng
acquire_staticmem_pages() in two parts, and introduces prepare_staticmem_pages to bypass all "pointless work". Signed-off-by: Penny Zheng Acked-by: Jan Beulich Acked-by: Julien Grall --- v11 changes: - no change --- v10 changes: - no change --- v9 changes: - no change --- v8 changes: -

[PATCH v11 5/6] xen: rename free_staticmem_pages to unprepare_staticmem_pages

2022-08-30 Thread Penny Zheng
The name of free_staticmem_pages is inappropriate, considering it is the opposite of function prepare_staticmem_pages. Rename free_staticmem_pages to unprepare_staticmem_pages. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- v11 changes: - moved ahead of "xen: retrieve reserved pag

[PATCH v11 6/6] xen: retrieve reserved pages on populate_physmap

2022-08-30 Thread Penny Zheng
. Signed-off-by: Penny Zheng --- v11 change: - with assignment having failed and the page not exposed to the guest at any point, there is no need for scrubbing --- v10 changes: - add lock on the fail path --- v9 changes: - Use ASSERT_ALLOC_CONTEXT() in acquire_reserved_page - Add free_staticmem_pages

RE: [PATCH v6 1/9] xen/arm: introduce static shared memory

2022-09-01 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, September 1, 2022 11:40 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Bertrand Marquis > ; Volodymyr Babchuk > > Subject: Re: [PATCH v6 1/9] xen/arm: introd

RE: [PATCH v11 6/6] xen: retrieve reserved pages on populate_physmap

2022-09-02 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, September 1, 2022 9:53 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Jan Beulich ; Stefano Stabellini ; > Wei Liu > Subje

RE: [PATCH v10 8/9] xen: retrieve reserved pages on populate_physmap

2022-09-05 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Wednesday, August 17, 2022 6:05 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini ; > Wei Liu ; xen-devel@lists.xenproject.org > Subject: Re: [P

RE: [PATCH v10 8/9] xen: retrieve reserved pages on populate_physmap

2022-09-06 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, September 6, 2022 2:34 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini ; > Wei Liu ; xen-devel@lists.xenproject.org > Subject: Re: [P

[PATCH v12 1/6] xen: do not free reserved memory into heap

2022-09-06 Thread Penny Zheng
, and free_staticmem_pages will be called by it in runtime, so let's drop the __init flag. Wrapper #ifdef CONFIG_STATIC_MEMORY around function declaration( free_staticmem_pages, free_domstatic_page, etc) is kinds of redundant, so we decide to remove it here. Signed-off-by: Penny Zheng Review

[PATCH v12 0/6] populate/unpopulate memory when domain on static allocation

2022-09-06 Thread Penny Zheng
ther arch can take advantage of it in the future - change name from "is_domain_on_static_allocation" to "is_domain_static()" - put reserved pages on resv_page_list after having taken them off the "normal" list - introduce acquire_reserved_page to retrieve reserved pages from r

[PATCH v12 2/6] xen/arm: introduce CDF_staticmem

2022-09-06 Thread Penny Zheng
In order to have an easy and quick way to find out whether this domain memory is statically configured, this commit introduces a new flag CDF_staticmem and a new helper is_domain_using_staticmem() to tell. Signed-off-by: Penny Zheng Acked-by: Julien Grall Acked-by: Jan Beulich --- v12 changes

[PATCH v12 3/6] xen: unpopulate memory when domain is static

2022-09-06 Thread Penny Zheng
go back to heap allocator. This commit puts reserved page on the new list resv_page_list after it has been freed. Signed-off-by: Penny Zheng Acked-by: Jan Beulich Acked-by: Julien Grall --- v12 changes: - no change --- v11 change: - commit message tweak --- v10 change: - Do not skip the list

[PATCH v12 4/6] xen: introduce prepare_staticmem_pages

2022-09-06 Thread Penny Zheng
acquire_staticmem_pages() in two parts, and introduces prepare_staticmem_pages to bypass all "pointless work". Signed-off-by: Penny Zheng Acked-by: Jan Beulich Acked-by: Julien Grall --- v12 changes: - no change --- v11 changes: - no change --- v10 changes: - no change --- v9 changes: -

[PATCH v12 5/6] xen: rename free_staticmem_pages to unprepare_staticmem_pages

2022-09-06 Thread Penny Zheng
The name of free_staticmem_pages is inappropriate, considering it is the opposite of function prepare_staticmem_pages. Rename free_staticmem_pages to unprepare_staticmem_pages. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- v12 changes: - no change --- v11 changes: - moved ahead of &quo

[PATCH v12 6/6] xen: retrieve reserved pages on populate_physmap

2022-09-06 Thread Penny Zheng
. Signed-off-by: Penny Zheng --- v12 changes: - it should be acquire_domstatic_pages() calling unprepare_staticmem_pages() on failing - add in-code comment --- v11 change: - with assignment having failed and the page not exposed to the guest at any point, there is no need for scrubbing --- v10

[PATCH v7 0/9] static shared memory on dom0less system

2022-09-06 Thread Penny Zheng
r more details. Penny Zheng (9): xen/arm: introduce static shared memory xen/arm: assign static shared memory to the default owner dom_io xen/arm: allocate static shared memory to a specific owner domain xen/arm: introduce put_page_nr and get_page_nr xen/arm: Add additional reference to own

[PATCH v7 1/9] xen/arm: introduce static shared memory

2022-09-06 Thread Penny Zheng
From: Penny Zheng This patch series introduces a new feature: setting up static shared memory on a dom0less system, through device tree configuration. This commit parses shared memory node at boot-time, and reserve it in bootinfo.reserved_mem to avoid other use. This commits proposes a new

[PATCH v7 3/9] xen/arm: allocate static shared memory to a specific owner domain

2022-09-06 Thread Penny Zheng
introduced later in the following commits. Signed-off-by: Penny Zheng --- v7 chhanges: - adapt to the previous commits' changes --- v6 change: - fix coding-style - role_str and owner_dom_io shall be defined within the loop --- v5 change: - no change --- v4 change: - no changes --- v3 c

[PATCH v7 6/9] xen/arm: set up shared memory foreign mapping for borrower domain

2022-09-06 Thread Penny Zheng
This commit sets up shared memory foreign mapping for borrower domain. If owner domain is the default dom_io, all shared domain are treated as borrower domain. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v7 change: - no changes --- v6 change: - no change --- v5 change: - no

[PATCH v7 9/9] xen: Add static memory sharing in SUPPORT.md

2022-09-06 Thread Penny Zheng
on ARM, static memory sharing is tech preview, which shall be documented in SUPPORT.md Signed-off-by: Penny Zheng --- v7 changes: - doc refinement --- v6 change: - new commit --- SUPPORT.md | 7 +++ 1 file changed, 7 insertions(+) diff --git a/SUPPORT.md b/SUPPORT.md index 8e040d1c1e

[PATCH v7 4/9] xen/arm: introduce put_page_nr and get_page_nr

2022-09-06 Thread Penny Zheng
introduces a set of new helpers put_page_nr() and get_page_nr() to increment/drop the page reference by nr. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- v6 change: - no change --- v5 change: - no change --- v4 changes: - fix the assert about checking

[PATCH v7 5/9] xen/arm: Add additional reference to owner domain when the owner is allocated

2022-09-06 Thread Penny Zheng
Borrower domain will fail to get a page ref using the owner domain during allocation, when the owner is created after borrower. So here, we decide to get and add the right amount of reference, which is the number of borrowers, when the owner is allocated. Signed-off-by: Penny Zheng Reviewed-by

[PATCH v7 8/9] xen/arm: enable statically shared memory on Dom0

2022-09-06 Thread Penny Zheng
From: Penny Zheng To add statically shared memory nodes in Dom0, user shall put according static shared memory configuration under /chosen node. This commit adds shm-processing function process_shm in construct_dom0 to enable statically shared memory on Dom0. Signed-off-by: Penny Zheng

[PATCH v7 0/9] static shared memory on dom0less system

2022-09-06 Thread Penny Zheng
r more details. Penny Zheng (9): xen/arm: introduce static shared memory xen/arm: assign static shared memory to the default owner dom_io xen/arm: allocate static shared memory to a specific owner domain xen/arm: introduce put_page_nr and get_page_nr xen/arm: Add additional reference to own

[PATCH v7 2/9] xen/arm: assign static shared memory to the default owner dom_io

2022-09-06 Thread Penny Zheng
From: Penny Zheng This commit introduces process_shm to cope with static shared memory in domain construction. DOMID_IO will be the default owner of memory pre-shared among multiple domains at boot time, when no explicit owner is specified. And DOMID_IO is a fake domain and is not described in

[PATCH v7 7/9] xen/arm: create shared memory nodes in guest device tree

2022-09-06 Thread Penny Zheng
following properties: - compatible: compatible = "xen,shared-memory-v1" - reg: the base guest physical address and size of the shared memory region - xen,id: a string that identifies the shared memory region. Signed-off-by: Penny Zheng --- v7 changes: - allocat

[PATCH v7 1/9] xen/arm: introduce static shared memory

2022-09-06 Thread Penny Zheng
From: Penny Zheng This patch series introduces a new feature: setting up static shared memory on a dom0less system, through device tree configuration. This commit parses shared memory node at boot-time, and reserve it in bootinfo.reserved_mem to avoid other use. This commits proposes a new

RE: [PATCH v7 1/9] xen/arm: introduce static shared memory

2022-09-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Wednesday, September 7, 2022 2:01 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk ; Henry Wang > > Subject:

RE: [PATCH v7 7/9] xen/arm: create shared memory nodes in guest device tree

2022-09-07 Thread Penny Zheng
Hi stefano > -Original Message- > From: Stefano Stabellini > Sent: Thursday, September 8, 2022 8:16 AM > To: Julien Grall > Cc: Penny Zheng ; xen-devel@lists.xenproject.org; > Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject:

[PATCH v8 0/9] static shared memory on dom0less system

2022-09-08 Thread Penny Zheng
ps://lore.kernel.org/all/a50d9fde-1d06-7cda-2779-9eea9e1c0...@xen.org/T/) for more details. [1] https://lore.kernel.org/xen-devel/20220908042538.27076-1-henry.w...@arm.com/ Penny Zheng (9): xen/arm: introduce static shared memory xen/arm: assign static shared memory to the default owner dom_io

[PATCH v8 5/9] xen/arm: Add additional reference to owner domain when the owner is allocated

2022-09-08 Thread Penny Zheng
Borrower domain will fail to get a page ref using the owner domain during allocation, when the owner is created after borrower. So here, we decide to get and add the right amount of reference, which is the number of borrowers, when the owner is allocated. Signed-off-by: Penny Zheng Reviewed-by

[PATCH v8 6/9] xen/arm: set up shared memory foreign mapping for borrower domain

2022-09-08 Thread Penny Zheng
This commit sets up shared memory foreign mapping for borrower domain. If owner domain is the default dom_io, all shared domain are treated as borrower domain. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v8 changes: - no change --- v7 change: - no changes --- v6 change: - no

[PATCH v8 4/9] xen/arm: introduce put_page_nr and get_page_nr

2022-09-08 Thread Penny Zheng
introduces a set of new helpers put_page_nr() and get_page_nr() to increment/drop the page reference by nr. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- v8 change - no change --- v7 change: - no change --- v6 change: - no change --- v5 change: - no change

[PATCH v8 8/9] xen/arm: enable statically shared memory on Dom0

2022-09-08 Thread Penny Zheng
From: Penny Zheng To add statically shared memory nodes in Dom0, user shall put according static shared memory configuration under /chosen node. This commit adds shm-processing function process_shm in construct_dom0 to enable statically shared memory on Dom0. Signed-off-by: Penny Zheng

[PATCH v8 9/9] xen: Add static memory sharing in SUPPORT.md

2022-09-08 Thread Penny Zheng
on ARM, static memory sharing is tech preview, which shall be documented in SUPPORT.md Signed-off-by: Penny Zheng Reviewed-by: Michal Orzel Acked-by: Julien Grall --- v8 changes: - no change --- v7 changes: - doc refinement --- v6 change: - new commit --- SUPPORT.md | 7 +++ 1 file

[PATCH v8 3/9] xen/arm: allocate static shared memory to a specific owner domain

2022-09-08 Thread Penny Zheng
introduced later in the following commits. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v8 changes: - no change --- v7 chhanges: - adapt to the previous commits' changes --- v6 change: - fix coding-style - role_str and owner_dom_io shall be defined within the loop --- v5 c

[PATCH v8 1/9] xen/arm: introduce static shared memory

2022-09-08 Thread Penny Zheng
CONFIG_STATIC_SHM to wrap static-shm-related codes, and this option depends on static memory( CONFIG_STATIC_MEMORY). That's because that later we want to reuse a few helpers, guarded with CONFIG_STATIC_MEMORY, like acquire_staticmem_pages, etc, on static shared memory. Signed-off-by: Penny Zheng Review

[PATCH v8 2/9] xen/arm: assign static shared memory to the default owner dom_io

2022-09-08 Thread Penny Zheng
From: Penny Zheng This commit introduces process_shm to cope with static shared memory in domain construction. DOMID_IO will be the default owner of memory pre-shared among multiple domains at boot time, when no explicit owner is specified. And DOMID_IO is a fake domain and is not described in

[PATCH v8 7/9] xen/arm: create shared memory nodes in guest device tree

2022-09-08 Thread Penny Zheng
ffset within the owner virtual machine's shared memory region used for the mapping in the borrower VM. Currently, we provide "xen,offset=<0x0>" as a temprary placeholder. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v8 changes: - Fix missing property

RE: [PATCH v1 06/13] xen/arm: assign shared memory to owner when host address not provided

2023-01-17 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, January 9, 2023 6:58 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v1 06/13] xen/arm:

RE: [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map

2023-01-28 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Thursday, January 19, 2023 11:04 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 11/40] xen/mpu: build

RE: [PATCH v2 13/40] xen/mpu: introduce unified function setup_early_uart to map early UART

2023-01-28 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Wednesday, January 25, 2023 3:09 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 13/40] xen/mpu: in

RE: [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map

2023-01-28 Thread Penny Zheng
Hi Ayan > -Original Message- > From: Ayan Kumar Halder > Sent: Thursday, January 19, 2023 6:19 PM > To: xen-devel@lists.xenproject.org > Cc: Wei Chen ; Penny Zheng > ; Stefano Stabellini ; Julien > Grall ; Bertrand Marquis ; > volodymyr_babc...@epam.com > S

RE: [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map

2023-01-29 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Sunday, January 29, 2023 3:37 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 11/40] xen/mpu: build

RE: [PATCH v2 13/40] xen/mpu: introduce unified function setup_early_uart to map early UART

2023-01-29 Thread Penny Zheng
Hi, Julien > -Original Message- > From: Julien Grall > Sent: Sunday, January 29, 2023 3:43 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 13/40] xe

RE: [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map

2023-01-30 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, January 30, 2023 5:40 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 11/40] xen/mp

RE: [PATCH v2 13/40] xen/mpu: introduce unified function setup_early_uart to map early UART

2023-01-30 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, January 30, 2023 6:00 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 13/40] xe

RE: [PATCH v2 13/40] xen/mpu: introduce unified function setup_early_uart to map early UART

2023-01-31 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, January 31, 2023 5:42 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 13/40] xe

RE: [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map

2023-01-31 Thread Penny Zheng
Hi Julien, > -Original Message- > From: Julien Grall > Sent: Tuesday, January 31, 2023 5:28 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > ayan.kumar.hal...@xilinx.com > Cc: Volodymyr Babchuk > S

RE: [PATCH v2 13/40] xen/mpu: introduce unified function setup_early_uart to map early UART

2023-02-02 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Thursday, February 2, 2023 3:27 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 13/40] xen/mpu: in

RE: [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map

2023-02-02 Thread Penny Zheng
Hi Julien, > -Original Message- > From: Julien Grall > Sent: Thursday, February 2, 2023 2:57 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > ayan.kumar.hal...@xilinx.com > Cc: Volodymyr Babchuk >

RE: [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map

2023-02-02 Thread Penny Zheng
Hi, Julien > -Original Message- > From: Julien Grall > Sent: Thursday, February 2, 2023 6:58 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > ayan.kumar.hal...@xilinx.com > Cc: Volodymyr Babchuk >

RE: [PATCH v2 15/40] xen/arm: move MMU-specific memory management code to mm_mmu.c/mm_mmu.h

2023-02-06 Thread Penny Zheng
Hi, > -Original Message- > From: Julien Grall > Sent: Monday, February 6, 2023 5:30 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 15/40] xen/arm:

RE: [PATCH v2 16/40] xen/arm: introduce setup_mm_mappings

2023-02-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, February 6, 2023 5:32 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 1

RE: [PATCH v2 19/40] xen/mpu: populate a new region in Xen MPU mapping table

2023-02-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, February 6, 2023 5:46 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 19/40] xen/mp

RE: [PATCH v2 20/40] xen/mpu: plump early_fdt_map in MPU systems

2023-02-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, February 6, 2023 6:11 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 20/40] xen/mpu

RE: [PATCH v1 01/13] xen/arm: re-arrange the static shared memory region

2023-02-14 Thread Penny Zheng
> -Original Message- > From: Stewart Hildebrand > Sent: Wednesday, February 8, 2023 4:55 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > > Subject: Re: [

[PATCH v2 1/8] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2023-02-22 Thread Penny Zheng
Function parameters {addr_cells,size_cells} are stale parameters in assign_shared_memory, so we shall remove them. Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- xen/arch/arm/domain_build.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/a

[PATCH V2 0/8] Follow-up static shared memory PART I

2023-02-22 Thread Penny Zheng
1] https://lore.kernel.org/all/20220908135513.1800511-1-penny.zh...@arm.com/ [2] https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/xen%2Cshared-memory.txt Penny Zheng (8): xen/arm: remove stale addr_cells/size_cells in assign_shared_memory xen/arm: re-define a set

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

2023-02-22 Thread Penny Zheng
tructure 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 --- v1 -> v2: - As the original "struct shm_membank" was m

[PATCH v2 3/8] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-02-22 Thread Penny Zheng
rs. This commit defines callback "retrieve_meminfo" for data structure "struct meminfo". Signed-off-by: Penny Zheng --- v1 -> v2: - define a set of MACRO helpers to access common fields in data structure of "meminfo" type. "struct meminfo" is one of them, and

[PATCH v2 4/8] xen/arm: use paddr_assigned to indicate whether host address is provided

2023-02-22 Thread Penny Zheng
nd clear, we extract codes about parsing "xen,shared-mem" property from function "process_shm" and move them into a new helper "parse_shm_property". Signed-off-by: Penny Zheng --- v1 -> v2 - In order to get allocated banked host memory info during domain creation,

[PATCH v2 6/8] xen/arm: remove shm holes for extended regions

2023-02-22 Thread Penny Zheng
use "remove_shm_from_rangeset" to remove static shm. For direct-map domain with iommu off, as static shm has already been taken care of through reserved memory banks, we do nothing. Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- xen/arch/arm/domain_build.c | 94 +++

[PATCH v2 5/8] xen/arm: support static shared memory when host address not provided

2023-02-22 Thread Penny Zheng
m_memnode" as function parameter to replace them all, to make codes more clear and tidy. Signed-off-by: Penny Zheng --- v1 -> v2: - combine commits 4 - 6 in Serie 1 - Adapt to changes of introducing "struct shm_memnode" --- xen/arch/arm/domain_build.c | 222 ++

[PATCH v2 8/8] xen/docs: refine docs about static shared memory

2023-02-22 Thread Penny Zheng
em-1", not "0x1". Signed-off-by: Penny Zheng --- v1 -> v2: - no new changes --- docs/misc/arm/device-tree/booting.txt | 52 --- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-

[PATCH v2 7/8] xen/p2m: put reference for superpage

2023-02-22 Thread Penny Zheng
references for foreign superpages. Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- xen/arch/arm/p2m.c | 60 +- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 948f199d84..e8fa61f

RE: [PATCH v6 2/9] xen: do not free reserved memory into heap

2022-06-12 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, June 9, 2022 5:22 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk ; Andrew Cooper > ; George Dunlap ;

RE: [PATCH v4 2/8] xen/arm: allocate static shared memory to the default owner dom_io

2022-06-17 Thread Penny Zheng
Hi Jan Sorry about the late reply, got sidetracked a few weeks. > -Original Message- > From: Jan Beulich > Sent: Wednesday, May 18, 2022 2:36 PM > To: Penny Zheng > Cc: Wei Chen ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > ;

[PATCH v7 2/9] xen: do not free reserved memory into heap

2022-06-19 Thread Penny Zheng
freeing memory resource, so let's drop the __init flag. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- v7 changes: - protect free_staticmem_pages with heap_lock to match its reverse function acquire_staticmem_pages --- v6 changes: - adapt to PGC_static - remove #ifdef aroud fun

[PATCH v7 3/9] xen: update SUPPORT.md for static allocation

2022-06-19 Thread Penny Zheng
SUPPORT.md doesn't seem to explicitly say whether static memory is supported, so this commit updates SUPPORT.md to add feature static allocation tech preview for now. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v7 changes: - no change --- v6 changes: - use domain inste

[PATCH v7 0/9] populate/unpopulate memory when domain on static allocation

2022-06-19 Thread Penny Zheng
page_list - forbid non-zero-order requests in populate_physmap - let is_domain_static return ((void)(d), false) on x86 - fix coding style Penny Zheng (9): xen/arm: rename PGC_reserved to PGC_static xen: do not free reserved memory into heap xen: update SUPPORT.md for static allocation xen: d

[PATCH v7 1/9] xen/arm: rename PGC_reserved to PGC_static

2022-06-19 Thread Penny Zheng
PGC_reserved could be ambiguous, and we have to tell what the pages are reserved for, so this commit intends to rename PGC_reserved to PGC_static, which clearly indicates the page is reserved for static memory. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- v7 changes: - no change --- v6

[PATCH v7 4/9] xen: do not merge reserved pages in free_heap_pages()

2022-06-19 Thread Penny Zheng
result. So in order to avoid the above scenario, this commit updates free_heap_pages() to check whether the predecessor and/or successor has PGC_reserved set, when trying to merge the about-to-be-freed chunk with the predecessor and/or successor. Suggested-by: Julien Grall Signed-off-by: Penny Zheng

[PATCH v7 5/9] xen: add field "flags" to cover all internal CDF_XXX

2022-06-19 Thread Penny Zheng
With more and more CDF_xxx internal flags in and to save the space, this commit introduces a new field "flags" in struct domain to store CDF_* internal flags directly. Another new CDF_xxx will be introduced in the next patch. Signed-off-by: Penny Zheng Acked-by: Julien Grall ---

<    1   2   3   4   5   6   7   8   9   10   >