Re: [Xen-devel] [PATCH] x86/boot: Make alternative patching NMI-safe

2018-02-06 Thread Jan Beulich
>>> On 05.02.18 at 19:04, wrote: > But as you correctly pointed out, it was a very long way from being > complete. We currently have no idea whether we are in NMI context, so > arranging not to not execute an iret is hard. As long as we don't mean to patch extremely early or extremely late parts

Re: [Xen-devel] [PATCH] x86/boot: Make alternative patching NMI-safe

2018-02-05 Thread Andrew Cooper
On 05/02/18 16:20, Jan Beulich wrote: On 05.02.18 at 16:16, wrote: >> On 05/02/18 14:09, Jan Beulich wrote: >> On 05.02.18 at 11:24, wrote: During patching, there is a very slim risk that an NMI or MCE interrupt in the middle of altering the code in the NMI/MCE paths, in

Re: [Xen-devel] [PATCH] x86/boot: Make alternative patching NMI-safe

2018-02-05 Thread Konrad Rzeszutek Wilk
On Mon, Feb 05, 2018 at 10:24:58AM +, Andrew Cooper wrote: > During patching, there is a very slim risk that an NMI or MCE interrupt in the > middle of altering the code in the NMI/MCE paths, in which case bad things > will happen. > > The NMI risk can be eliminated by running the patching loo

Re: [Xen-devel] [PATCH] x86/boot: Make alternative patching NMI-safe

2018-02-05 Thread Jan Beulich
>>> On 05.02.18 at 16:16, wrote: > On 05/02/18 14:09, Jan Beulich wrote: > On 05.02.18 at 11:24, wrote: >>> During patching, there is a very slim risk that an NMI or MCE interrupt in >>> the >>> middle of altering the code in the NMI/MCE paths, in which case bad things >>> will happen. >>> >

Re: [Xen-devel] [PATCH] x86/boot: Make alternative patching NMI-safe

2018-02-05 Thread Andrew Cooper
On 05/02/18 14:09, Jan Beulich wrote: On 05.02.18 at 11:24, wrote: >> During patching, there is a very slim risk that an NMI or MCE interrupt in >> the >> middle of altering the code in the NMI/MCE paths, in which case bad things >> will happen. >> >> The NMI risk can be eliminated by runnin

Re: [Xen-devel] [PATCH] x86/boot: Make alternative patching NMI-safe

2018-02-05 Thread Jan Beulich
>>> On 05.02.18 at 11:24, wrote: > During patching, there is a very slim risk that an NMI or MCE interrupt in the > middle of altering the code in the NMI/MCE paths, in which case bad things > will happen. > > The NMI risk can be eliminated by running the patching loop in NMI context, at > which