All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/41] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1
@ 2023-01-13  5:28 Penny Zheng
  2023-01-13  5:28 ` [PATCH v2 01/40] xen/arm: remove xen_phys_start and xenheap_phys_end from config.h Penny Zheng
                   ` (42 more replies)
  0 siblings, 43 replies; 122+ messages in thread
From: Penny Zheng @ 2023-01-13  5:28 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.chen, Penny Zheng, Stefano Stabellini, Julien Grall,
	Bertrand Marquis, Volodymyr Babchuk, Andrew Cooper,
	George Dunlap, Jan Beulich, Wei Liu, Roger Pau Monné

The Armv8-R architecture profile was designed to support use cases
that have a high sensitivity to deterministic execution. (e.g.
Fuel Injection, Brake control, Drive trains, Motor control etc)

Arm announced Armv8-R in 2013, it is the latest generation Arm
architecture targeted at the Real-time profile. It introduces
virtualization at the highest security level while retaining the
Protected Memory System Architecture (PMSA) based on a Memory
Protection Unit (MPU). In 2020, Arm announced Cortex-R82,
which is the first Arm 64-bit Cortex-R processor based on Armv8-R64.
The latest Armv8-R64 document can be found [1]. And the features of
Armv8-R64 architecture:
  - An exception model that is compatible with the Armv8-A model
  - Virtualization with support for guest operating systems
  - PMSA virtualization using MPUs In EL2.
  - Adds support for the 64-bit A64 instruction set.
  - Supports up to 48-bit physical addressing.
  - Supports three Exception Levels (ELs)
        - Secure EL2 - The Highest Privilege
        - Secure EL1 - RichOS (MMU) or RTOS (MPU)
        - Secure EL0 - Application Workloads
 - Supports only a single Security state - Secure.
 - MPU in EL1 & EL2 is configurable, MMU in EL1 is configurable.

These patch series are implementing the Armv8-R64 MPU support
for Xen, which are based on the discussion of
"Proposal for Porting Xen to Armv8-R64 - DraftC" [2].

We will implement the Armv8-R64 and MPU support in three stages:
1. Boot Xen itself to idle thread, do not create any guests on it.
2. Support to boot MPU and MMU domains on Armv8-R64 Xen.
3. SMP and other advanced features of Xen support on Armv8-R64.

As we have not implemented guest support in part#1 series of MPU
support, Xen can not create any guest in boot time. So in this
patch serie, we provide an extra DNM-commit in the last for users
to test Xen boot to idle on MPU system.

We will split these patches to several parts, this series is the
part#1, v1 is in [3], the full PoC can be found in [4]. More software for
Armv8-R64 can be found in [5];

[1] https://developer.arm.com/documentation/ddi0600/latest
[2] https://lists.xenproject.org/archives/html/xen-devel/2022-05/msg00643.html
[3] https://lists.xenproject.org/archives/html/xen-devel/2022-11/msg00289.html
[4] https://gitlab.com/xen-project/people/weic/xen/-/tree/integration/mpu_v2
[5] https://armv8r64-refstack.docs.arm.com/en/v5.0/

