Re: [Xen-devel] [PATCH] x86/debug: Make debugger_trap_entry() safe during early boot

2016-08-04 Thread Jan Beulich
>>> On 04.08.16 at 13:57, wrote: > debugger_trap_entry() is reachable during early boot where its unconditional > use of current is unsafe. Add a warning to the function to this effect. > > Perform the vector check first, as this allows the compiler to elide the > other > content from most of i

[Xen-devel] [PATCH] x86/debug: Make debugger_trap_entry() safe during early boot

2016-08-04 Thread Andrew Cooper
debugger_trap_entry() is reachable during early boot where its unconditional use of current is unsafe. Add a warning to the function to this effect. Perform the vector check first, as this allows the compiler to elide the other content from most of its callsites. Check guest_mode(regs) before us