mbox series

[Xen-devel,v4,0/8] xen/arm: Rework head.S to make it more compliant with the Arm Arm

Message ID 20190917181244.30027-1-julien.grall@arm.com
Headers show
Series xen/arm: Rework head.S to make it more compliant with the Arm Arm | expand

Message

Julien Grall Sept. 17, 2019, 6:12 p.m. UTC
Hi all,

This is part of the boot/memory rework for Xen on Arm, but not sent as
MM-PARTx as this is focusing on the boot code.

Similar to the memory code, the boot code is not following the Arm Arm and
could lead to memory corruption/TLB conflict abort. I am not aware
of any platforms where Xen fails to boot, yet it should be fixed sooner
rather than later.

While making the code more compliant, I have also took the opportunity
to simplify the boot and also add more documentation.

After this series, the boot CPU and secondary CPUs path is mostly compliant
with the Arm Arm. The only non-compliant places I am aware of are:
    1) create_page_tables: Some rework is necessary to update the page-tables
       safely without the MMU on.
    2) The switches between boot and runtime page-tables (for both boot CPU
       and secondary CPUs) are not safe.

All will be addressed in follow-up series. The boot code would also benefits
another proof read for missing isb()/dsb().


For convenience I provided a branch based on staging:
   git://xenbits.xen.org/people/julieng/xen-unstable.git branch boot/v3

Cheers,

Julien Grall (8):
  xen/arm64: head: Remove 1:1 mapping as soon as it is not used
  xen/arm64: head: Rework and document setup_fixmap()
  xen/arm32: head: Remove 1:1 mapping as soon as it is not used
  xen/arm32: head: Rework and document setup_fixmap()
  xen/arm64: head: Introduce macros to create table and mapping entry
  xen/arm64: head: Use a page mapping for the 1:1 mapping in
    create_page_tables()
  xen/arm32: head: Introduce macros to create table and mapping entry
  xen/arm32: head: Use a page mapping for the 1:1 mapping in
    create_page_tables()

 xen/arch/arm/arm32/head.S | 324 +++++++++++++++++++++++++++++--------------
 xen/arch/arm/arm64/head.S | 347 +++++++++++++++++++++++++++++-----------------
 xen/arch/arm/mm.c         |   2 +
 3 files changed, 440 insertions(+), 233 deletions(-)