RE: [PATCH] xen/arm: Add Cortex-A73 erratum 858921 workaround

2020-11-10 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Monday, November 9, 2020 8:04 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Andre Przywara ; Bertrand Marquis > ; Wei Chen ; Kaly Xin > ; nd > Subject: Re: [PATCH] xen/

RE: [PATCH] design: design doc for shared memory on a dom0less system

2022-03-10 Thread Penny Zheng
Hi Julien Sorry for the late response, Since I'm considering sending the code together for better understanding. > -Original Message- > From: Julien Grall > Sent: Wednesday, January 26, 2022 6:58 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabel

[PATCH v1 00/13] Static shared memory on dom0less system

2022-03-10 Thread Penny Zheng
r more details. Penny Zheng (13): xen/arm: introduce static shared memory xen/arm: introduce a special domain DOMID_SHARED xen/arm: allocate static shared memory to dom_shared xen/arm: add P2M type parameter in guest_physmap_add_pages xen/arm: introduce get_pages_from_gfn xen/arm: set up

[PATCH v1 02/13] xen/arm: introduce a special domain DOMID_SHARED

2022-03-10 Thread Penny Zheng
From: Penny Zheng In case to own statically shared pages when owner domain is not explicitly defined, this commits propose a special domain DOMID_SHARED, and we assign it 0x7FF5, as one of the system domains. Statically shared memory reuses the same way of initialization with static memory

[PATCH v1 04/13] xen/arm: add P2M type parameter in guest_physmap_add_pages

2022-03-10 Thread Penny Zheng
From: Penny Zheng In order to cover the scenario where users intend to set up guest p2m foreign mapping with nr_pages, this commit adds a new P2M type parameter in guest_physmap_add_pages. Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c| 5 +++-- xen/arch/arm/include/asm/p2m.h

[PATCH v1 05/13] xen/arm: introduce get_pages_from_gfn

2022-03-10 Thread Penny Zheng
From: Penny Zheng In order to getting statically shared pages based on gfn with nr_pages, this commit introduces a new helper get_pages_from_gfn to acquire a set of pages based on [gfn, gfn + nr_gfns), with the same P2M type. Signed-off-by: Penny Zheng --- xen/arch/arm/include/asm/p2m.h | 37

[PATCH v1 06/13] xen/arm: set up shared memory foreign mapping for borrower domain

2022-03-10 Thread Penny Zheng
From: Penny Zheng This commits introduces a new helper guest_physmap_add_shm to set up shared memory foreign mapping for borrower domain. Firstly it should get and take reference of statically shared pages from owner dom_shared. Then it will setup P2M foreign memory map of these statically

[PATCH v1 03/13] xen/arm: allocate static shared memory to dom_shared

2022-03-10 Thread Penny Zheng
From: Penny Zheng This commit introduces process_shm to cope with static shared memory in domain construction. This commit only considers allocating static shared memory to dom_shared when owner domain is not explicitly defined in device tree, the other scenario will be covered in the following

[PATCH v1 08/13] xen/arm: destroy static shared memory when de-construct domain

2022-03-10 Thread Penny Zheng
From: Penny Zheng This commit introduces a new helper destroy_domain_shm to destroy static shared memory at domain de-construction. This patch only considers the scenario where the owner domain is the default dom_shared, for user-defined owner domain, it will be covered in the following patches

[PATCH v1 07/13] xen/arm: create shared memory nodes in guest device tree

2022-03-10 Thread Penny Zheng
From: Penny Zheng We expose the shared memory to the domU using the "xen,shared-memory-v1" reserved-memory binding. See Documentation/devicetree/bindings/reserved-memory/xen,shared-memory.txt in Linux for the corresponding device tree binding. To save the cost of re-parsing shared mem

[PATCH v1 01/13] xen/arm: introduce static shared memory

2022-03-10 Thread Penny Zheng
From: Penny Zheng This patch serie 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. Signed-off-by: Penny Zheng

[PATCH v1 09/13] xen/arm: enable statically shared memory on Dom0

