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

2022-06-08 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Tuesday, June 7, 2022 5:13 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk ; Andrew Cooper > ; George Dunlap ; > Jan Beuli

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

2022-06-08 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, June 7, 2022 3:58 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 v3 01/10] xen: introduce XEN_DOMCTL_CDF_INTERNAL_directmap

2021-12-07 Thread Penny Zheng
Hi guys > -Original Message- > From: Penny Zheng > Sent: Tuesday, November 16, 2021 1:25 PM > To: Penny Zheng > Cc: nd > Subject: [PATCH v3 01/10] xen: introduce > XEN_DOMCTL_CDF_INTERNAL_directmap > > From: Stefano Stabellini > > This commit i

RE: [PATCH v3 01/10] xen: introduce XEN_DOMCTL_CDF_INTERNAL_directmap

2021-12-07 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, December 7, 2021 5:28 PM > To: Penny Zheng > Cc: Wei Chen ; Bertrand Marquis > ; Michal Orzel ; > jul...@xen.org; xen-devel@lists.xenproject.org > Subject: Re: [PATCH

[PATCH v4 02/11] xen: introduce CDF_directmap

2021-12-19 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 --- v2 changes - remove the in

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

2021-12-19 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 --- v4 changes: - new commit --- xen/arch/arm/domain_build.c | 4 ++-- xen/arch/x86/setup.c| 2 +- xen/common/domain.c | 10 +- xen/comm

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

2021-12-19 Thread Penny Zheng
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 found - harden the code and add a check/comment when the hardware UART region is smaller than CUEST_VPL011_S

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

2021-12-19 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 --- v4 changes: - use mfn_eq() instead, because it is the only value used to indicate

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

2021-12-19 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 --- v2 changes: - split the common codes into two helpers: parse_static_mem_prop and acquire_static_memory_bank to deduce complexity

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

2021-12-19 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 --- v3 changes: - new commit --- xen/arch/arm/domain_build.c | 1 + 1 file

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

2021-12-19 Thread Penny Zheng
: Stefano Stabellini Signed-off-by: Penny Zheng --- 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 without IOMMU. --- xen/arch/arm/domain_b

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

2021-12-19 Thread Penny Zheng
This commit gates function make_gicv3_domU_node with CONFIG_GICV3. Signed-off-by: Penny Zheng --- v4 changes: - remove ASSERT_UNREACHABLE() to avoid breaking compilation on prod build with CONFIG_GICV3=n --- xen/arch/arm/domain_build.c | 4 1 file changed, 4 insertions(+) diff --git a/xen

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

2021-12-19 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 --- v2 changes - combine all

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

2021-12-19 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 --- v2 changes: - remove redistributor

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

2021-12-19 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 --- v2 changes: - explain why vpl011 initialization before creating its device tree node - error out if the domain is direct-mapped and

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

2021-12-19 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

RE: [PATCH v4 02/11] xen: introduce CDF_directmap

2022-01-21 Thread Penny Zheng
Hi Jan Sorry for the late reply. > -Original Message- > From: Jan Beulich > Sent: Friday, January 7, 2022 10:22 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject:

Re: [PATCH v4 00/10] Follow-up static shared memory PART I

2023-11-30 Thread Penny Zheng
Thanks for the reminder! I’ll send the updated version ASAP :) Thanks, Penny > 在 2023年11月30日,18:09,Michal Orzel 写道: > > Hi Penny, > >> On 11/09/2023 12:04, Penny Zheng wrote: >> >> >> Hi Michal >> >>> On 2023/9/11 17:01, Michal Orze

[PATCH v5 01/11] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2023-12-06 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 Reviewed-by: Michal Orzel --- v1 -> v2: - new commit --- v2 -> v3: rebase and no change --- v3 -> v4: rebase and no change --- v4 -> v5: r

[PATCH v5 03/11] xen/arm: re-define a set of data structures for static shared memory region

2023-12-06 Thread Penny Zheng
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 making reserving memory more complex and actually memory infor

[PATCH v5 00/11] Follow-up static shared memory PART I

2023-12-06 Thread Penny Zheng
DOC[2] All above objects have been divided into two parts to complete. And this patch serie is PART I. [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

[PATCH v5 05/11] xen/arm: use paddr_assigned to indicate whether host address is provided

2023-12-06 Thread Penny Zheng
..). Also, to make codes tidy and 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 memo

