This is a note to let you know that I've just added the patch titled x86/xen: Fix noinstr fail in xen_pv_evtchn_do_upcall() to the 5.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: x86-xen-fix-noinstr-fail-in-xen_pv_evtchn_do_upcall.patch and it can be found in the queue-5.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit e3cc00c50618d188dcc71157f9e96d5a7c7ec50f Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Date: Mon Jun 21 13:12:35 2021 +0200 x86/xen: Fix noinstr fail in xen_pv_evtchn_do_upcall() [ Upstream commit 84e60065df9ef03759115a7e48c04bbc0d292165 ] Fix: vmlinux.o: warning: objtool: xen_pv_evtchn_do_upcall()+0x23: call to irq_enter_rcu() leaves .noinstr.text section Fixes: 359f01d1816f ("x86/entry: Use run_sysvec_on_irqstack_cond() for XEN upcall") Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> Link: https://lore.kernel.org/r/20210621120120.532960208@xxxxxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index cbe19c87e6be..8767dc53b569 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -266,15 +266,16 @@ __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs) irqentry_state_t state = irqentry_enter(regs); bool inhcall; + instrumentation_begin(); run_sysvec_on_irqstack_cond(__xen_pv_evtchn_do_upcall, regs); inhcall = get_and_clear_inhcall(); if (inhcall && !WARN_ON_ONCE(state.exit_rcu)) { - instrumentation_begin(); irqentry_exit_cond_resched(); instrumentation_end(); restore_inhcall(inhcall); } else { + instrumentation_end(); irqentry_exit(regs, state); } }