2022-03-10 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 v1 10/13] xen/arm: allocate static shared memory to a specific owner domain

2022-03-10 Thread Penny Zheng
From: Penny Zheng If owner property is defined, then owner domain of a static shared memory region is not the default dom_shared anymore, but a specific domain. This commit implements allocating static shared memory to a specific domain when owner property is defined. Signed-off-by: Penny

[PATCH v1 13/13] xen/arm: unmap foreign memory mapping when destroyed domain is owner domain

2022-03-10 Thread Penny Zheng
From: Penny Zheng When destroyed domain is an owner domain of a static shared memory region, then we need to ensure that all according borrower domains shall not have the access to this static shared memory region too. This commit covers above scenario through unmapping all borrowers' acco

[PATCH v1 11/13] xen/arm: store shm-info for deferred foreign memory map

2022-03-10 Thread Penny Zheng
From: Penny Zheng In a few scenarios where owner domain, is defined after borrower domain in device tree configuration, then statically shared pages haven't been properly allocated if borrower domain tries to do foreign memory map during domain construction. In order to cover such scenari

[PATCH v1 12/13] xen/arm: defer foreign memory map in shm_init_late

2022-03-10 Thread Penny Zheng
From: Penny Zheng This commit introduces a new helper shm_init_late to implement deferred foreign memory mapping of static shared memory. Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c | 51 +++ xen/arch/arm/include/asm/domain.h | 1 + xen/arch

RE: [PATCH v1 02/13] xen/arm: introduce a special domain DOMID_SHARED

2022-03-17 Thread Penny Zheng
Hi Stefano > -Original Message- > From: Stefano Stabellini > Sent: Friday, March 18, 2022 9:59 AM > To: Penny Zheng > Cc: xen-devel@lists.xenproject.org; nd ; Penny Zheng > ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > ; Andr

RE: [PATCH v1 03/13] xen/arm: allocate static shared memory to dom_shared

2022-03-18 Thread Penny Zheng
Hi Stefano > -Original Message- > From: Stefano Stabellini > Sent: Friday, March 18, 2022 10:00 AM > To: Penny Zheng > Cc: xen-devel@lists.xenproject.org; nd ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > > Subject: R

RE: [PATCH v1 06/13] xen/arm: set up shared memory foreign mapping for borrower domain

2022-03-28 Thread Penny Zheng
Hi Stefano Sorry for the late response, got sidetracked an emergency issue. ;/ > -Original Message- > From: Stefano Stabellini > Sent: Friday, March 18, 2022 10:00 AM > To: Penny Zheng > Cc: xen-devel@lists.xenproject.org; nd ; Stefano Stabellini > ; Julien Grall

RE: [PATCH v1 11/13] xen/arm: store shm-info for deferred foreign memory map