[PATCH v5 02/11] xen/arm: avoid repetitive checking in process_shm_node

2023-12-06 Thread Penny Zheng
Putting overlap and overflow checking in the loop is causing repetitive operation, so this commit extracts both checking outside the loop. Signed-off-by: Penny Zheng --- v6: new commit --- xen/arch/arm/static-shmem.c | 39 +++-- 1 file changed, 16 insertions

[PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-06 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, a

[PATCH v5 07/11] xen/arm: remove shm holes for extended regions

2023-12-06 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 --- v2 -> v3: - error out non-zero res before rem

[PATCH v5 06/11] xen/arm: support static shared memory when host address not provided

2023-12-06 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" --- v2 -> v3 - fix infinite loop bug and bad indentation

[PATCH v5 08/11] xen/p2m: put reference for superpage

2023-12-06 Thread Penny Zheng
references for foreign superpages. Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- v2 -> v3: - rebase and no change --- v3 -> v4: rebase and no change --- v4 -> v5: rebase and no change --- xen/arch/arm/mmu/p2m.c | 58 +++--- 1 file

[PATCH v5 09/11] xen/docs: refine docs about static shared memory

2023-12-06 Thread Penny Zheng
em-1", not "0x1". Signed-off-by: Penny Zheng --- 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-tree/booting.txt index bbd955e9c2..ac4bad6

[PATCH v5 11/11] xen/arm: create another /memory node for static shm

2023-12-06 Thread Penny Zheng
Static shared memory region shall be described both under /memory and /reserved-memory. We introduce export_shm_memory_node() to create another /memory node to contain the static shared memory ranges. Signed-off-by: Penny Zheng --- v3 -> v4: new commit --- v4 -> v5: rebase and no c

[PATCH v5 10/11] xen/arm: fix duplicate /reserved-memory node in Dom0

2023-12-06 Thread Penny Zheng
insert the shm node along with the copying. And avoiding duplication, we add a checking before make_resv_memory_node(). Signed-off-by: Penny Zheng --- v3 -> v4: new commit --- v4 -> v5: rebase and no change --- xen/arch/arm/domain_build.c | 27 ++--- xen/ar

Re: [PATCH v5 02/11] xen/arm: avoid repetitive checking in process_shm_node

2023-12-07 Thread Penny Zheng
Hi Michal On 2023/12/6 19:35, Michal Orzel wrote: Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: Putting overlap and overflow checking in the loop is causing repetitive operation, so this commit extracts both checking outside the loop. Signed-off-by: Penny Zheng In general the patch

[RFC] design: design doc for 1:1 direct-map

2020-12-07 Thread Penny Zheng
sical == physical) domains. This document is partly based on Stefano Stabellini's patch serie v1: [direct-map DomUs]( https://lists.xenproject.org/archives/html/xen-devel/2020-04/msg00707.html). Signed-off-by: Penny Zheng --- For the part regarding allocating 1:1 direct-map domains with us

RE: [RFC] design: design doc for 1:1 direct-map

2020-12-09 Thread Penny Zheng
Hi Julien Thanks for the nice and detailed comments. (*^▽^*) Here are the replies: > -Original Message- > From: Julien Grall > Sent: Tuesday, December 8, 2020 5:07 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis

RE: [RFC] design: design doc for 1:1 direct-map

2021-01-06 Thread Penny Zheng
> -Original Message- > From: Julien Grall > Sent: Tuesday, January 5, 2021 8:41 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis ; Kaly Xin > ; Wei Chen ; nd ; > Paul Durrant ; famzh...@amazon.com > Subjec

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

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 2/7] xen/arm: introduce domain on Static Allocation

