From: "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: juri.lelli@redhat.com, rafael@kernel.org,
linus.walleij@linaro.org, bsegall@google.com, guoren@kernel.org,
pavel@ucw.cz, agordeev@linux.ibm.com, linux-clk@vger.kernel.org,
linux-arch@vger.kernel.org, vincent.guittot@linaro.org,
chenhuacai@kernel.org, linux-acpi@vger.kernel.org,
agross@kernel.org, geert@linux-m68k.org, linux-imx@nxp.com,
catalin.marinas@arm.com, xen-devel@lists.xenproject.org,
mattst88@gmail.com, borntraeger@linux.ibm.com,
mturquette@baylibre.com, sammy@sammy.net, pmladek@suse.com,
linux-pm@vger.kernel.org, jiangshanlai@gmail.com,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-um@lists.infradead.org, acme@kernel.org,
tglx@linutronix.de, linux-omap@vger.kernel.org,
dietmar.eggemann@arm.com, rth@twiddle.net,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org, senozhatsky@chromium.org,
svens@linux.ibm.com, jolsa@kernel.org, paulus@samba.org,
mark.rutland@arm.com, linux-ia64@vger.kernel.org,
dave.hansen@linux.intel.com,
virtualiza tion@lists.linux-foundation.org,
James.Bottomley@HansenPartnership.com, jcmvbkbc@gmail.com,
thierry.reding@gmail.com, kernel@xen0n.name,
quic_neeraju@quicinc.com, linux-s390@vger.kernel.org,
vschneid@redhat.com, john.ogness@linutronix.de,
ysato@users.sourceforge.jp, linux-sh@vger.kernel.org,
festevam@gmail.com, deller@gmx.de, daniel.lezcano@linaro.org,
jonathanh@nvidia.com, mathieu.desnoyers@efficios.com,
frederic@kernel.org, lenb@kernel.org,
linux-xtensa@linux-xtensa.org, kernel@pengutronix.de,
gor@linux.ibm.com, linux-arm-msm@vger.kernel.org,
linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
shorne@gmail.com, linux-arm-kernel@lists.infradead.org,
chris@zankel.net, sboyd@kernel.org, dinguyen@kernel.org,
bristot@redhat.com, alexander.shishkin@linux.intel.com,
lpieralisi@kernel.org, linux@rasmusvillemoes.dk,
joel@joelfernandes.org, will@kernel.org,
boris.ostrovsky@oracle.com, khilman@kernel.org,
linux-csky@vger.kernel.org, pv-drivers@vmware.com,
linux-snps-arc@lists.infra dead.org, mgorman@suse.de,
jacob.jun.pan@linux.intel.
Subject: Re: [PATCH 29/36] cpuidle,xenpv: Make more PARAVIRT_XXL noinstr clean
Date: Mon, 13 Jun 2022 20:48:49 +0200 [thread overview]
Message-ID: <510b9b68-7d53-7d4d-5a05-37fbd199eb4b@csail.mit.edu> (raw)
In-Reply-To: <20220608144517.759631860@infradead.org>
com, Arnd Bergmann <arnd@arndb.de>, ulli.kroll@googlemail.com, vgupta@kernel.org, josh@joshtriplett.org, rostedt@goodmis.org, rcu@vger.kernel.org, bp@alien8.de, bcain@quicinc.com, tsbogend@alpha.franken.de, linux-parisc@vger.kernel.org, sudeep.holla@arm.com, shawnguo@kernel.org, davem@davemloft.net, dalias@libc.org, tony@atomide.com, amakhalov@vmware.com, bjorn.andersson@linaro.org, hpa@zytor.com, sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-riscv@lists.infradead.org, anton.ivanov@cambridgegreys.com, jonas@southpole.se, yury.norov@gmail.com, richard@nod.at, x86@kernel.org, linux@armlinux.org.uk, mingo@redhat.com, aou@eecs.berkeley.edu, paulmck@kernel.org, hca@linux.ibm.com, stefan.kristiansson@saunalahti.fi, openrisc@lists.librecores.org, paul.walmsley@sifive.com, linux-tegra@vger.kernel.org, namhyung@kernel.org, andriy.shevchenko@linux.intel.com, jpoimboe@kernel.org, jgross@suse.com, monstr@monstr.eu, linux-mips@vger.kernel.org, palmer@dabbelt.com, anup@brainfaul
t.org, ink@jurassic.park.msu.ru, johannes@sipsolutions.net, linuxppc-dev@lists.ozlabs.org
Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org
Sender: "Linuxppc-dev" <linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org>
On 6/8/22 4:27 PM, Peter Zijlstra wrote:
> vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0xde: call to wbinvd() leaves .noinstr.text section
> vmlinux.o: warning: objtool: default_idle+0x4: call to arch_safe_halt() leaves .noinstr.text section
> vmlinux.o: warning: objtool: xen_safe_halt+0xa: call to HYPERVISOR_sched_op.constprop.0() leaves .noinstr.text section
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
Regards,
Srivatsa
VMware Photon OS
> ---
> arch/x86/include/asm/paravirt.h | 6 ++++--
> arch/x86/include/asm/special_insns.h | 4 ++--
> arch/x86/include/asm/xen/hypercall.h | 2 +-
> arch/x86/kernel/paravirt.c | 14 ++++++++++++--
> arch/x86/xen/enlighten_pv.c | 2 +-
> arch/x86/xen/irq.c | 2 +-
> 6 files changed, 21 insertions(+), 9 deletions(-)
>
> --- a/arch/x86/include/asm/paravirt.h
> +++ b/arch/x86/include/asm/paravirt.h
> @@ -168,7 +168,7 @@ static inline void __write_cr4(unsigned
> PVOP_VCALL1(cpu.write_cr4, x);
> }
>
> -static inline void arch_safe_halt(void)
> +static __always_inline void arch_safe_halt(void)
> {
> PVOP_VCALL0(irq.safe_halt);
> }
> @@ -178,7 +178,9 @@ static inline void halt(void)
> PVOP_VCALL0(irq.halt);
> }
>
> -static inline void wbinvd(void)
> +extern noinstr void pv_native_wbinvd(void);
> +
> +static __always_inline void wbinvd(void)
> {
> PVOP_ALT_VCALL0(cpu.wbinvd, "wbinvd", ALT_NOT(X86_FEATURE_XENPV));
> }
> --- a/arch/x86/include/asm/special_insns.h
> +++ b/arch/x86/include/asm/special_insns.h
> @@ -115,7 +115,7 @@ static inline void wrpkru(u32 pkru)
> }
> #endif
>
> -static inline void native_wbinvd(void)
> +static __always_inline void native_wbinvd(void)
> {
> asm volatile("wbinvd": : :"memory");
> }
> @@ -179,7 +179,7 @@ static inline void __write_cr4(unsigned
> native_write_cr4(x);
> }
>
> -static inline void wbinvd(void)
> +static __always_inline void wbinvd(void)
> {
> native_wbinvd();
> }
> --- a/arch/x86/include/asm/xen/hypercall.h
> +++ b/arch/x86/include/asm/xen/hypercall.h
> @@ -382,7 +382,7 @@ MULTI_stack_switch(struct multicall_entr
> }
> #endif
>
> -static inline int
> +static __always_inline int
> HYPERVISOR_sched_op(int cmd, void *arg)
> {
> return _hypercall2(int, sched_op, cmd, arg);
> --- a/arch/x86/kernel/paravirt.c
> +++ b/arch/x86/kernel/paravirt.c
> @@ -233,6 +233,11 @@ static noinstr void pv_native_set_debugr
> native_set_debugreg(regno, val);
> }
>
> +noinstr void pv_native_wbinvd(void)
> +{
> + native_wbinvd();
> +}
> +
> static noinstr void pv_native_irq_enable(void)
> {
> native_irq_enable();
> @@ -242,6 +247,11 @@ static noinstr void pv_native_irq_disabl
> {
> native_irq_disable();
> }
> +
> +static noinstr void pv_native_safe_halt(void)
> +{
> + native_safe_halt();
> +}
> #endif
>
> enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
> @@ -273,7 +283,7 @@ struct paravirt_patch_template pv_ops =
> .cpu.read_cr0 = native_read_cr0,
> .cpu.write_cr0 = native_write_cr0,
> .cpu.write_cr4 = native_write_cr4,
> - .cpu.wbinvd = native_wbinvd,
> + .cpu.wbinvd = pv_native_wbinvd,
> .cpu.read_msr = native_read_msr,
> .cpu.write_msr = native_write_msr,
> .cpu.read_msr_safe = native_read_msr_safe,
> @@ -307,7 +317,7 @@ struct paravirt_patch_template pv_ops =
> .irq.save_fl = __PV_IS_CALLEE_SAVE(native_save_fl),
> .irq.irq_disable = __PV_IS_CALLEE_SAVE(pv_native_irq_disable),
> .irq.irq_enable = __PV_IS_CALLEE_SAVE(pv_native_irq_enable),
> - .irq.safe_halt = native_safe_halt,
> + .irq.safe_halt = pv_native_safe_halt,
> .irq.halt = native_halt,
> #endif /* CONFIG_PARAVIRT_XXL */
>
> --- a/arch/x86/xen/enlighten_pv.c
> +++ b/arch/x86/xen/enlighten_pv.c
> @@ -1019,7 +1019,7 @@ static const typeof(pv_ops) xen_cpu_ops
>
> .write_cr4 = xen_write_cr4,
>
> - .wbinvd = native_wbinvd,
> + .wbinvd = pv_native_wbinvd,
>
> .read_msr = xen_read_msr,
> .write_msr = xen_write_msr,
> --- a/arch/x86/xen/irq.c
> +++ b/arch/x86/xen/irq.c
> @@ -24,7 +24,7 @@ noinstr void xen_force_evtchn_callback(v
> (void)HYPERVISOR_xen_version(0, NULL);
> }
>
> -static void xen_safe_halt(void)
> +static noinstr void xen_safe_halt(void)
> {
> /* Blocking includes an implicit local_irq_enable(). */
> if (HYPERVISOR_sched_op(SCHEDOP_block, NULL) != 0)
>
>
next prev parent reply other threads:[~2022-06-14 22:02 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 14:27 [PATCH 00/36] cpuidle,rcu: Cleanup the mess Peter Zijlstra
2022-06-08 14:27 ` [PATCH 01/36] x86/perf/amd: Remove tracing from perf_lopwr_cb() Peter Zijlstra
2022-06-08 14:27 ` [PATCH 02/36] x86/idle: Replace x86_idle with a static_call Peter Zijlstra
2022-06-08 18:13 ` Rafael J. Wysocki
2022-06-08 14:27 ` [PATCH 03/36] cpuidle/poll: Ensure IRQ state is invariant Peter Zijlstra
2022-07-06 13:51 ` Rafael J. Wysocki
2022-06-08 14:27 ` [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE Peter Zijlstra
2022-06-08 15:01 ` Rafael J. Wysocki
2022-06-08 15:48 ` Peter Zijlstra
2022-06-08 16:08 ` Rafael J. Wysocki
2022-06-09 23:49 ` Jacob Pan
2022-06-13 8:44 ` Peter Zijlstra
2022-06-16 21:26 ` Jacob Pan
2022-07-25 19:43 ` Michel Lespinasse
2022-07-28 17:20 ` Paul E. McKenney
2022-07-29 10:24 ` Michel Lespinasse
2022-07-29 14:59 ` Rafael J. Wysocki
2022-07-30 9:48 ` Michel Lespinasse
2022-07-30 19:52 ` Rafael J. Wysocki
2022-07-30 23:45 ` Michel Lespinasse
2022-07-29 15:26 ` Paul E. McKenney
2022-07-29 15:28 ` Paul E. McKenney
2022-07-30 9:40 ` Michel Lespinasse
2022-07-30 18:16 ` Paul E. McKenney
2022-06-08 14:27 ` [PATCH 05/36] cpuidle: Move IRQ state validation Peter Zijlstra
2022-07-06 13:54 ` Rafael J. Wysocki
2022-06-08 14:27 ` [PATCH 06/36] cpuidle,riscv: Push RCU-idle into driver Peter Zijlstra
2022-06-08 14:27 ` [PATCH 07/36] cpuidle,tegra: " Peter Zijlstra
2022-06-08 14:27 ` [PATCH 08/36] cpuidle,psci: " Peter Zijlstra
2022-06-08 14:27 ` [PATCH 09/36] cpuidle,imx6: " Peter Zijlstra
2022-06-08 14:27 ` [PATCH 10/36] cpuidle,omap3: " Peter Zijlstra
2022-06-13 12:33 ` Tony Lindgren
2022-06-08 14:27 ` [PATCH 11/36] cpuidle,armada: " Peter Zijlstra
2022-06-08 14:27 ` [PATCH 12/36] cpuidle,omap2: " Peter Zijlstra
2022-06-13 12:33 ` Tony Lindgren
2022-06-08 14:27 ` [PATCH 13/36] cpuidle,dt: " Peter Zijlstra
2022-06-08 14:27 ` [PATCH 14/36] cpuidle: Fix rcu_idle_*() usage Peter Zijlstra
2022-06-14 12:41 ` Mark Rutland
2022-06-14 16:40 ` Peter Zijlstra
2022-06-14 16:59 ` Mark Rutland
2022-07-26 9:56 ` Gautham R. Shenoy
2022-06-08 14:27 ` [PATCH 15/36] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}() Peter Zijlstra
2022-06-14 16:13 ` Mark Rutland
2022-06-14 16:42 ` Peter Zijlstra
2022-06-14 16:53 ` Mark Rutland
2022-06-08 14:27 ` [PATCH 16/36] rcu: Fix rcu_idle_exit() Peter Zijlstra
2022-06-14 16:14 ` Mark Rutland
2022-06-15 0:44 ` Paul E. McKenney
2022-06-08 14:27 ` [PATCH 17/36] acpi_idle: Remove tracing Peter Zijlstra
2022-07-06 13:59 ` Rafael J. Wysocki
2022-06-08 14:27 ` [PATCH 18/36] cpuidle: Annotate poll_idle() Peter Zijlstra
2022-07-06 14:00 ` Rafael J. Wysocki
2022-06-08 14:27 ` [PATCH 19/36] objtool/idle: Validate __cpuidle code as noinstr Peter Zijlstra
2022-07-06 9:46 ` Geert Uytterhoeven
2022-06-08 14:27 ` [PATCH 20/36] arch/idle: Change arch_cpu_idle() IRQ behaviour Peter Zijlstra
2022-06-08 16:22 ` Arnd Bergmann
2022-06-14 16:22 ` Mark Rutland
2022-07-06 14:02 ` Rafael J. Wysocki
2022-06-08 14:27 ` [PATCH 21/36] x86/tdx: Remove TDX_HCALL_ISSUE_STI Peter Zijlstra
2022-06-13 8:26 ` Lai Jiangshan
2022-06-13 8:41 ` Peter Zijlstra
2022-06-08 14:27 ` [PATCH 22/36] arm,smp: Remove trace_.*_rcuidle() usage Peter Zijlstra
2022-06-08 14:27 ` [PATCH 23/36] arm64,smp: " Peter Zijlstra
2022-06-14 16:24 ` Mark Rutland
2022-06-15 6:05 ` Marc Zyngier
2022-06-08 14:27 ` [PATCH 24/36] printk: " Peter Zijlstra
2022-06-09 9:16 ` Petr Mladek
2022-06-09 10:02 ` Peter Zijlstra
2022-06-09 11:30 ` Sergey Senozhatsky
2022-06-09 13:02 ` Petr Mladek
2022-06-11 2:33 ` Sergey Senozhatsky
2022-06-14 14:37 ` Steven Rostedt
2022-06-09 13:06 ` Petr Mladek
2022-06-11 2:23 ` Sergey Senozhatsky
2022-06-09 10:14 ` Petr Mladek
2022-06-08 14:27 ` [PATCH 25/36] time/tick-broadcast: Remove RCU_NONIDLE usage Peter Zijlstra
2022-06-14 16:28 ` Mark Rutland
2022-06-08 14:27 ` [PATCH 26/36] cpuidle,sched: Remove annotations from TIF_{POLLING_NRFLAG,NEED_RESCHED} Peter Zijlstra
2022-06-08 14:27 ` [PATCH 27/36] cpuidle,mwait: Make noinstr clean Peter Zijlstra
2022-06-08 14:27 ` [PATCH 28/36] cpuidle,tdx: Make tdx " Peter Zijlstra
2022-06-08 14:27 ` [PATCH 29/36] cpuidle,xenpv: Make more PARAVIRT_XXL " Peter Zijlstra
2022-06-13 18:48 ` Srivatsa S. Bhat [this message]
2022-06-13 19:23 ` [Pv-drivers] [PATCH 29/36] cpuidle, xenpv: " Nadav Amit
2022-06-14 16:44 ` Peter Zijlstra
2022-06-08 14:27 ` [PATCH 30/36] cpuidle,nospec: Make " Peter Zijlstra
2022-06-08 14:27 ` [PATCH 31/36] cpuidle,acpi: " Peter Zijlstra
2022-07-06 14:04 ` Rafael J. Wysocki
2022-06-08 14:27 ` [PATCH 32/36] ftrace: WARN on rcuidle Peter Zijlstra
2022-06-08 14:27 ` [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Peter Zijlstra
2022-06-08 16:28 ` Arnd Bergmann
2022-06-09 7:39 ` Tony Lindgren
2022-06-09 9:47 ` Peter Zijlstra
2022-06-09 9:40 ` Peter Zijlstra
2022-06-13 12:36 ` Tony Lindgren
2022-06-08 14:27 ` [PATCH 34/36] cpuidle,omap3: Push RCU-idle into omap_sram_idle() Peter Zijlstra
2022-06-08 15:04 ` Peter Zijlstra
2022-06-13 12:35 ` Tony Lindgren
2022-06-13 12:39 ` [PATCH 34.5/36] cpuidle,omap4: Push RCU-idle into omap4_enter_lowpower() Tony Lindgren
2022-06-14 22:12 ` Peter Zijlstra
2022-06-15 5:35 ` Tony Lindgren
2022-06-08 14:27 ` [PATCH 35/36] cpuidle,powerdomain: Remove trace_.*_rcuidle() Peter Zijlstra
2022-06-08 14:27 ` [PATCH 36/36] cpuidle,clk: " Peter Zijlstra
2022-06-08 20:03 ` Stephen Boyd
2022-06-14 11:19 ` [PATCH 00/36] cpuidle,rcu: Cleanup the mess Mark Rutland
2022-06-14 16:58 ` Peter Zijlstra
2022-06-14 17:33 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=510b9b68-7d53-7d4d-5a05-37fbd199eb4b@csail.mit.edu \
--to=srivatsa@csail.mit.edu \
--cc=acme@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=agross@kernel.org \
--cc=borntraeger@linux.ibm.com \
--cc=bsegall@google.com \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=guoren@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=jolsa@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mattst88@gmail.com \
--cc=mturquette@baylibre.com \
--cc=paulus@samba.org \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rafael@kernel.org \
--cc=rth@twiddle.net \
--cc=s.hauer@pengutronix.de \
--cc=sammy@sammy.net \
--cc=senozhatsky@chromium.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).