2022-03-29 Thread Penny Zheng
Hi Stefano > -Original Message- > From: Stefano Stabellini > Sent: Friday, March 18, 2022 10:01 AM > To: Penny Zheng > Cc: xen-devel@lists.xenproject.org; nd ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > > Subject: Re: [PAT

[PATCH 0/5] populate/unpopulate memory when domain on static

2022-03-30 Thread Penny Zheng
never go back to heap. This patch serie intends to fix this issue, by keeping page allocated and storing it in page list when unpopulating memory, and retrieving page from page list when populating memory. Penny Zheng (5): xen/arm: field "flags" to cover all internal CDF_XXX

[PATCH v1 2/5] xen/arm: introduce CDF_staticmem

2022-03-30 Thread Penny Zheng
In order to have an easy and quick way to find out whether this domain is on static allocation, this commit introduces a new flag CDF_staticmem and a new helper is_domain_on_static_allocation. Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c | 5 - xen/arch/arm/include/asm

[PATCH v1 1/5] xen/arm: field "flags" to cover all internal CDF_XXX

2022-03-30 Thread Penny Zheng
With more and more CDF_xxx internal flags in and to save the space, this commit introduces a new field "flags" to store CDF_* internal flags directly. Another new CDF_xxx will be introduced in the next patch. Signed-off-by: Penny Zheng --- xen/arch/arm/domain.c | 3 ++-

[PATCH v1 3/5] xen/arm: unpopulate memory when domain on static allocation

2022-03-30 Thread Penny Zheng
to heap. For above purpose, this commit tries to keep page allocated and store it in page list d->resv_page_list on guest_remove_page, when domain on static allocation. Signed-off-by: Penny Zheng --- xen/common/domain.c | 4 xen/common/memory.c | 22 +-

[PATCH v1 5/5] xen/arm: no need to store pages in resv_page_list when domain is directly mapped

2022-03-30 Thread Penny Zheng
When domain on static allocation and is directly mapped, in terms of GPA == HPA(guest physical address == host physical address), we could use mfn_to_page() to easily find the page, so there is no need to store pages in resv_page_list. Signed-off-by: Penny Zheng --- xen/common/memory.c | 5

[PATCH v1 4/5] xen/arm: retrieve reserved pages on populate_physmap

2022-03-30 Thread Penny Zheng
When domain on static allocation populates memory through populate_physmap, other than allocating from heap, it shall allocate from resv_page_list to make sure that all guest RAM are still restricted in statically configured regions. Signed-off-by: Penny Zheng --- xen/common/memory.c | 20

RE: [PATCH v1 3/5] xen/arm: unpopulate memory when domain on static allocation

2022-03-30 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Wednesday, March 30, 2022 5:53 PM > To: Penny Zheng > Cc: Wei Chen ; Henry Wang ; > Andrew Cooper ; George Dunlap > ; Julien Grall ; Stefano Stabellini > ; Wei Liu ; xen- > de...@lists.xenproject.org &

RE: [PATCH v1 4/5] xen/arm: retrieve reserved pages on populate_physmap

2022-03-30 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Wednesday, March 30, 2022 5:59 PM > To: Penny Zheng > Cc: Wei Chen ; Henry Wang ; > Andrew Cooper ; George Dunlap > ; Julien Grall ; Stefano Stabellini > ; Wei Liu ; xen- > de...@lists.xenproject.org &

RE: [PATCH v1 3/5] xen/arm: unpopulate memory when domain on static allocation

2022-03-31 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Thursday, March 31, 2022 3:06 PM > To: Penny Zheng > Cc: Wei Chen ; Henry Wang ; > Andrew Cooper ; George Dunlap > ; Julien Grall ; Stefano Stabellini > ; Wei Liu ; xen- > de...@lists.xenproject.org &

RE: [PATCH v1 3/5] xen/arm: unpopulate memory when domain on static allocation

2022-04-02 Thread Penny Zheng
Hi Julien and Jan > -Original Message- > From: Julien Grall > Sent: Saturday, April 2, 2022 2:54 AM > To: Penny Zheng ; Jan Beulich > Cc: Wei Chen ; Henry Wang ; > Andrew Cooper ; George Dunlap > ; Stefano Stabellini ; Wei > Liu ; xen-devel@lists.xenproject.org

RE: [PATCH v1 02/13] xen/arm: introduce a special domain DOMID_SHARED

2022-04-15 Thread Penny Zheng
Hi Julien and Stefano > -Original Message- > From: Julien Grall > Sent: Saturday, April 9, 2022 5:12 PM > To: Stefano Stabellini ; Jan Beulich > > Cc: Penny Zheng ; nd ; Penny Zheng > ; Bertrand Marquis > ; Volodymyr Babchuk > ; Andrew Cooper > ; George

RE: [PATCH v1 02/13] xen/arm: introduce a special domain DOMID_SHARED

2022-04-15 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Friday, March 18, 2022 4:53 PM > To: Penny Zheng > Cc: nd ; Penny Zheng > ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > ; Andrew Cooper > ; George

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

2022-04-18 Thread Penny Zheng
freeing memory resource, so let's drop the __init flag. Signed-off-by: Penny Zheng --- v2 changes: - new commit --- xen/common/page_alloc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 319029140f..9a3e9

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

2022-04-18 Thread Penny Zheng
al" 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 (6): xen/arm: do not free reserved memory into heap xen/arm: do n

[PATCH v2 2/6] xen/arm: do not merge reserved pages in free_heap_pages()

2022-04-18 Thread Penny Zheng
, when trying to merge the about-to-be-freed chunk with the predecessor and/or successor. Signed-off-by: Penny Zheng --- v2 changes: - new commit --- xen/common/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 9a3e9c1328

[PATCH v2 5/6] xen/arm: unpopulate memory when domain is static

2022-04-18 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 --- v2 changes: - put reserved pages on resv_page_list after having taken them off the &qu

[PATCH v2 3/6] xen: add field "flags" to cover all internal CDF_XXX

2022-04-18 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 --- v2 changes: - let "fla

[PATCH v2 4/6] xen/arm: introduce CDF_staticmem

2022-04-18 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_static to tell. Signed-off-by: Penny Zheng --- v2 changes: - change name from "is_domain_on_static_allocatio

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

2022-04-18 Thread Penny Zheng
acquire_reserved_page to make it work. Signed-off-by: Penny Zheng --- v2 changes: - 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 --- xen/common/memory.c | 29

RE: [PATCH V2 0/6] populate/unpopulate memory when domain on static

2022-04-19 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, April 19, 2022 4:47 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini ; > Wei > Liu ; Bertrand Marquis ; > Volodymyr Babchuk ; xen

RE: [PATCH v2 1/6] xen/arm: do not free reserved memory into heap

2022-04-19 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, April 19, 2022 4: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 v1 06/13] xen/arm: set up shared memory foreign mapping for borrower domain