2021-09-06 Thread Penny Zheng
Hi Stefano > -Original Message- > From: Stefano Stabellini > Sent: Friday, September 3, 2021 5:31 AM > To: Penny Zheng > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > Bertrand Marquis ; Wei Chen > ; nd > Subject: Re: [PATCH v5

Error around cc-option on AArch64

2021-09-07 Thread Penny Zheng
this issue, I could loose the "grep check", instead trying to grep the COMPLETE option string("-march=armv8-r"), only partial(armv8-r) is enough. But, hmmm, the way of greping output message to check is kinds of reliable, IMO, since there is no standard for that. What do you suggest? Cheers -- Penny Zheng

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

2021-09-08 Thread Penny Zheng
This commit creates a new helper device_tree_get_meminfo to iterate over a device tree property to get memory info, like "reg". Signed-off-by: Penny Zheng --- xen/arch/arm/bootfdt.c | 83 -- 1 file changed, 47 insertions(+), 36 deletions(-) di

[PATCH v6 0/7] Domain on Static Allocation

2021-09-08 Thread Penny Zheng
e format - use PFN_DOWN(...) - provide a stub allocate_static_memory implementation for !CONFIG_STATIC_MEMORY - add a statement to clarify the binding between the "memory" property and "xen,static-mem" --- TODO: - reboot domain on static allocation - Implement all memory-ops(hype

[PATCH v6 3/7] xen: introduce mark_page_free

2021-09-08 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 v6 6/7] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-09-08 Thread Penny Zheng
from heap, this patch introduces a new page flag PGC_reserved, then mark pages of static memory PGC_reserved when initializing them. Signed-off-by: Penny Zheng --- xen/common/page_alloc.c | 118 ++- xen/include/asm-arm/mm.h | 3 + xen/include/xen/mm.h

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

2021-09-08 Thread Penny Zheng
a new CONFIG_STATIC_MEMORY option to wrap all static-allocation-related code. Put asynchronously scrubbing pages of static memory in TODO list. Signed-off-by: Penny Zheng --- xen/arch/arm/setup.c| 27 +++ xen/common/Kconfig | 13 + xen/common

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

2021-09-08 Thread Penny Zheng
introduce a new function guest_physmap_add_pages to cope with adding guest RAM p2m mapping with nr_pages. Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c | 161 +++- xen/arch/arm/p2m.c | 7 +- xen/include/asm-arm/p2m.h | 11 +++ 3 files changed

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

2021-09-08 Thread Penny Zheng
ank" to tell whether the memory bank is reserved as the whole hardware resource, or bind to a xen domain node, through "xen,static-mem" Signed-off-by: Penny Zheng --- docs/misc/arm/device-tree/booting.txt | 42 +++ xen/arch/arm/bootfdt.c| 3

[PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page

2021-09-08 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 introduces a new helper assign_page for original page with a single order. Signed-off-by: Penny Zheng --- xen/arch/x86/pv/dom0_build.c

RE: [PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page

2021-09-08 Thread Penny Zheng
Hi Jan > -Original Message- > From: Stefano Stabellini > Sent: Thursday, September 9, 2021 7:58 AM > To: Penny Zheng > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > Bertrand Marquis ; Wei Chen > ; jbeul...@suse.com > Subject: Re

RE: [PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page

2021-09-09 Thread Penny Zheng
Hi Jan and Stefano > -Original Message- > From: Jan Beulich > Sent: Thursday, September 9, 2021 5:06 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATC

[PATCH v7 0/7] Domain on Static Allocation

2021-09-09 Thread Penny Zheng
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 Penny Zheng (7): xen/arm: introduce new helper device_tree_get_meminfo xen/arm: introduce d

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

2021-09-09 Thread Penny Zheng
This commit creates a new helper device_tree_get_meminfo to iterate over a device tree property to get memory info, like "reg". Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- xen/arch/arm/bootfdt.c | 83 -- 1 file changed, 47

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

2021-09-09 Thread Penny Zheng
ank" to tell whether the memory bank is reserved as the whole hardware resource, or bind to a xen domain node, through "xen,static-mem" Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- docs/misc/arm/device-tree/booting.txt | 42 +++ xen/arch/arm/

[PATCH v7 3/7] xen: introduce mark_page_free

2021-09-09 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 v7 6/7] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-09-09 Thread Penny Zheng
from heap, this patch introduces a new page flag PGC_reserved, then mark pages of static memory PGC_reserved when initializing them. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- xen/common/page_alloc.c | 118 ++- xen/include/asm-arm/mm.h

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

2021-09-09 Thread Penny Zheng
a new CONFIG_STATIC_MEMORY option to wrap all static-allocation-related code. Put asynchronously scrubbing pages of static memory in TODO list. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- xen/arch/arm/setup.c| 27 +++ xen/common/Kconfig | 13

[PATCH v7 5/7] xen: re-define assign_pages and introduce a new function assign_page

2021-09-09 Thread Penny Zheng
, such that the compiler would point out that adjustments at call sites are needed. Signed-off-by: Penny Zheng --- xen/arch/x86/pv/dom0_build.c | 2 +- xen/common/grant_table.c | 2 +- xen/common/memory.c | 6 +++--- xen/common/page_alloc.c | 23 ++- xen

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

2021-09-09 Thread Penny Zheng
introduce a new function guest_physmap_add_pages to cope with adding guest RAM p2m mapping with nr_pages. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 161 +++- xen/arch/arm/p2m.c | 7 +- xen/include/asm

RE: [PATCH v7 3/7] xen: introduce mark_page_free

2021-09-15 Thread Penny Zheng
Hi Jan Sorry for the broken. > -Original Message- > From: Jan Beulich > Sent: Wednesday, September 15, 2021 9:56 PM > To: Penny Zheng > Cc: Bertrand Marquis ; Wei Chen > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject

[PATCH] xen: fix broken tainted value in mark_page_free

2021-09-16 Thread Penny Zheng
al variable "tainted" to "pg_tainted" to tell the difference from the global variable of the same name. Signed-off-by: Penny Zheng --- xen/common/page_alloc.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/xen/common/page_alloc.c b/

[PATCH] xen: fix broken tainted value in mark_page_free

2021-09-22 Thread Penny Zheng
uot;tainted" to "pg_offlined". Coverity ID: 1491872 Fixes: 540a637c3410780b519fc055f432afe271f642f8 Signed-off-by: Penny Zheng --- v2 changes: - rename local variable "tainted" to "pg_offlined", and make it bool --- xen/common/page_alloc.c | 15 ++--

[PATCH 00/11] 1:1 direct-map memory map

2021-09-22 Thread Penny Zheng
covers parts of it, which are 1:1 direct-map memory map. Other features will be delievered through different patch series. See https://lists.xenproject.org/archives/html/xen-devel/2021-09/msg00855.html for Domain on Static Allocation. Penny Zheng (1): xen/arm: device assignment on 1:1 dire

[PATCH 05/11] xen/arm: vgic: introduce vgic.cbase

2021-09-22 Thread Penny Zheng
From: Stefano Stabellini Add a field in struct vgic_dist to store the cpu interface base address, similar to the existing dbase field. Use the field in vgic_v2_domain_init, instead of original local variable. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- xen/arch/arm/vgic

[PATCH 01/11] xen: reserve flags for internal usage in xen_domctl_createdomain

2021-09-22 Thread Penny Zheng
xen_domctl_createdomain for internal Xen usage. Allocate bit 16 for XEN_DOMCTL_INTERNAL_ispriv: whether a domain is privileged or not. 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: "

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

2021-09-22 Thread Penny Zheng
m" is defined in the domain configuration. This commit also re-implements allocate_static_memory to allocate static memory as guest RAM for 1:1 direct-map domain. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- docs/misc/arm/device-tree/booting.txt | 9 ++ xen/arch/arm/domai

[PATCH 02/11] xen/arm: introduce XEN_DOMCTL_INTERNAL_directmap

2021-09-22 Thread Penny Zheng
: 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| 1 + xen/arch/arm/domain_build.c | 2 +- xen/include/asm-arm/domain.h | 9

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

2021-09-22 Thread Penny Zheng
provide the updated addresses. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- xen/arch/arm/vgic-v2.c | 16 xen/arch/arm/vgic/vgic-v2.c| 17 + xen/include/asm-arm/new_vgic.h | 4 ++-- xen/include/asm-arm/vgic.h | 4 ++-- 4 files

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

2021-09-22 Thread Penny Zheng
to provide the updated addresses. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c | 32 xen/arch/arm/vgic-v3.c | 10 +- xen/include/asm-arm/vgic.h | 6 +++--- 3 files changed, 32 insertions(+), 16

[PATCH 04/11] xen/arm: introduce accessors for vgic dist, cpu, and rdist base addresses

2021-09-22 Thread Penny Zheng
From: Stefano Stabellini Introduce accessors for vgic dist, cpu, and rdist base addresses, on all gic types. Use the accessors when making gic node for device tree of domU. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- xen/arch/arm/domain_build.c| 21

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

2021-09-22 Thread Penny Zheng
the virtual IRQ 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 | 34 +++--- xen/arch/arm/vpl011.c| 34

[PATCH 06/11] xen/arm: new vgic: update vgic_cpu_base

2021-09-22 Thread Penny Zheng
From: Stefano Stabellini In vgic_v2_map_resources, use the new vgic_cpu_base field of struct vgic_dist instead of original local variable. Signed-off-by: Stefano Stabellini Signed-off-by: Penny Zheng --- xen/arch/arm/vgic/vgic-v2.c | 10 +- 1 file changed, 5 insertions(+), 5

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

2021-09-22 Thread Penny Zheng
ned-off-by: Penny Zheng --- xen/arch/arm/domain_build.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index c92e510ae7..9a9d2522b7 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @

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

2021-09-22 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 v3 0/8] Follow-up static shared memory PART I

2023-08-20 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 v3 1/8] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2023-08-20 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 --- v2 -> v3: rebase and no change --- xen/arch/arm/domain_build.c | 2 -- 1 file changed, 2 deletions(-) diff --git

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

2023-08-20 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 v3 3/8] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-08-20 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, a

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

