[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 08/11] Arm32: use new-style entry annotations for MMU code


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 1 Oct 2024 17:19:04 +0200
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Tue, 01 Oct 2024 15:19:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.10.2024 17:16, Jan Beulich wrote:
> Locally override SYM_PUSH_SECTION() to retain the intended section
> association.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> v7: New.

I'm sorry, I failed to Cc maintainers here.

Jan

> --- a/xen/arch/arm/arm32/mmu/head.S
> +++ b/xen/arch/arm/arm32/mmu/head.S
> @@ -160,6 +160,13 @@
>  .endm
>  
>  .section .text.idmap, "ax", %progbits
> +/*
> + * Code below wants to all live in the section established above.  
> Annotations
> + * from xen/linkage.h therefore may not switch sections (honoring
> + * CONFIG_CC_SPLIT_SECTIONS).  Override the respective macro.
> + */
> +#undef SYM_PUSH_SECTION
> +#define SYM_PUSH_SECTION(name, attr)
>  
>  /*
>   * Rebuild the boot pagetable's first-level entries. The structure
> @@ -174,7 +181,7 @@
>   *
>   * Clobbers r0 - r5
>   */
> -create_page_tables:
> +FUNC_LOCAL(create_page_tables)
>          /* Prepare the page-tables for mapping Xen */
>          mov_w r0, XEN_VIRT_START
>  
> @@ -263,7 +270,7 @@ use_temporary_mapping:
>  
>          mov   r12, #1                /* r12 := temporary mapping created */
>          mov   pc, lr
> -ENDPROC(create_page_tables)
> +END(create_page_tables)
>  
>  /*
>   * Turn on the Data Cache and the MMU. The function will return
> @@ -276,7 +283,7 @@ ENDPROC(create_page_tables)
>   *
>   * Clobbers r0 - r5
>   */
> -enable_mmu:
> +FUNC_LOCAL(enable_mmu)
>          PRINT("- Turning on paging -\r\n")
>  
>          /*
> @@ -346,7 +353,7 @@ enable_mmu:
>          teq   r12, #0
>          beq   remove_identity_mapping
>          b     remove_temporary_mapping
> -ENDPROC(enable_mmu)
> +END(enable_mmu)
>  
>  /*
>   * Switch to the runtime mapping. The logic depends on whether the
> @@ -366,7 +373,7 @@ ENDPROC(enable_mmu)
>   *
>   * Clobbers r0 - r4
>   */
> -switch_to_runtime_mapping:
> +FUNC_LOCAL(switch_to_runtime_mapping)
>          /*
>           * Jump to the runtime mapping if the virt and phys are not
>           * clashing
> @@ -411,7 +418,7 @@ ready_to_switch:
>          PRINT_ID("- Jumping to runtime address -\r\n")
>  
>          mov   pc, lr
> -ENDPROC(switch_to_runtime_mapping)
> +END(switch_to_runtime_mapping)
>  
>  /*
>   * Enable mm (turn on the data cache and the MMU) for secondary CPUs.
> @@ -428,7 +435,7 @@ ENDPROC(switch_to_runtime_mapping)
>   *
>   * Clobbers r0 - r6
>   */
> -ENTRY(enable_secondary_cpu_mm)
> +FUNC(enable_secondary_cpu_mm)
>          mov   r6, lr
>  
>          bl    create_page_tables
> @@ -456,7 +463,7 @@ ENTRY(enable_secondary_cpu_mm)
>  
>          /* Return to the virtual address requested by the caller. */
>          mov   pc, r6
> -ENDPROC(enable_secondary_cpu_mm)
> +END(enable_secondary_cpu_mm)
>  
>  /*
>   * Enable mm (turn on the data cache and the MMU) for the boot CPU.
> @@ -474,7 +481,7 @@ ENDPROC(enable_secondary_cpu_mm)
>   *
>   * Clobbers r0 - r6
>   */
> -ENTRY(enable_boot_cpu_mm)
> +FUNC(enable_boot_cpu_mm)
>          mov   r6, lr
>  
>  #ifdef CONFIG_EARLY_PRINTK
> @@ -491,7 +498,7 @@ ENTRY(enable_boot_cpu_mm)
>          /* Address in the runtime mapping to jump to after the MMU is 
> enabled */
>          mov   lr, r6
>          b     enable_mmu
> -ENDPROC(enable_boot_cpu_mm)
> +END(enable_boot_cpu_mm)
>  
>  /*
>   * Remove the 1:1 map from the page-tables. It is not easy to keep track
> @@ -503,7 +510,7 @@ ENDPROC(enable_boot_cpu_mm)
>   *
>   * Clobbers r0 - r3
>   */
> -remove_identity_mapping:
> +FUNC_LOCAL(remove_identity_mapping)
>          PRINT("- Removing the identity mapping -\r\n")
>  
>          /* r2:r3 := invalid page-table entry */
> @@ -518,14 +525,14 @@ remove_identity_mapping:
>  
>          flush_xen_tlb_local r0
>          mov   pc, lr
> -ENDPROC(remove_identity_mapping)
> +END(remove_identity_mapping)
>  
>  /*
>   * Remove the temporary mapping of Xen starting at TEMPORARY_XEN_VIRT_START.
>   *
>   * Clobbers r0 - r3
>   */
> -remove_temporary_mapping:
> +FUNC_LOCAL(remove_temporary_mapping)
>          PRINT("- Removing the temporary mapping -\r\n")
>  
>          /* r2:r3 := invalid page-table entry */
> @@ -541,13 +548,14 @@ remove_temporary_mapping:
>          flush_xen_tlb_local r0
>  
>          mov  pc, lr
> -ENDPROC(remove_temporary_mapping)
> +END(remove_temporary_mapping)
>  
>  /* Fail-stop */
> -fail:   PRINT("- Boot failed -\r\n")
> +FUNC_LOCAL(fail)
> +        PRINT("- Boot failed -\r\n")
>  1:      wfe
>          b     1b
> -ENDPROC(fail)
> +END(fail)
>  
>  /*
>   * Switch TTBR
> @@ -555,7 +563,7 @@ ENDPROC(fail)
>   *
>   * TODO: This code does not comply with break-before-make.
>   */
> -ENTRY(switch_ttbr)
> +FUNC(switch_ttbr)
>          dsb                            /* Ensure the flushes happen before
>                                          * continuing */
>          isb                            /* Ensure synchronization with 
> previous
> @@ -579,4 +587,4 @@ ENTRY(switch_ttbr)
>          isb
>  
>          mov pc, lr
> -ENDPROC(switch_ttbr)
> +END(switch_ttbr)
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.