[Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-25 Thread Jan Beulich
Stub invocations need to have the space the stub occupies as an input, to prevent the compiler from re-ordering (or omitting) writes to it. Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -837,7 +837,8 @@ do{ asm volatile (

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-25 Thread Andrew Cooper
On 25/04/17 10:04, Jan Beulich wrote: > Stub invocations need to have the space the stub occupies as an input, > to prevent the compiler from re-ordering (or omitting) writes to it. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-dev

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-25 Thread Julien Grall
On 25/04/17 16:00, Andrew Cooper wrote: On 25/04/17 10:04, Jan Beulich wrote: Stub invocations need to have the space the stub occupies as an input, to prevent the compiler from re-ordering (or omitting) writes to it. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Release-acked-b

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-26 Thread Boris Ostrovsky
On 04/25/2017 05:04 AM, Jan Beulich wrote: > Stub invocations need to have the space the stub occupies as an input, > to prevent the compiler from re-ordering (or omitting) writes to it. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/x86_emulate/x86_emulate.c > +++ b/xen/arch/x86/x86_emulat

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-26 Thread Jan Beulich
>>> On 26.04.17 at 16:01, wrote: > On 04/25/2017 05:04 AM, Jan Beulich wrote: >> Stub invocations need to have the space the stub occupies as an input, >> to prevent the compiler from re-ordering (or omitting) writes to it. >> >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/x86_emulate/x86

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-26 Thread Boris Ostrovsky
>> This breaks on old compilers: >> >> FC-64 >> > ulator> >> gcc --version >> gcc (GCC) 4.4.4 20100503 (Red Hat 4.4.4-2) > I did try with 4.3.x, fwiw (but I'm afraid I've lost that machine just > now, and will hardly set it up again using an old distro). Also I can't > immediately see what the com

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-27 Thread Jan Beulich
>>> On 26.04.17 at 16:01, wrote: > On 04/25/2017 05:04 AM, Jan Beulich wrote: >> Stub invocations need to have the space the stub occupies as an input, >> to prevent the compiler from re-ordering (or omitting) writes to it. >> >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/x86_emulate/x86

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints

2017-04-27 Thread Jan Beulich
>>> On 27.04.17 at 10:07, wrote: On 26.04.17 at 16:01, wrote: >> On 04/25/2017 05:04 AM, Jan Beulich wrote: >>> Stub invocations need to have the space the stub occupies as an input, >>> to prevent the compiler from re-ordering (or omitting) writes to it. >>> >>> Signed-off-by: Jan Beulich

[Xen-devel] [PATCH] x86emul: correct stub invocation constraints again

2017-04-27 Thread Jan Beulich
While the hypervisor side of commit cd91ab08ea ("x86emul: correct stub invocation constraints") was fine, the tools side triggered a bogus error with old gcc (4.3 and 4.4 at least). Use a slightly less appropriate variant instead, proven to be good enough to not re-introduce the original problem: W

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints again

2017-04-27 Thread Andrew Cooper
On 27/04/2017 09:41, Jan Beulich wrote: > While the hypervisor side of commit cd91ab08ea ("x86emul: correct stub > invocation constraints") was fine, the tools side triggered a bogus > error with old gcc (4.3 and 4.4 at least). Use a slightly less > appropriate variant instead, proven to be good en

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints again

2017-04-27 Thread Boris Ostrovsky
On 04/27/2017 04:41 AM, Jan Beulich wrote: > While the hypervisor side of commit cd91ab08ea ("x86emul: correct stub > invocation constraints") was fine, the tools side triggered a bogus > error with old gcc (4.3 and 4.4 at least). Use a slightly less > appropriate variant instead, proven to be good

Re: [Xen-devel] [PATCH] x86emul: correct stub invocation constraints again

2017-04-28 Thread Ian Jackson
Jan Beulich writes ("[PATCH] x86emul: correct stub invocation constraints again"): > While the hypervisor side of commit cd91ab08ea ("x86emul: correct stub > invocation constraints") was fine, the tools side triggered a bogus > error with old gcc (4.3 and 4.4 at least). Use a slightly less > appro