Penny Zheng (28):
  xen/mpu: build up start-of-day Xen MPU memory region map
  xen/mpu: introduce helpers for MPU enablement
  xen/mpu: introduce unified function setup_early_uart to map early UART
  xen/arm64: head: Jump to the runtime mapping in enable_mm()
  xen/arm: introduce setup_mm_mappings
  xen/mpu: plump virt/maddr/mfn convertion in MPU system
  xen/mpu: introduce helper access_protection_region
  xen/mpu: populate a new region in Xen MPU mapping table
  xen/mpu: plump early_fdt_map in MPU systems
  xen/arm: move MMU-specific setup_mm to setup_mmu.c
  xen/mpu: implement MPU version of setup_mm in setup_mpu.c
  xen/mpu: initialize frametable in MPU system
  xen/mpu: introduce "mpu,xxx-memory-section"
  xen/mpu: map MPU guest memory section before static memory
    initialization
  xen/mpu: destroy an existing entry in Xen MPU memory mapping table
  xen/mpu: map device memory resource in MPU system
  xen/mpu: map boot module section in MPU system
  xen/mpu: introduce mpu_memory_section_contains for address range check
  xen/mpu: disable VMAP sub-system for MPU systems
  xen/mpu: disable FIXMAP in MPU system
  xen/mpu: implement MPU version of ioremap_xxx
  xen/mpu: free init memory in MPU system
  xen/mpu: destroy boot modules and early FDT mapping in MPU system
  xen/mpu: Use secure hypervisor timer for AArch64v8R
  xen/mpu: move MMU specific P2M code to p2m_mmu.c
  xen/mpu: implement setup_virt_paging for MPU system
  xen/mpu: re-order xen_mpumap in arch_init_finialize
  xen/mpu: add Kconfig option to enable Armv8-R AArch64 support

Wei Chen (13):
  xen/arm: remove xen_phys_start and xenheap_phys_end from config.h
  xen/arm: make ARM_EFI selectable for Arm64
  xen/arm: adjust Xen TLB helpers for Armv8-R64 PMSA
  xen/arm: add an option to define Xen start address for Armv8-R
  xen/arm64: prepare for moving MMU related code from head.S
  xen/arm64: move MMU related code from head.S to head_mmu.S
  xen/arm64: add .text.idmap for Xen identity map sections
  xen/arm: use PA == VA for EARLY_UART_VIRTUAL_ADDRESS on Armv-8R
  xen/arm: decouple copy_from_paddr with FIXMAP
  xen/arm: split MMU and MPU config files from config.h
  xen/arm: move MMU-specific memory management code to mm_mmu.c/mm_mmu.h
  xen/arm: check mapping status and attributes for MPU copy_from_paddr
  xen/mpu: make Xen boot to idle on MPU systems(DNM)

 xen/arch/arm/Kconfig                      |   44 +-
 xen/arch/arm/Makefile                     |   17 +-
 xen/arch/arm/arm64/Makefile               |    5 +
 xen/arch/arm/arm64/head.S                 |  466 +----
 xen/arch/arm/arm64/head_mmu.S             |  399 ++++
 xen/arch/arm/arm64/head_mpu.S             |  394 ++++
 xen/arch/arm/bootfdt.c                    |   13 +-
 xen/arch/arm/domain_build.c               |    4 +
 xen/arch/arm/include/asm/alternative.h    |   15 +
 xen/arch/arm/include/asm/arm64/flushtlb.h |   25 +
 xen/arch/arm/include/asm/arm64/macros.h   |   51 +
 xen/arch/arm/include/asm/arm64/mpu.h      |  174 ++
 xen/arch/arm/include/asm/arm64/sysregs.h  |   77 +
 xen/arch/arm/include/asm/config.h         |  105 +-
 xen/arch/arm/include/asm/config_mmu.h     |  112 +
 xen/arch/arm/include/asm/config_mpu.h     |   25 +
 xen/arch/arm/include/asm/cpregs.h         |    4 +-
 xen/arch/arm/include/asm/cpuerrata.h      |   12 +
 xen/arch/arm/include/asm/cpufeature.h     |    7 +
 xen/arch/arm/include/asm/early_printk.h   |   13 +
 xen/arch/arm/include/asm/fixmap.h         |   28 +-
 xen/arch/arm/include/asm/flushtlb.h       |   22 +
 xen/arch/arm/include/asm/mm.h             |   78 +-
 xen/arch/arm/include/asm/mm_mmu.h         |   77 +
 xen/arch/arm/include/asm/mm_mpu.h         |   54 +
 xen/arch/arm/include/asm/p2m.h            |   27 +-
 xen/arch/arm/include/asm/p2m_mmu.h        |   28 +
 xen/arch/arm/include/asm/processor.h      |   13 +
 xen/arch/arm/include/asm/setup.h          |   39 +
 xen/arch/arm/kernel.c                     |   31 +-
 xen/arch/arm/mm.c                         | 1340 +-----------
 xen/arch/arm/mm_mmu.c                     | 1376 +++++++++++++
 xen/arch/arm/mm_mpu.c                     | 1056 ++++++++++
 xen/arch/arm/p2m.c                        | 2282 +--------------------
 xen/arch/arm/p2m_mmu.c                    | 2257 ++++++++++++++++++++
 xen/arch/arm/p2m_mpu.c                    |  274 +++
 xen/arch/arm/platforms/Kconfig            |   16 +-
 xen/arch/arm/setup.c                      |  394 +---
 xen/arch/arm/setup_mmu.c                  |  391 ++++
 xen/arch/arm/setup_mpu.c                  |  208 ++
 xen/arch/arm/time.c                       |   14 +-
 xen/arch/arm/traps.c                      |    2 +
 xen/arch/arm/xen.lds.S                    |   10 +-
 xen/arch/x86/Kconfig                      |    1 +
 xen/common/Kconfig                        |    6 +
 xen/common/Makefile                       |    2 +-
 xen/include/xen/vmap.h                    |   93 +-
 47 files changed, 7500 insertions(+), 4581 deletions(-)
 create mode 100644 xen/arch/arm/arm64/head_mmu.S
 create mode 100644 xen/arch/arm/arm64/head_mpu.S
 create mode 100644 xen/arch/arm/include/asm/arm64/mpu.h
 create mode 100644 xen/arch/arm/include/asm/config_mmu.h
 create mode 100644 xen/arch/arm/include/asm/config_mpu.h
 create mode 100644 xen/arch/arm/include/asm/mm_mmu.h
 create mode 100644 xen/arch/arm/include/asm/mm_mpu.h
 create mode 100644 xen/arch/arm/include/asm/p2m_mmu.h
 create mode 100644 xen/arch/arm/mm_mmu.c
 create mode 100644 xen/arch/arm/mm_mpu.c
 create mode 100644 xen/arch/arm/p2m_mmu.c
 create mode 100644 xen/arch/arm/p2m_mpu.c
 create mode 100644 xen/arch/arm/setup_mmu.c
 create mode 100644 xen/arch/arm/setup_mpu.c

