R52 MPU support (for "Third series for R82 MPU")
cover R52 MPU support (for "Third series for R82 MPU")
Hi all,
This series is related to
"[PATCH 0/5] Third series for R82 MPU support". There is no build dependency between the two series.
At the end of these 2 series, R82 and R52 boot till the same point (approximately).
Kind regards,
Ayan
Ayan Kumar Halder (2):
arm/mpu: Enable is_xen_heap_page and co for ARM_32 arm/mpu: Disable map_domain_page for MPU
xen/arch/arm/Kconfig | 2 +- xen/arch/arm/include/asm/mm.h | 2 -- xen/arch/arm/include/asm/mpu/mm.h | 5 ---- xen/arch/arm/mpu/domain-page.c | 45 ------------------------------- 4 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 xen/arch/arm/mpu/domain-page.c
Signature · 1 line
2.25.1
PATCH 1/2 arm/mpu: Enable is_xen_heap_page and co for ARM_32
In case of ARM_32, all of the RAM will be covered by a permanent contiguous mapping (where VA == PA) and there will be a single heap. Thus, the memory allocated from Xen heap uses PGC_xen_heap.
This is similar to the scenario described for "CONFIG_SEPARATE_XENHEAP=n W/ DIRECT MAP OF ALL RAM" in common/page_alloc.c.
--- xen/arch/arm/include/asm/mm.h | 2 -- xen/arch/arm/include/asm/mpu/mm.h | 5 ----- 2 files changed, 7 deletions(-)
xen/arch/arm/include/asm/mm.h +0 -2
@@ -170,11 +170,9 @@ struct page_info#define _PGC_need_scrub _PGC_allocated#define PGC_need_scrub PGC_allocated -#ifdef CONFIG_ARM_64 #define is_xen_heap_page (page) ((page)->count_info & PGC_xen_heap)#define is_xen_heap_mfn (mfn) \ (mfn_valid(mfn) && is_xen_heap_page(mfn_to_page(mfn))) -#endif #define is_xen_fixed_mfn (mfn) \ ((mfn_to_maddr(mfn) >= virt_to_maddr(&_start)) && \
xen/arch/arm/include/asm/mpu/mm.h +0 -5
@@ -27,11 +27,6 @@ extern pr_t xen_mpumap[MAX_MPU_REGION_NR];#define virt_to_maddr (va) ((paddr_t)((vaddr_t)(va) & PADDR_MASK)) -#ifdef CONFIG_ARM_32 -#define is_xen_heap_page (page) ({ BUG_ON("unimplemented"); false; }) -#define is_xen_heap_mfn (mfn) ({ BUG_ON("unimplemented"); false; }) -#endif -/* On MPU systems there is no translation, ma == va. */ static inline void *maddr_to_virt (paddr_t ma) {
Signature · 1 line
2.25.1
PATCH 2/2 arm/mpu: Disable map_domain_page for MPU
In reply to Ayan Kumar HalderThere is no domheap for ARM_32. All of the RAM is mapped and VA == PA.
--- xen/arch/arm/Kconfig | 2 +- xen/arch/arm/mpu/domain-page.c | 45 ---------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 xen/arch/arm/mpu/domain-page.c
xen/arch/arm/Kconfig +1 -1
@@ -1,7 +1,7 @@ config ARM_32 def_bool y depends on "$(ARCH)" = "arm32" - select ARCH_MAP_DOMAIN_PAGE + select ARCH_MAP_DOMAIN_PAGE if MMU config ARM_64 def_bool y
xen/arch/arm/mpu/domain-page.c deleted +0 -45
45 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v1 1/2] arm/mpu: Enable is_xen_heap_page and co for ARM_32
In reply to Ayan Kumar HalderHi Ayan,
Quoted 9 lines · Ayan Kumar Halder
In case of
ARM_32, all of the RAM will be covered by a permanent contiguous mapping (where VA == PA) and there will be a single heap. Thus, the memory allocated from Xen heap usesPGC_xen_heap.
This is similar to the scenario described for "CONFIG_SEPARATE_XENHEAP=nW/ DIRECT MAP OF ALL RAM" incommon/page_alloc.c.Signed-off-by Ayan Kumar Halder <[email protected]>---
This patch breaks the build for ARM_32, CONFIG_MMU targets due to multiple definition of is_xen_heap_page and is_xen_heap_mfn. The pre-existing definitions are located at xen/arch/arm/include/asm/mmu/mm.h:30:9
Cheers,
Hari
Re: [PATCH v1 2/2] arm/mpu: Disable map_domain_page for MPU
In reply to Ayan Kumar HalderHi Ayan,
xen/arch/arm/Kconfig
Quoted 13 lines · Ayan Kumar Halder
There is no domheap for
ARM_32. All of the RAM is mapped and VA == PA.Signed-off-by Ayan Kumar Halder <[email protected]>--- xen/arch/arm/Kconfig | 2 +- xen/arch/arm/mpu/domain-page.c | 45 ---------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 xen/arch/arm/mpu/domain-page.cxen/arch/arm/Kconfig +0
-1--- a/xen/arch/arm/Kconfig
This patch is breaking ARM_32, MPU builds for me. I think this also needs:
``` diff --git a/xen/arch/arm/mpu/Makefile b/xen/arch/arm/mpu/Makefile index 50f8fe4326..4963c8b550 100644 --- a/xen/arch/arm/mpu/Makefile +++ b/xen/arch/arm/mpu/Makefile @@ -1,6 +1,5 @@ obj-$(CONFIG_ARM_32) += arm32/ obj-$(CONFIG_ARM_64) += arm64/ -obj-$(CONFIG_ARM_32) += domain-page.o obj-y += mm.o obj-y += p2m.o obj-y += setup.init.o ```
Cheers,
Hari
Re: [PATCH v1 1/2] arm/mpu: Enable is_xen_heap_page and co for ARM_32
In reply to Hari LimayeQuoted 1 line · Hari Limaye
Hi Ayan,
Hi Hari,
Quoted 8 lines
Quoted 8 lines · Ayan Kumar Halder
In case of
ARM_32, all of the RAM will be covered by a permanent contiguous mapping (where VA == PA) and there will be a single heap. Thus, the memory allocated from Xen heap usesPGC_xen_heap.
This is similar to the scenario described for "CONFIG_SEPARATE_XENHEAP=nW/ DIRECT MAP OF ALL RAM" incommon/page_alloc.c.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Ayan Kumar Halder <[email protected]>---
This patch breaks the build for
ARM_32,CONFIG_MMUtargets due to multiple definition ofis_xen_heap_pageandis_xen_heap_mfn. The pre-existing definitions are located atxen/arch/arm/include/asm/mmu/mm.h:30:9
Thanks for checking this and apologies for the build break. I should have tested this before sending.
I have sent out
[PATCH v2 0/2] R52 MPU support (for "Third series for R82 MPU")
This time I tested https://gitlab.com/xen-project/people/ayankuma/xen/-/pipelines/1982700286 <https://gitlab.com/xen-project/people/ayankuma/xen/-/pipelines/1982700286> :)
- Ayan