2022-04-20 Thread Penny Zheng
Hi julien > -Original Message- > From: Julien Grall > Sent: Saturday, April 9, 2022 6:59 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: Re: [PATCH v1 06/13] xen/arm: set

RE: [PATCH v1 06/13] xen/arm: set up shared memory foreign mapping for borrower domain

2022-04-20 Thread Penny Zheng
Hi > -Original Message- > From: Julien Grall > Sent: Saturday, April 9, 2022 5:31 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: Re: [PATCH v1 06/13] xen/arm: set

RE: [PATCH v1 08/13] xen/arm: destroy static shared memory when de-construct domain

2022-04-21 Thread Penny Zheng
Hi, julien > -Original Message- > From: Julien Grall > Sent: Saturday, April 9, 2022 5:26 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: Re: [PATCH v1 08/13] xen/arm: dest

RE: [PATCH v2 5/6] xen/arm: unpopulate memory when domain is static

2022-04-24 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, April 19, 2022 5:11 PM > To: Penny Zheng > Cc: Wei Chen ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > ; Andrew Cooper > ; George Dunlap ; > Wei Liu ;

RE: [PATCH v2 5/6] xen/arm: unpopulate memory when domain is static

2022-04-25 Thread Penny Zheng
Hi, jan > -Original Message- > From: Jan Beulich > Sent: Monday, April 25, 2022 4:01 PM > To: Penny Zheng > Cc: Wei Chen ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > ; Andrew Cooper > ; George Dunlap ; > Wei Liu ;

RE: [PATCH 03/11] xen/arm: introduce 1:1 direct-map for domUs

2021-10-07 Thread Penny Zheng
Hi Julien So sorry for taking so long to respond. Just being back from the long National Day holidays. đŸ˜‰ > -Original Message- > From: Julien Grall > Sent: Thursday, September 23, 2021 6:36 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org

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

2021-10-09 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, September 23, 2021 7:14 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 09/11] xen/arm: if 1:1 dire

RE: [PATCH 10/11] xen/arm: device assignment on 1:1 direct-map domain

2021-10-09 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, September 23, 2021 7:27 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 10/11] xen/arm: device assi

RE: [PATCH 10/11] xen/arm: device assignment on 1:1 direct-map domain

2021-10-11 Thread Penny Zheng
Hi julien > -Original Message- > From: Julien Grall > Sent: Monday, October 11, 2021 7:14 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 10/11] xen/arm: device assi

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