-- 
2.25.1



^ permalink raw reply	[flat|nested] 122+ messages in thread

end of thread, other threads:[~2023-06-05  5:21 UTC | newest]

Thread overview: 122+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13  5:28 [PATCH v2 00/41] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1 Penny Zheng
2023-01-13  5:28 ` [PATCH v2 01/40] xen/arm: remove xen_phys_start and xenheap_phys_end from config.h Penny Zheng
2023-01-13 10:06   ` Julien Grall
2023-01-13 10:39     ` Penny Zheng
2023-01-13  5:28 ` [PATCH v2 02/40] xen/arm: make ARM_EFI selectable for Arm64 Penny Zheng
2023-01-17 23:09   ` Julien Grall
2023-01-18  2:19     ` Wei Chen
2023-01-13  5:28 ` [PATCH v2 03/40] xen/arm: adjust Xen TLB helpers for Armv8-R64 PMSA Penny Zheng
2023-01-17 23:16   ` Julien Grall
2023-01-18  2:32     ` Wei Chen
2023-01-13  5:28 ` [PATCH v2 04/40] xen/arm: add an option to define Xen start address for Armv8-R Penny Zheng
2023-01-17 23:24   ` Julien Grall
2023-01-18  3:00     ` Wei Chen
2023-01-18  9:44       ` Julien Grall
2023-01-18 10:22         ` Wei Chen
2023-01-18 10:59           ` Julien Grall
2023-01-18 11:27             ` Wei Chen
2023-01-13  5:28 ` [PATCH v2 05/40] xen/arm64: prepare for moving MMU related code from head.S Penny Zheng
2023-01-17 23:37   ` Julien Grall
2023-01-18  3:09     ` Wei Chen
2023-01-18  9:50       ` Julien Grall
2023-01-18 10:24         ` Wei Chen
2023-01-13  5:28 ` [PATCH v2 06/40] xen/arm64: move MMU related code from head.S to head_mmu.S Penny Zheng
2023-01-13  5:28 ` [PATCH v2 07/40] xen/arm64: add .text.idmap for Xen identity map sections Penny Zheng
2023-01-17 23:46   ` Julien Grall
2023-01-18  2:18     ` Wei Chen
2023-01-18 10:55       ` Julien Grall
2023-01-18 11:40         ` Wei Chen
2023-01-13  5:28 ` [PATCH v2 08/40] xen/arm: use PA == VA for EARLY_UART_VIRTUAL_ADDRESS on Armv-8R Penny Zheng
2023-01-17 23:49   ` Julien Grall
2023-01-18  1:43     ` Wei Chen
2023-01-13  5:28 ` [PATCH v2 09/40] xen/arm: decouple copy_from_paddr with FIXMAP Penny Zheng
2023-01-13  5:28 ` [PATCH v2 10/40] xen/arm: split MMU and MPU config files from config.h Penny Zheng
2023-01-19 14:20   ` Julien Grall
2023-06-05  5:20     ` Penny Zheng
2023-01-13  5:28 ` [PATCH v2 11/40] xen/mpu: build up start-of-day Xen MPU memory region map Penny Zheng
2023-01-19 10:18   ` Ayan Kumar Halder
2023-01-29  6:47     ` Penny Zheng
2023-01-19 15:04   ` Julien Grall
2023-01-29  5:39     ` Penny Zheng
2023-01-29  7:37       ` Julien Grall
2023-01-30  5:45         ` Penny Zheng
2023-01-30  9:39           ` Julien Grall
2023-01-31  4:11             ` Penny Zheng
2023-01-31  9:27               ` Julien Grall
2023-02-01  5:39                 ` Penny Zheng
2023-02-01 18:56                   ` Julien Grall
2023-02-02 10:53                     ` Penny Zheng
2023-02-02 10:58                       ` Julien Grall
2023-02-02 11:30                         ` Penny Zheng
2023-01-13  5:28 ` [PATCH v2 12/40] xen/mpu: introduce helpers for MPU enablement Penny Zheng
2023-01-23 17:07   ` Ayan Kumar Halder
2023-01-24 18:54   ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 13/40] xen/mpu: introduce unified function setup_early_uart to map early UART Penny Zheng
2023-01-24 19:09   ` Julien Grall
2023-01-29  6:17     ` Penny Zheng
2023-01-29  7:43       ` Julien Grall
2023-01-30  6:24         ` Penny Zheng
2023-01-30 10:00           ` Julien Grall
2023-01-31  5:38             ` Penny Zheng
2023-01-31  9:41               ` Julien Grall
2023-02-01  5:36                 ` Penny Zheng
2023-02-01 19:26                   ` Julien Grall
2023-02-02  8:05                     ` Penny Zheng
2023-02-02 11:11                       ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 14/40] xen/arm64: head: Jump to the runtime mapping in enable_mm() Penny Zheng
2023-02-05 21:13   ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 15/40] xen/arm: move MMU-specific memory management code to mm_mmu.c/mm_mmu.h Penny Zheng
2023-02-05 21:30   ` Julien Grall
2023-02-07  3:59     ` Penny Zheng
2023-02-07  8:41       ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 16/40] xen/arm: introduce setup_mm_mappings Penny Zheng
2023-02-05 21:32   ` Julien Grall
2023-02-07  4:40     ` Penny Zheng
2023-01-13  5:28 ` [PATCH v2 17/40] xen/mpu: plump virt/maddr/mfn convertion in MPU system Penny Zheng
2023-02-05 21:36   ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 18/40] xen/mpu: introduce helper access_protection_region Penny Zheng
2023-01-24 19:20   ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 19/40] xen/mpu: populate a new region in Xen MPU mapping table Penny Zheng
2023-02-05 21:45   ` Julien Grall
2023-02-07  5:07     ` Penny Zheng
2023-01-13  5:28 ` [PATCH v2 20/40] xen/mpu: plump early_fdt_map in MPU systems Penny Zheng
2023-02-05 21:52   ` Julien Grall
2023-02-06 10:11   ` Julien Grall
2023-02-07  6:30     ` Penny Zheng
2023-02-07  8:47       ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 21/40] xen/arm: move MMU-specific setup_mm to setup_mmu.c Penny Zheng
2023-01-13  5:28 ` [PATCH v2 22/40] xen/mpu: implement MPU version of setup_mm in setup_mpu.c Penny Zheng
2023-01-13  5:28 ` [PATCH v2 23/40] xen/mpu: initialize frametable in MPU system Penny Zheng
2023-02-05 22:07   ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 24/40] xen/mpu: introduce "mpu,xxx-memory-section" Penny Zheng
2023-01-13  5:28 ` [PATCH v2 25/40] xen/mpu: map MPU guest memory section before static memory initialization Penny Zheng
2023-02-09 10:51   ` Julien Grall
2023-01-13  5:28 ` [PATCH v2 26/40] xen/mpu: destroy an existing entry in Xen MPU memory mapping table Penny Zheng
2023-02-09 10:57   ` Julien Grall
2023-01-13  5:29 ` [PATCH v2 27/40] xen/mpu: map device memory resource in MPU system Penny Zheng
2023-01-13  5:29 ` [PATCH v2 28/40] xen/mpu: map boot module section " Penny Zheng
2023-01-13  5:29 ` [PATCH v2 29/40] xen/mpu: introduce mpu_memory_section_contains for address range check Penny Zheng
2023-01-13  5:29 ` [PATCH v2 30/40] xen/mpu: disable VMAP sub-system for MPU systems Penny Zheng
2023-01-13  9:39   ` Jan Beulich
2023-01-13  5:29 ` [PATCH v2 31/40] xen/mpu: disable FIXMAP in MPU system Penny Zheng
2023-01-13  9:42   ` Jan Beulich
2023-01-13 10:10   ` Jan Beulich
2023-02-09 11:01     ` Julien Grall
2023-01-13  5:29 ` [PATCH v2 32/40] xen/mpu: implement MPU version of ioremap_xxx Penny Zheng
2023-01-13  9:49   ` Jan Beulich
2023-02-09 11:14   ` Julien Grall
2023-01-13  5:29 ` [PATCH v2 33/40] xen/arm: check mapping status and attributes for MPU copy_from_paddr Penny Zheng
2023-01-13  5:29 ` [PATCH v2 34/40] xen/mpu: free init memory in MPU system Penny Zheng
2023-02-09 11:27   ` Julien Grall
2023-01-13  5:29 ` [PATCH v2 35/40] xen/mpu: destroy boot modules and early FDT mapping " Penny Zheng
2023-01-13  5:29 ` [PATCH v2 36/40] xen/mpu: Use secure hypervisor timer for AArch64v8R Penny Zheng
2023-02-05 22:26   ` Julien Grall
2023-01-13  5:29 ` [PATCH v2 37/40] xen/mpu: move MMU specific P2M code to p2m_mmu.c Penny Zheng
2023-01-13  5:29 ` [PATCH v2 38/40] xen/mpu: implement setup_virt_paging for MPU system Penny Zheng
2023-01-13  5:29 ` [PATCH v2 39/40] xen/mpu: re-order xen_mpumap in arch_init_finialize Penny Zheng
2023-01-13  5:29 ` [PATCH v2 40/40] xen/mpu: add Kconfig option to enable Armv8-R AArch64 support Penny Zheng
2023-01-13  5:29 ` [PATCH] xen/mpu: make Xen boot to idle on MPU systems(DNM) Penny Zheng
2023-01-13  8:54 ` [PATCH v2 00/41] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1 Jan Beulich
2023-01-13  9:16   ` Julien Grall
2023-01-13  9:28     ` Jan Beulich
2023-01-24 19:31 ` Ayan Kumar Halder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.