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

Re: [Xen-devel] [PATCH v3 05/17] alternative/x86/arm32: Align altinstructions (and altinstr_replacement) sections.



>>> On 12.09.17 at 02:37, <konrad@xxxxxxxxxx> wrote:
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -155,11 +155,9 @@ SECTIONS
>         __initcall_end = .;
>  
>  #ifdef CONFIG_HAS_ALTERNATIVE
> -       . = ALIGN(4);

I think this one needs to say, while ...

>         __alt_instructions = .;
>         *(.altinstructions)
>         __alt_instructions_end = .;
> -       . = ALIGN(4);

... this one can go and ...

> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -202,7 +202,6 @@ SECTIONS
>          * "Alternative instructions for different CPU types or capabilities"
>          * Think locking instructions on spinlocks.
>          */
> -       . = ALIGN(8);
>          __alt_instructions = .;

... this one again needs to stay, but the 8 can be replaced by a 4.
That's because otherwise there's the risk of the __alt_instructions
label to not be at the start of the first .altinstructions (solely
depending on what happens to be immediately before this script
section). I'm sorry for the earlier mis-guiding of mine.

> --- a/xen/include/asm-x86/alternative.h
> +++ b/xen/include/asm-x86/alternative.h
> @@ -56,6 +56,7 @@ extern void alternative_instructions(void);
>  
>  #define ALTERNATIVE_N(newinstr, feature, number)     \
>       ".pushsection .altinstructions,\"a\"\n"         \
> +     ".p2align 2\n"                                  \
>       ALTINSTR_ENTRY(feature, number)                 \

I think the would better go into ALTINSTR_ENTRY(), and then also
into the altinstruction_entry assembler macro.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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