2023-08-20 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 v3 5/8] xen/arm: support static shared memory when host address not provided

2023-08-20 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" --- v2 -> v3 - fix infinite loop bug and bad ind

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

2023-08-20 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 --- v2 -> v3: - error out non-zero res bef

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

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

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

2023-08-20 Thread Penny Zheng
references for foreign superpages. Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- v2 -> v3: - rebase and no change --- xen/arch/arm/p2m.c | 58 ++ 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xe

Re: [PATCH v3 0/8] Follow-up static shared memory PART I

2023-08-22 Thread Penny Zheng
Hi, michal On 2023/8/21 18:49, Michal Orzel wrote: Hi Penny, On 21/08/2023 06:00, Penny Zheng wrote: There are some unsolving issues on current 4.17 static shared memory feature[1], including: - In order to avoid keeping growing 'membank', having the shared memory info i

Re: [PATCH v5 11/13] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-08-22 Thread Penny Zheng
Hi Julien On 2023/8/23 02:01, Julien Grall wrote: Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: From: Penny Zheng Current P2M implementation is designed for MMU system only. We move the MMU-specific codes into mmu/p2m.c, and only keep generic codes in p2m.c, like VMID allocator, etc. We

Re: [PATCH v6 01/13] xen/arm64: head.S: Introduce enable_{boot,secondary}_cpu_mm()

