mbox series

[v2,0/2] x86/xen: Make idle tasks reliable

Message ID 20200319095606.23627-1-mbenes@suse.cz (mailing list archive)
Headers show
Series x86/xen: Make idle tasks reliable | expand

Message

Miroslav Benes March 19, 2020, 9:56 a.m. UTC
The unwinder reports idle tasks' stack on XEN PV as unreliable which
complicates things for at least live patching. The two patches in the
series try to amend that by using similar approach as non-XEN x86 does.

v1->v2:
- call instruction used instead of push+jmp
- initial_stack used directly

There is a thing which makes me slightly uncomfortable. s/jmp/call/
means that, theoretically, the called function could return. GCC then
generates not so nice code and there is
asm_cpu_bringup_and_idle+0x5/0x1000 symbol last on the stack due to
alignment in asm/x86/xen/xen-head.S which could be confusing.
Practically it is all fine, because neither xen_start_kernel(), nor
cpu_bringup_and_idle() return (there is unbounded loop in
cpu_startup_entry() around do_idle()). __noreturn annotation of these
functions did not help.

So I don't think it is really a problem, but one may wonder.

Miroslav Benes (2):
  x86/xen: Make the boot CPU idle task reliable
  x86/xen: Make the secondary CPU idle tasks reliable

 arch/x86/xen/smp_pv.c   |  3 ++-
 arch/x86/xen/xen-head.S | 16 ++++++++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)