2021-10-11 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, October 11, 2021 6:49 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 09/11] xen/arm: if 1:1 direct-ma

RE: [PATCH 10/11] xen/arm: device assignment on 1:1 direct-map domain

2021-10-13 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, October 11, 2021 7:14 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 10/11] xen/arm: device assi

RE: [PATCH 10/11] xen/arm: device assignment on 1:1 direct-map domain

2021-10-13 Thread Penny Zheng
> -Original Message- > From: Penny Zheng > Sent: Wednesday, October 13, 2021 3:44 PM > To: Julien Grall ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: RE: [PATCH 10/11] xen/arm: device assignment on

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

2021-10-13 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Thursday, October 14, 2021 2:01 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH 09/11] xen/arm: if 1:1 direct-ma

[PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-14 Thread Penny Zheng
XEN_DOMCTL_CDF_directmap is set. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- CC: andrew.coop...@citrix.com CC: jbeul...@suse.com CC: George Dunlap CC: Ian Jackson CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/arm/domain.c| 3 ++- xen/arch/arm/domain_bu

[PATCH v2 0/6] direct-map memory map

2021-10-14 Thread Penny Zheng
Cases where domU needs direct-map memory map: * IOMMU not present in the system. * IOMMU disabled if it doesn't cover a specific device and all the guests are trusted. Thinking a mixed scenario, where a few devices with IOMMU and a few without, then guest DMA security still could not be totally

[PATCH v2 2/6] xen/arm: introduce direct-map for domUs

2021-10-14 Thread Penny Zheng
o introduces a new helper allocate_static_memory_11 to allocate static memory as guest RAM for direct-map domain. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- docs/misc/arm/device-tree/booting.txt | 10 ++ xen/arch/arm/domain_build.c | 215 -- 2 files chang

[PATCH v2 3/6] xen/arm: if direct-map domain use native addresses for GICv2

2021-10-14 Thread Penny Zheng
base 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 --- xen/arch/arm

[PATCH v2 5/6] xen/arm: if direct-map domain use native UART address and IRQ number for vPL011

2021-10-14 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 --- xen/arch/arm/domain_build.c | 41 ++- xen/arch/arm/vpl011.c| 54

[PATCH v2 6/6] xen/docs: add a document to explain how to do passthrough without IOMMU

2021-10-14 Thread Penny Zheng
From: Stefano Stabellini Make sure to start with a WARNING about security. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- docs/misc/arm/passthrough-noiommu.txt | 54 +++ 1 file changed, 54 insertions(+) create mode 100644 docs/misc/arm/passthrough

[PATCH v2 4/6] xen/arm: if direct-map domain use native addresses for GICv3

2021-10-14 Thread Penny Zheng
, this patch introduces a new helper "is_domain_use_host_layout()" that wraps both two check "is_domain_direct_mapped(d) || is_hardware_domain(d)" for more flexible useage. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- xen/arch/arm/

RE: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-15 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Friday, October 15, 2021 4:47 PM > To: Penny Zheng > Cc: Wei Chen ; Bertrand Marquis > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH v2 1/6] xen: introduce

RE: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-15 Thread Penny Zheng
Hi julien > -Original Message- > From: Julien Grall > Sent: Friday, October 15, 2021 4:57 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Wei Chen ; Bertrand Marquis > > Subject: Re: [PATCH v2 1/6] xen: introduce XEN_DOMC

RE: [PATCH v2 4/6] xen/arm: if direct-map domain use native addresses for GICv3

2021-10-20 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Wednesday, October 20, 2021 7:11 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Wei Chen ; Bertrand Marquis > > Subject: Re: [PATCH v2 4/6] xen/arm: if dire

RE: static-mem preventing dom0 from booting

2021-11-04 Thread Penny Zheng
Hi Stefano > -Original Message- > From: Stefano Stabellini > Sent: Friday, November 5, 2021 9:36 AM > To: Penny Zheng > Cc: sstabell...@kernel.org; xen-devel@lists.xenproject.org > Subject: static-mem preventing dom0 from booting > > Hi Penny, > > I am

