From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF867CCA487 for ; Tue, 14 Jun 2022 16:45:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240932AbiFNQov (ORCPT ); Tue, 14 Jun 2022 12:44:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235710AbiFNQoT (ORCPT ); Tue, 14 Jun 2022 12:44:19 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA35919037; Tue, 14 Jun 2022 09:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=lGPDnVOvpW5cJYkNK5aiO+HQt8YloxSeZZcAt0L3T+0=; b=MN0E+GuQLLm4tM+GK8hWccQUFL PxmHsP4/A97SKIR0+ews6BPbY8JdimA4zzl8B8x1wTlPZj26+HyDjOVxj1Wvti7DkxrdahnIWXznf Sck8K5ryGTb2H97Q25XV5ua07NtZrt8RBovpr0tuOchGW9iLxyJb1i6ZL47+Eas56Gb5nEQiTe9bW l/5aGjKZFL1yA3gACFUDFeCqx4zcJMLiRKrPP5Wx+chh5o0sU6RQZsB3HldVraUQWhIlzWIv4ONvZ B8VU2ERHT/yK/yX47pqt+Uyn9a6PeiG9bFg6pm7fHV4nB44DfSKBjrV02VjqvtliTo2mpR5esSTG4 vZhkhfdg==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o19eA-000KXf-9W; Tue, 14 Jun 2022 16:44:06 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BEA18300372; Tue, 14 Jun 2022 18:44:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A1F7228B3F630; Tue, 14 Jun 2022 18:44:02 +0200 (CEST) Date: Tue, 14 Jun 2022 18:44:02 +0200 From: Peter Zijlstra To: Nadav Amit Cc: "srivatsa@csail.mit.edu" , "juri.lelli@redhat.com" , "rafael@kernel.org" , Benjamin Herrenschmidt , "linus.walleij@linaro.org" , "bsegall@google.com" , "guoren@kernel.org" , "pavel@ucw.cz" , "agordeev@linux.ibm.com" , "linux-clk@vger.kernel.org" , linux-arch , "vincent.guittot@linaro.org" , "mpe@ellerman.id.au" , "chenhuacai@kernel.org" , "linux-acpi@vger.kernel.org" , "agross@kernel.org" , "geert@linux-m68k.org" , "linux-imx@nxp.com" , Catalin Marinas , "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 , "linux-um@lists.infradead.org" , "acme@kernel.org" , Thomas Gleixner , "linux-omap@vger.kernel.org" , "dietmar.eggemann@arm.com" , "rth@twiddle.net" , Greg Kroah-Hartman , LKML , "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 Virtualization , "James.Bottomley@hansenpartnership.com" , "jcmvbkbc@gmail.com" , "thierry.reding@gmail.com" , "kernel@xen0n.name" , "quic_neeraju@quicinc.com" , linux-s390 , "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 , "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 Deacon , Boris Ostrovsky , "khilman@kernel.org" , "linux-csky@vger.kernel.org" , Pv-drivers , "linux-snps-arc@lists.infradead.org" , Mel Gorman , "jacob.jun.pan@linux.intel.com" , Arnd Bergmann , "ulli.kroll@googlemail.com" , "vgupta@kernel.org" , "josh@joshtriplett.org" , Steven Rostedt , "rcu@vger.kernel.org" , Borislav Petkov , "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" , "bjorn.andersson@linaro.org" , "H. Peter Anvin" , "sparclinux@vger.kernel.org" , "linux-hexagon@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Anton Ivanov , "jonas@southpole.se" , "yury.norov@gmail.com" , "richard@nod.at" , X86 ML , "linux@armlinux.org.uk" , Ingo Molnar , "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" , Juergen Gross , "monstr@monstr.eu" , "linux-mips@vger.kernel.org" , "palmer@dabbelt.com" , "anup@brainfault.org" , "ink@jurassic.park.msu.ru" , "johannes@sipsolutions.net" , linuxppc-dev Subject: Re: [Pv-drivers] [PATCH 29/36] cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean Message-ID: References: <20220608142723.103523089@infradead.org> <20220608144517.759631860@infradead.org> <510b9b68-7d53-7d4d-5a05-37fbd199eb4b@csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Mon, Jun 13, 2022 at 07:23:13PM +0000, Nadav Amit wrote: > On Jun 13, 2022, at 11:48 AM, Srivatsa S. Bhat wrote: > > > ⚠ External Email > > > > 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) > > > > Reviewed-by: Srivatsa S. Bhat (VMware) > > > >> > >> -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.