2023-09-07 Thread Penny Zheng
enable_boot_cpu_mm() for boot CPU and enable_secondary_cpu_mm() for secondary CPUs in this patch. Signed-off-by: Wei Chen Signed-off-by: Penny Zheng Signed-off-by: Henry Wang Reviewed-by: Julien Grall --- v6: - Add Julien's Reviewed-by tag. v5: - Add missing "()" in title. - U

[PATCH v4 02/10] xen/arm: re-define a set of data structures for static shared memory region

2023-09-10 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 v4 01/10] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2023-09-10 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 --- v2 -> v3: rebase and no change --- v3 -> v4: rebase and no change --- xen/arch/arm/domain_build.c | 2 -- 1 fil

[PATCH v4 00/10] Follow-up static shared memory PART I

2023-09-10 Thread Penny Zheng
DOC[2] All above objects have been divided into two parts to complete. And this patch serie is PART I. [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

[PATCH v4 03/10] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-09-10 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, a

[PATCH v4 05/10] xen/arm: support static shared memory when host address not provided

2023-09-10 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" --- v2 -> v3 - fix infinite loop bug and bad indentation - reb

[PATCH v4 04/10] xen/arm: use paddr_assigned to indicate whether host address is provided

2023-09-10 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 v4 07/10] xen/p2m: put reference for superpage