RE: static-mem preventing dom0 from booting

2021-11-04 Thread Penny Zheng
Hi stefano > -Original Message- > From: Penny Zheng > Sent: Friday, November 5, 2021 11:23 AM > To: Stefano Stabellini > Cc: xen-devel@lists.xenproject.org; Wei Chen > Subject: RE: static-mem preventing dom0 from booting > > Hi Stefano > > > --

RE: static-mem preventing dom0 from booting

2021-11-07 Thread Penny Zheng
Hi Stefano > -Original Message- > From: Stefano Stabellini > Sent: Saturday, November 6, 2021 7:03 AM > To: Stefano Stabellini > Cc: Penny Zheng ; xen-devel@lists.xenproject.org; > Wei Chen ; Bertrand Marquis > > Subject: RE: static-mem preventing dom0 from bo

RE: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-11-09 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Friday, October 15, 2021 4:57 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Wei Chen ; Bertrand Marquis > > Subject: Re: [PATCH v2 1/6] xen: introduce XEN_DOMC

RE: [PATCH v3] xen/arm: don't assign domU static-mem to dom0 as reserved-memory

2021-11-11 Thread Penny Zheng
Hi Stefano > -Original Message- > From: Stefano Stabellini > Sent: Thursday, November 11, 2021 4:18 AM > To: jul...@xen.org > Cc: sstabell...@kernel.org; Penny Zheng ; Bertrand > Marquis ; Wei Chen ; > i...@xenproject.org; volodymyr_babc...@epam.com; xen- > de

[PATCH v3 02/10] xen/arm: avoid setting XEN_DOMCTL_CDF_iommu when IOMMU off

2021-11-15 Thread Penny Zheng
From: Stefano Stabellini This commit avoids setting XEN_DOMCTL_CDF_iommu when the IOMMU is absent/disabled, otherwise xen will fail later when handling device assignment. Signed-off-by: Penny Zheng Signed-off-by: Stefano Stabellini --- v3 changes: - new commit, split from the original "[

[PATCH v3 00/10] direct-map memory map

2021-11-15 Thread Penny Zheng
ree node - error out if the domain is direct-mapped and the IRQ is not found - harden the code and add a check/comment when the hardware UART region is smaller than CUEST_VPL011_SIZE. Penny Zheng (4): xen/arm: introduce new helper parse_static_mem_prop and ... xen/arm: introduce direct-map f

[PATCH v3 05/10] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory

2021-11-15 Thread Penny Zheng
Helper allocate_static_memory is not meant to be reachable when built with !CONFIG_STATIC_MEMORY, so this commit adds ASSERT_UNREACHABLE in it to catch potential misuse. Signed-off-by: Penny Zheng --- v3 changes: - new commit --- xen/arch/arm/domain_build.c | 1 + 1 file changed, 1 insertion

[PATCH v3 01/10] xen: introduce XEN_DOMCTL_CDF_INTERNAL_directmap

2021-11-15 Thread Penny Zheng
r the flag XEN_DOMCTL_CDF_INTERNAL_directmap is set. Signed-off-by: Penny Zheng Signed-off-by: Stefano Stabellini --- CC: andrew.coop...@citrix.com CC: jbeul...@suse.com CC: George Dunlap CC: Ian Jackson CC: Wei Liu CC: "Roger Pau Monné" --- v2 changes - remove the introduce of interna

[PATCH v3 04/10] xen/arm: introduce direct-map for domUs

2021-11-15 Thread Penny Zheng
the domain configuration. Signed-off-by: Penny Zheng Signed-off-by: Stefano Stabellini --- v2 changes: - split the common codes into two helpers: parse_static_mem_prop and acquire_static_memory_bank to deduce complexity. - introduce a new helper allocate_static_memory_11 for allocating static mem

[PATCH v3 10/10] xen/docs: Document how to do passthrough without IOMMU

