All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH v2 00/35] xen/arm: Rework head.S to make it more compliant with the Arm Arm
@ 2019-07-22 21:39 Julien Grall
  2019-07-22 21:39 ` [Xen-devel] [PATCH v2 01/35] xen/arm64: macros: Introduce an assembly macro to alias x30 Julien Grall
                   ` (34 more replies)
  0 siblings, 35 replies; 74+ messages in thread
From: Julien Grall @ 2019-07-22 21:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Volodymyr Babchuk

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.
    3) The 1:1 mapping should only use page granularity mapping to avoid
    mapping memory that should not be accessed

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

The arm32 code has been aded in this version but so far lightly tested.

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

Cheers,

Julien Grall (35):
  xen/arm64: macros: Introduce an assembly macro to alias x30
  xen/arm64: head: Mark the end of subroutines with ENDPROC
  xen/arm64: head: Don't clobber x30/lr in the macro PRINT
  xen/arm64: head: Rework UART initialization on boot CPU
  xen/arm64: head: Introduce print_reg
  xen/arm64: head: Introduce distinct paths for the boot CPU and
    secondary CPUs
  xen/arm64: head: Rework and document check_cpu_mode()
  xen/arm64: head: Rework and document zero_bss()
  xen/arm64: head: Improve coding style and document cpu_init()
  xen/arm64: head: Improve coding style and document
    create_pages_tables()
  xen/arm64: head: Document enable_mmu()
  xen/arm64: head: Move assembly switch to the runtime PT in secondary
    CPUs path
  xen/arm64: head: Don't setup the fixmap on secondary CPUs
  xen/arm64: head: Remove 1:1 mapping as soon as it is not used
  xen/arm64: head: Rework and document setup_fixmap()
  xen/arm64: head: Rework and document launch()
  xen/arm64: head: Setup TTBR_EL2 in enable_mmu() and add missing isb
  xen/arm64: head: Introduce a macro to get a PC-relative address of a
    symbol
  xen/arm32: head: Add a macro to move an immediate constant into a
    32-bit register
  xen/arm32: head: Mark the end of subroutines with ENDPROC
  xen/arm32: head: Don't clobber r14/lr in the macro PRINT
  xen/arm32: head: Rework UART initialization on boot CPU
  xen/arm32: head: Introduce print_reg
  xen/arm32: head: Introduce distinct paths for the boot CPU and
    secondary CPUs
  xen/arm32: head: Rework and document check_cpu_mode()
  xen/arm32: head: Rework and document zero_bss()
  xen/arm32: head: Document create_pages_tables()
  xen/arm32: head: Document enable_mmu()
  xen/arm32: head: Move assembly switch to the runtime PT in secondary
    CPUs path
  xen/arm32: head: Don't setup the fixmap on secondary CPUs
  xen/arm32: head: Remove 1:1 mapping as soon as it is not used
  xen/arm32: head: Rework and document setup_fixmap()
  xen/arm32: head: Rework and document launch()
  xen/arm32: head: Setup HTTBR in enable_mmu() and add missing isb
  xen/arm: Zero BSS after the MMU and D-cache is turned on

 xen/arch/arm/arm32/head.S          | 393 +++++++++++++++++++++++----------
 xen/arch/arm/arm64/entry.S         |   5 -
 xen/arch/arm/arm64/head.S          | 432 +++++++++++++++++++++++++++----------
 xen/arch/arm/mm.c                  |  23 +-
 xen/include/asm-arm/arm64/macros.h |   5 +
 5 files changed, 619 insertions(+), 239 deletions(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-07-31 21:01 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 21:39 [Xen-devel] [PATCH v2 00/35] xen/arm: Rework head.S to make it more compliant with the Arm Arm Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 01/35] xen/arm64: macros: Introduce an assembly macro to alias x30 Julien Grall
