Re: [Pv-drivers] [PATCH 29/36] cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean
From: Peter Zijlstra <peterz@infradead.org>
Date: 2022-06-14 16:45:22
Also in:
linux-acpi, linux-alpha, linux-arch, linux-arm-msm, linux-clk, linux-m68k, linux-mips, linux-omap, linux-perf-users, linux-pm, linux-riscv, linux-s390, linux-sh, linux-tegra, linux-um, lkml, rcu, sparclinux, virtualization, xen-devel
rtualization@lists.linux-foundation.org>, "James.Bottomley@hansenpartnership.com" [off-list ref], "jcmvbkbc@gmail.com" [off-list ref], "thierry.reding@gmail.com" [off-list ref], "kernel@xen0n.name" [off-list ref], "quic_neeraju@quicinc.com" [off-list ref], linux-s390 [off-list ref], "vschneid@redhat.com" [off-list ref], "john.ogness@linutronix.de" [off-list ref], "ysato@users.sourceforge.jp" [off-list ref], "festevam@gmail.com" [off-list ref], "deller@gmx.de" [off-list ref], "daniel.lezcano@linaro.org" [off-list ref], "jonathanh@nvidia.com" [off-list ref], "hca@linux.ibm.com" [off-list ref], "lenb@kernel.org" [off-list ref], "linux-xtensa@linux-xtensa.org" [off-list ref], "jolsa@kernel.org" [off-list ref], "gor@linux.ibm.com" [off-list ref], "linux-arm-msm@vger.kernel.org" [off-list ref], "sudeep.hol la@arm.com" [off-list ref], "linux-m68k@lists.linux-m68k.org" [off-list ref], "shorne@gmail.com" [off-list ref], "linux-arm-kernel@lists.infradead.org" [off-list ref], "chris@zankel.net" [off-list ref], "sboyd@kernel.org" [off-list ref], "dinguyen@kernel.org" [off-list ref], "bristot@redhat.com" [off-list ref], "chenhuacai@kernel.org" [off-list ref], "alexander.shishkin@linux.intel.com" [off-list ref], "mturquette@baylibre.com" [off-list ref], "linux@rasmusvillemoes.dk" [off-list ref], "joel@joelfernandes.org" [off-list ref], Will Deacon [off-list ref], Boris Ostrovsky [off-list ref], "khilman@kernel.org" [off-list ref], "linux-csky@vger.kernel.org" [off-list ref], "tony@atomide.com" [off-list ref], "linux-snps-arc@lists.infradead.org" [off-list ref], Mel Gorman [off-list ref], "j acob.jun.pan@linux.intel.com" <jacob.jun.pan@linux.in tel.com>, Arnd Bergmann [off-list ref], "ulli.kroll@googlemail.com" [off-list ref], "vgupta@kernel.org" [off-list ref], "josh@joshtriplett.org" [off-list ref], Steven Rostedt [off-list ref], "rcu@vger.kernel.org" [off-list ref], Mathieu Desnoyers [off-list ref], "bcain@quicinc.com" [off-list ref], "tsbogend@alpha.franken.de" [off-list ref], "linux-parisc@vger.kernel.org" [off-list ref], "anup@brainfault.org" [off-list ref], "srivatsa@csail.mit.edu" [off-list ref], "linux-alpha@vger.kernel.org" [off-list ref], "shawnguo@kernel.org" [off-list ref], "davem@davemloft.net" [off-list ref], "dalias@libc.org" [off-list ref], Pv-drivers [off-list ref], "bjorn.andersson@linaro.org" [off-list ref], "H. Peter Anvin" [off-list ref], "sparclinux@vger.kernel.org" [off-list ref], "linux-riscv@lists.infradead.org" <linux-r iscv@lists.infradead.org>, Anton Ivanov [off-list ref], "jonas@southpole.se" [off-list ref], "yury.norov@gmail.com" [off-list ref], "richard@nod.at" [off-list ref], X86 ML [off-list ref], "linux@armlinux.org.uk" [off-list ref], "agross@kernel.org" [off-list ref], "aou@eecs.berkeley.edu" [off-list ref], "paulmck@kernel.org" [off-list ref], "frederic@kernel.org" [off-list ref], "stefan.kristiansson@saunalahti.fi" [off-list ref], "openrisc@lists.librecores.org" [off-list ref], "paul.walmsley@sifive.com" [off-list ref], "linux-tegra@vger.kernel.org" [off-list ref], "namhyung@kernel.org" [off-list ref], "andriy.shevchenko@linux.intel.com" [off-list ref], "jpoimboe@kernel.org" [off-list ref], Juergen Gross [off-list ref], "monstr@monstr.eu" [off-list ref], "linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org >, "palmer@dabbelt.com" [off-list ref], "linux- hexagon@vger.kernel.org" [off-list ref], Borislav Petkov [off-list ref], "johannes@sipsolutions.net" [off-list ref], linuxppc-dev [off-list ref] Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" [off-list ref] On Mon, Jun 13, 2022 at 07:23:13PM +0000, Nadav Amit wrote:
On Jun 13, 2022, at 11:48 AM, Srivatsa S. Bhat [off-list ref] wrote:quoted
⚠ External Email On 6/8/22 4:27 PM, Peter Zijlstra wrote:quoted
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) <redacted>quoted
-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)); }I guess it is yet another instance of wrong accounting of GCC for the assembly blocks’ weight. I guess it is not a solution for older GCCs, but presumably ____PVOP_ALT_CALL() and friends should have used asm_inline or some new “asm_volatile_inline” variant.
Partially, some of the *SAN options also generate a metric ton of nonsense when enabled and skew the compilers towards not inlining things.