2021-11-15 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 --- docs/misc/arm/passthrough-noiommu.txt | 52 +++ 1 file changed, 52 insertions(+) create mode

[PATCH v3 06/10] xen/arm: if direct-map domain use native addresses for GICv2

2021-11-15 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: Penny Zheng Signed-off-by: Stefano Stabellini --- v2 changes - combine all

[PATCH v3 07/10] xen/arm: gate make_gicv3_domU_node with CONFIG_GICV3

2021-11-15 Thread Penny Zheng
This commit gates function make_gicv3_domU_node with CONFIG_GICV3, and also adds ASSERT_UNREACHABLE to catch any misuse. Signed-off-by: Penny Zheng --- v3 changes: - new commit --- xen/arch/arm/domain_build.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/arch/arm/domain_build.c

[PATCH v3 08/10] xen/arm: if direct-map domain use native addresses for GICv3

2021-11-15 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: Penny Zheng Signed-off-by: Stefano Stabellini --- v2 changes: - remove redistributor

[PATCH v3 03/10] xen/arm: introduce new helper parse_static_mem_prop and acquire_static_memory_bank

2021-11-15 Thread Penny Zheng
extracts common codes into two new helpers parse_static_mem_prop and acquire_static_memory_bank. Signed-off-by: Penny Zheng --- v3 changes: - new commit to move the split off of the code outside in a separate patch --- xen/arch/arm/domain_build.c | 100 +++- 1 file

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

2021-11-15 Thread Penny Zheng
number: instead of always using GUEST_VPL011_SPI, try to reuse the physical SPI number if possible. Signed-off-by: Penny Zheng Signed-off-by: Stefano Stabellini --- v2 changes: - explain why vpl011 initialization before creating its device tree node - error out if the domain is direct-mapped and

[PATCH] design: design doc for shared memory on a dom0less system

2022-01-26 Thread Penny Zheng
This commit provides a design doc for static shared memory on a dom0less system. Signed-off-by: Penny Zheng --- design/shm-dom0less.md | 182 + 1 file changed, 182 insertions(+) create mode 100644 design/shm-dom0less.md diff --git a/design/shm

[PATCH v5 00/11] direct-map memory map

2022-01-26 Thread Penny Zheng
s fine to assign a non-DMA capable device when IOMMU and direct-map both off - remove redistributor accessor - introduce new helper "is_domain_use_host_layout()" - explain why vpl011 initialization before creating its device tree node - error out if the domain is direct-mapped and the IRQ is not

[PATCH v5 01/11] xen: introduce internal CDF_xxx flags for domain creation

2022-01-26 Thread Penny Zheng
ocate bit 0 as CDF_privileged: whether a domain is privileged or not. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Reviewed-by: Jan Beulich Tested-by: Stefano Stabellini --- v4 changes: - new commit --- v5 changes - remove const constraint --- xen/arch/arm/domain_build.c |

[PATCH v5 04/11] xen/arm: introduce new helper parse_static_mem_prop and acquire_static_memory_bank

2022-01-26 Thread Penny Zheng
common codes into two new helpers parse_static_mem_prop and acquire_static_memory_bank. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Tested-by: Stefano Stabellini --- v3 changes: - new commit, split from the original "[PATCH v2 2/6] xen/arm: introduce direct-map for domUs&qu

[PATCH v5 02/11] xen: introduce CDF_directmap

2022-01-26 Thread Penny Zheng
is_domain_direct_mapped. For now, direct-map is only available when statically allocated memory is used for the domain, that is, "xen,static-mem" must be also defined in the domain configuration. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Acked-by: Jan Beulich Tested-b

[PATCH v5 06/11] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory

2022-01-26 Thread Penny Zheng
Helper allocate_static_memory is not meant to be reachable when built with !CONFIG_STATIC_MEMORY, so this commit adds ASSERT_UNREACHABLE in it to catch potential misuse. Signed-off-by: Penny Zheng Acked-by: Julien Grall Tested-by: Stefano Stabellini --- v3 changes: - new commit --- v4 changes

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

