Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-29 Thread Jan Beulich
>>> On 28.08.18 at 19:58, wrote: > On 17/08/18 13:45, Jan Beulich wrote: > On 15.08.18 at 19:57, wrote: >>> --- a/xen/arch/x86/alternative.c >>> +++ b/xen/arch/x86/alternative.c >>> @@ -84,6 +84,19 @@ static const unsigned char * const >>> p6_nops[ASM_NOP_MAX+1] > >>>

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-28 Thread Andrew Cooper
On 17/08/18 13:45, Jan Beulich wrote: On 15.08.18 at 19:57, wrote: >> --- a/xen/arch/x86/Rules.mk >> +++ b/xen/arch/x86/Rules.mk >> @@ -29,6 +29,10 @@ $(call as-option-add,CFLAGS,CC,"invpcid >> (%rax)$$(comma)%rax",-DHAVE_AS_INVPCID) >> $(call as-option-add,CFLAGS,CC,\ >> ".if ((1 >

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-17 Thread Jan Beulich
>>> On 15.08.18 at 19:57, wrote: > --- a/xen/arch/x86/Rules.mk > +++ b/xen/arch/x86/Rules.mk > @@ -29,6 +29,10 @@ $(call as-option-add,CFLAGS,CC,"invpcid > (%rax)$$(comma)%rax",-DHAVE_AS_INVPCID) > $(call as-option-add,CFLAGS,CC,\ > ".if ((1 > 0) < 0); .error

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Roger Pau Monné
On Thu, Aug 16, 2018 at 04:56:04PM +0100, Andrew Cooper wrote: > On 16/08/18 15:31, Roger Pau Monné wrote: > > On Thu, Aug 16, 2018 at 11:42:56AM +0100, Andrew Cooper wrote: > >> On 16/08/18 10:55, Roger Pau Monné wrote: > >>> On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: >

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Andrew Cooper
On 16/08/18 15:31, Roger Pau Monné wrote: > On Thu, Aug 16, 2018 at 11:42:56AM +0100, Andrew Cooper wrote: >> On 16/08/18 10:55, Roger Pau Monné wrote: >>> On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Roger Pau Monné
On Thu, Aug 16, 2018 at 11:42:56AM +0100, Andrew Cooper wrote: > On 16/08/18 10:55, Roger Pau Monné wrote: > > On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: > >> diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk > >> index ac585a3..c84ed20 100644 > >> ---

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Jan Beulich
>>> On 16.08.18 at 13:48, wrote: > On 16/08/18 12:34, Jan Beulich wrote: > On 16.08.18 at 12:42, wrote: >>> On 16/08/18 10:55, Roger Pau Monné wrote: On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: > @@ -112,6 +125,11 @@ static void __init arch_init_ideal_nops(void)

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Jan Beulich
>>> On 16.08.18 at 13:57, wrote: > On Thu, Aug 16, 2018 at 04:18:03AM -0600, Jan Beulich wrote: >> >>> On 16.08.18 at 11:55, wrote: >> > On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: >> >> --- a/xen/arch/x86/Rules.mk >> >> +++ b/xen/arch/x86/Rules.mk >> >> @@ -29,6 +29,10 @@

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Roger Pau Monné
On Thu, Aug 16, 2018 at 04:18:03AM -0600, Jan Beulich wrote: > >>> On 16.08.18 at 11:55, wrote: > > On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: > >> --- a/xen/arch/x86/Rules.mk > >> +++ b/xen/arch/x86/Rules.mk > >> @@ -29,6 +29,10 @@ $(call as-option-add,CFLAGS,CC,"invpcid >

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Andrew Cooper
On 16/08/18 12:34, Jan Beulich wrote: On 16.08.18 at 12:42, wrote: >> On 16/08/18 10:55, Roger Pau Monné wrote: >>> On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: @@ -112,6 +125,11 @@ static void __init arch_init_ideal_nops(void) ideal_nops = k8_nops;

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Jan Beulich
>>> On 16.08.18 at 12:42, wrote: > On 16/08/18 10:55, Roger Pau Monné wrote: >> On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: >>> @@ -112,6 +125,11 @@ static void __init arch_init_ideal_nops(void) >>> ideal_nops = k8_nops; >>> break; >>> } >>> + >>>

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Andrew Cooper
On 16/08/18 10:55, Roger Pau Monné wrote: > On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: >> Newer versions of binutils are capable of emitting an exact number bytes >> worth >> of optimised nops, which are P6 nops. Use this in preference to .skip when >> available. >> >> Check

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Jan Beulich
>>> On 16.08.18 at 11:55, wrote: > On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: >> --- a/xen/arch/x86/Rules.mk >> +++ b/xen/arch/x86/Rules.mk >> @@ -29,6 +29,10 @@ $(call as-option-add,CFLAGS,CC,"invpcid >> (%rax)$$(comma)%rax",-DHAVE_AS_INVPCID) >> $(call

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available

2018-08-16 Thread Roger Pau Monné
On Wed, Aug 15, 2018 at 06:57:38PM +0100, Andrew Cooper wrote: > Newer versions of binutils are capable of emitting an exact number bytes worth > of optimised nops, which are P6 nops. Use this in preference to .skip when > available. > > Check at boot time whether the toolchain nops are the