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

Re: [Xen-devel] [PATCH 3/3] x86: Use alternative mechanism to define CLAC/STAC



>>> On 26.05.14 at 09:27, <feng.wu@xxxxxxxxx> wrote:
> -#define ASM_STAC ASM_AC(STAC)
> -#define ASM_CLAC ASM_AC(CLAC)
> +#define ASM_CLAC                                                       \
> +        661: ASM_NOP3;                                                 \
> +        .pushsection .altinstr_replacement, "ax";                      \
> +        662: __ASM_CLAC;                                               \
> +        .popsection;                                                   \
> +        .pushsection .altinstructions, "a";                            \
> +        altinstruction_entry 661b, 662b, X86_FEATURE_SMAP, 3, 3;       \
> +        .popsection
> +
> +#define ASM_STAC                                                       \
> +        661: ASM_NOP3;                                                 \
> +        .pushsection .altinstr_replacement, "ax";                      \
> +        662: __ASM_STAC;                                               \
> +        .popsection;                                                   \
> +        .pushsection .altinstructions, "a";                            \
> +        altinstruction_entry 661b, 662b, X86_FEATURE_SMAP, 3, 3;       \
> +        .popsection

I made the same comment on your original SMAP patches already:
There's no point in having all this duplication. All you want to
replace if ASM_AC().

Jan


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


 


Rackspace

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