2019-07-26 14:28   ` Volodymyr Babchuk
2019-07-29 23:11   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 02/35] xen/arm64: head: Mark the end of subroutines with ENDPROC Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 03/35] xen/arm64: head: Don't clobber x30/lr in the macro PRINT Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 04/35] xen/arm64: head: Rework UART initialization on boot CPU Julien Grall
2019-07-29 23:19   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 05/35] xen/arm64: head: Introduce print_reg Julien Grall
2019-07-29 23:36   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 06/35] xen/arm64: head: Introduce distinct paths for the boot CPU and secondary CPUs Julien Grall
2019-07-30 17:06   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 07/35] xen/arm64: head: Rework and document check_cpu_mode() Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 08/35] xen/arm64: head: Rework and document zero_bss() Julien Grall
2019-07-30 17:13   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 09/35] xen/arm64: head: Improve coding style and document cpu_init() Julien Grall
2019-07-30 17:14   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 10/35] xen/arm64: head: Improve coding style and document create_pages_tables() Julien Grall
2019-07-30 17:15   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 11/35] xen/arm64: head: Document enable_mmu() Julien Grall
2019-07-30 17:20   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 12/35] xen/arm64: head: Move assembly switch to the runtime PT in secondary CPUs path Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 13/35] xen/arm64: head: Don't setup the fixmap on secondary CPUs Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 14/35] xen/arm64: head: Remove 1:1 mapping as soon as it is not used Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 15/35] xen/arm64: head: Rework and document setup_fixmap() Julien Grall
2019-07-30 17:40   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 16/35] xen/arm64: head: Rework and document launch() Julien Grall
2019-07-30 17:45   ` Stefano Stabellini
2019-07-31 20:13     ` Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 17/35] xen/arm64: head: Setup TTBR_EL2 in enable_mmu() and add missing isb Julien Grall
2019-07-30 18:20   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 18/35] xen/arm64: head: Introduce a macro to get a PC-relative address of a symbol Julien Grall
2019-07-30 18:24   ` Stefano Stabellini
2019-07-30 19:55     ` Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 19/35] xen/arm32: head: Add a macro to move an immediate constant into a 32-bit register Julien Grall
2019-07-30 21:11   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 20/35] xen/arm32: head: Mark the end of subroutines with ENDPROC Julien Grall
2019-07-30 19:22   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 21/35] xen/arm32: head: Don't clobber r14/lr in the macro PRINT Julien Grall
2019-07-30 19:34   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 22/35] xen/arm32: head: Rework UART initialization on boot CPU Julien Grall
2019-07-30 19:40   ` Stefano Stabellini
2019-07-31 20:18     ` Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 23/35] xen/arm32: head: Introduce print_reg Julien Grall
2019-07-30 19:43   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 24/35] xen/arm32: head: Introduce distinct paths for the boot CPU and secondary CPUs Julien Grall
2019-07-30 20:07   ` Stefano Stabellini
2019-07-31 20:31     ` Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 25/35] xen/arm32: head: Rework and document check_cpu_mode() Julien Grall
2019-07-30 20:10   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 26/35] xen/arm32: head: Rework and document zero_bss() Julien Grall
2019-07-30 20:14   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 27/35] xen/arm32: head: Document create_pages_tables() Julien Grall
2019-07-30 20:18   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 28/35] xen/arm32: head: Document enable_mmu() Julien Grall
2019-07-30 20:19   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 29/35] xen/arm32: head: Move assembly switch to the runtime PT in secondary CPUs path Julien Grall
2019-07-30 20:25   ` Stefano Stabellini
2019-07-30 20:54     ` Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 30/35] xen/arm32: head: Don't setup the fixmap on secondary CPUs Julien Grall
2019-07-30 20:38   ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 31/35] xen/arm32: head: Remove 1:1 mapping as soon as it is not used Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 32/35] xen/arm32: head: Rework and document setup_fixmap() Julien Grall
2019-07-30 21:14   ` Stefano Stabellini
2019-07-31 20:42     ` Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 33/35] xen/arm32: head: Rework and document launch() Julien Grall
2019-07-30 21:21   ` Stefano Stabellini
2019-07-30 21:34     ` Julien Grall
2019-07-31 20:27       ` Stefano Stabellini
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 34/35] xen/arm32: head: Setup HTTBR in enable_mmu() and add missing isb Julien Grall
2019-07-30 21:26   ` Stefano Stabellini
2019-07-31 21:01     ` Julien Grall
2019-07-22 21:39 ` [Xen-devel] [PATCH v2 35/35] xen/arm: Zero BSS after the MMU and D-cache is turned on Julien Grall
2019-07-30 21:30   ` Stefano Stabellini

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.