2023-09-10 Thread Penny Zheng
references for foreign superpages. Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- v2 -> v3: - rebase and no change --- v3 -> v4: rebase and no change --- xen/arch/arm/p2m.c | 58 ++ 1 file changed, 43 insertions(+), 15 deletions(-) d

[PATCH v4 06/10] xen/arm: remove shm holes for extended regions

2023-09-10 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 --- v2 -> v3: - error out non-zero res before rem

[PATCH v4 10/10] xen/arm: create another /memory node for static shm

2023-09-10 Thread Penny Zheng
Static shared memory region shall be described both under /memory and /reserved-memory. We introduce export_shm_memory_node() to create another /memory node to contain the static shared memory ranges. Signed-off-by: Penny Zheng --- v3 -> v4: new commit --- xen/arch/arm/domain_build.c |

[PATCH v4 09/10] xen/arm: fix duplicate /reserved-memory node in Dom0

2023-09-10 Thread Penny Zheng
insert the shm node along with the copying. And avoiding duplication, we add a checking before make_resv_memory_node(). Signed-off-by: Penny Zheng --- v3 -> v4: new commit --- xen/arch/arm/domain_build.c | 31 --- xen/arch/arm/include/asm/kernel.h | 2 ++

[PATCH v4 08/10] xen/docs: refine docs about static shared memory

2023-09-10 Thread Penny Zheng
em-1", not "0x1". Signed-off-by: Penny Zheng --- v1 -> v2: - no new changes --- v2 -> v3 - rebase and no change --- v3 -> v4: rebase and no change --- docs/misc/arm/device-tree/booting.txt | 52 --- 1 file changed, 39 insertions(+), 13 deletions(-)

Re: [PATCH v3 0/8] Follow-up static shared memory PART I

2023-09-10 Thread Penny Zheng
Hi Michal Sorry for the delayed response, caught up in internal release lately. :\ On 2023/8/22 16:57, Michal Orzel wrote: Hi Penny, On 22/08/2023 07:32, Penny Zheng wrote: Hi, michal On 2023/8/21 18:49, Michal Orzel wrote: Hi Penny, On 21/08/2023 06:00, Penny Zheng wrote: There are

Re: [PATCH v4 09/10] xen/arm: fix duplicate /reserved-memory node in Dom0

2023-09-11 Thread Penny Zheng
Hi Michal On 2023/9/11 17:40, Michal Orzel wrote: Hi Penny, On 11/09/2023 06:04, Penny Zheng wrote: In case there is a /reserved-memory node already present in the host dtb, current Xen codes would create yet another /reserved-memory node specially s/codes/code/ for the static shm in

Re: [PATCH v4 04/10] xen/arm: use paddr_assigned to indicate whether host address is provided

2023-09-11 Thread Penny Zheng
Hi, On 2023/9/11 12:04, Penny Zheng wrote: We use paddr_assigned to indicate whether host address is provided, by checking the length of "xen,shared-mem" property. The shm matching criteria shall also be adapt to cover the new scenario, by adding when host address is not provided

Re: [PATCH v4 00/10] Follow-up static shared memory PART I

2023-09-11 Thread Penny Zheng
Hi Michal On 2023/9/11 17:01, Michal Orzel wrote: Hi Penny, On 11/09/2023 06:04, Penny Zheng wrote: There are some unsolving issues on current 4.17 static shared memory feature[1], including: - In order to avoid keeping growing 'membank', having the shared memory info in separate

Re: [XEN v1 4/4] xen/arm: traps.c: Enclose VMSA specific registers within CONFIG_MMU

2023-09-13 Thread Penny Zheng
Hi, Ayan On 2023/9/11 21:59, Ayan Kumar Halder wrote: The VMSA specific registers (ie TCR, TTBR0, TTBR1, VTTBR, etc) are valid when MMU is used, thus we can enclose them with CONFIG_MMU. Signed-off-by: Ayan Kumar Halder --- xen/arch/arm/traps.c | 17 +++-- 1 file changed, 15 ins

RE: [PATCH v6 09/11] xen/arm64: create boot-time MPU protection regions

2022-11-06 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Monday, November 7, 2022 4:47 AM > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Penny Zheng ; Stefano > Stabellini ; Bertrand Marquis > ; Volodymyr Babchuk > > Subject: Re: [PATCH v6 09

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