Re: [Xen-devel] [PATCH] xen/x86: Implement enable_nmis() in C

2018-03-16 Thread Jan Beulich
>>> On 15.03.18 at 18:07, wrote: > On 15/03/18 17:02, Jan Beulich wrote: > On 15.03.18 at 17:43, wrote: >>> +static inline void enable_nmis(void) >>> +{ >>> +unsigned long tmp; >>> + >>> +asm volatile ( "mov %%rsp, %[sp] \n\t" >>> + "push %[ss] \n\t" >>

Re: [Xen-devel] [PATCH] xen/x86: Implement enable_nmis() in C

2018-03-15 Thread Andrew Cooper
On 15/03/18 17:02, Jan Beulich wrote: On 15.03.18 at 17:43, wrote: >> +static inline void enable_nmis(void) >> +{ >> +unsigned long tmp; >> + >> +asm volatile ( "mov %%rsp, %[sp] \n\t" >> + "push %[ss] \n\t" >> + "push %[sp]

Re: [Xen-devel] [PATCH] xen/x86: Implement enable_nmis() in C

2018-03-15 Thread Jan Beulich
>>> On 15.03.18 at 17:43, wrote: > +static inline void enable_nmis(void) > +{ > +unsigned long tmp; > + > +asm volatile ( "mov %%rsp, %[sp] \n\t" > + "push %[ss] \n\t" > + "push %[sp] \n\t" > + "pushf

[Xen-devel] [PATCH] xen/x86: Implement enable_nmis() in C

2018-03-15 Thread Andrew Cooper
I don't recall why I chose to implement this in assembly to begin with, but it can happily live in a static inline instead, and only has two callers. Doing so reduces the quantity of code in .text.entry. Signed-off-by: Andrew Cooper --- Looking at the disassembly, this change causes machine_kexe