2022-01-26 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 v5 07/11] xen/arm: if direct-map domain use native addresses for GICv2

2022-01-26 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 Tested-by: Stefano Stabellini

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

2022-01-26 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 Tested-by: Stefano Stabellini --- v2 changes: - explain why vpl011 initialization before creating its device tree node - error out if

[PATCH v5 03/11] xen/arm: avoid setting XEN_DOMCTL_CDF_iommu when IOMMU off

2022-01-26 Thread Penny Zheng
: Stefano Stabellini Signed-off-by: Penny Zheng Tested-by: Stefano Stabellini --- v3 changes: - new commit, split from the original "[PATCH v2 2/6] xen/arm: introduce direct-map for domUs" --- v4 changes: - explain briefly in the commit message why we want to do device assignment wit

[PATCH v5 05/11] xen/arm: introduce direct-map for domUs

2022-01-26 Thread Penny Zheng
t memory layout This commit introduces a new helper assign_static_memory_11 to allocate static memory as guest RAM for direct-map domain. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Tested-by: Stefano Stabellini --- v2 changes: - split the common codes into two helpers: parse_stat

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

2022-01-26 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 Tested-by: Stefano Stabellini --- v2 changes: - nothing changed --- v3 changes: - nothing changed --- v4 changes: - nothing

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

2022-01-26 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 Tested-by: Stefano Stabellini ---

[PATCH v6 02/11] xen: introduce CDF_directmap

2022-02-13 Thread Penny Zheng
is_domain_direct_mapped. For now, direct-map is only available when statically allocated memory is used for the domain, that is, "xen,static-mem" must be also defined in the domain configuration. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Acked-by: Jan Beulich Tested-b

[PATCH v6 01/11] xen: introduce internal CDF_xxx flags for domain creation

2022-02-13 Thread Penny Zheng
ocate bit 0 as CDF_privileged: whether a domain is privileged or not. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Reviewed-by: Jan Beulich Reviewed-by: Julien Grall Tested-by: Stefano Stabellini --- v4 changes: - new commit --- v5 changes - remove const constraint --- v

[PATCH v6 00/11] direct-map memory map

2022-02-13 Thread Penny Zheng
creating its device tree node - error out if the domain is direct-mapped and the IRQ is not found - harden the code and add a check/comment when the hardware UART region is smaller than CUEST_VPL011_SIZE. Penny Zheng (4): xen/arm: introduce new helper parse_static_mem_prop and acquire_stat

[PATCH v6 03/11] xen/arm: Allow device-passthrough even the IOMMU is off

2022-02-13 Thread Penny Zheng
in so long they are direct-mapped or the device doesn't do DMA. Note that when the IOMMU is disabled, it will be necessary to add xen,force-assign-without-iommu for every device that needs to be assigned. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng Tested-by: Stefano Stabelli

[PATCH v6 04/11] xen/arm: introduce new helper parse_static_mem_prop and acquire_static_memory_bank

2022-02-13 Thread Penny Zheng
common codes into two new helpers parse_static_mem_prop and acquire_static_memory_bank. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Tested-by: Stefano Stabellini --- v3 changes: - new commit, split from the original "[PATCH v2 2/6] xen/arm: introduce direct-map for domUs&qu

[PATCH v6 05/11] xen/arm: introduce direct-map for domUs

2022-02-13 Thread Penny Zheng
t memory layout This commit introduces a new helper assign_static_memory_11 to allocate static memory as guest RAM for direct-map domain. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Tested-by: Stefano Stabellini --- v2 changes: - split the common codes into two helpers: parse_stat

[PATCH v6 06/11] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory

2022-02-13 Thread Penny Zheng
Helper allocate_static_memory is not meant to be reachable when built with !CONFIG_STATIC_MEMORY, so this commit adds ASSERT_UNREACHABLE in it to catch potential misuse. Signed-off-by: Penny Zheng Acked-by: Julien Grall Tested-by: Stefano Stabellini --- v3 changes: - new commit --- v4 changes

  1   2   3   4   5   6   7   8   9   >