Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1640875iog; Tue, 14 Jun 2022 10:00:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgk+rvBP19fvy5/mVhHACNl3qFZLLtHkCulr2qR42S3njwx0ewahHYbFTabXmzeWgS8Vr+ X-Received: by 2002:a05:6a00:2185:b0:520:7276:6570 with SMTP id h5-20020a056a00218500b0052072766570mr5692887pfi.84.1655226029271; Tue, 14 Jun 2022 10:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655226029; cv=none; d=google.com; s=arc-20160816; b=Y9umE5Jq1jsJ1cbyQzcAp3+xi+QvXuyjd1pzISTxDT94zURVzW2ArH0mxcQBcJ4BkQ 5uLT7MKlM4tWXPG4DOoEwiIFsZcHiu0bLS3R3JtHSeMP5tPbev6lDNqDwMEW3KYx42bj l1chDuZTR45NkomDDZwgrOutOmclJeknxa5CzqbcK1wUSmvdbHf3DiN2EhkYJAcGYaAu FxaHrmdKJoEQkeqIyAQEpS1xs0NA7hd0Tb2IIWLHiEJE+DtKQ0XWpiX3QVmnjzGk2HXT 1MOE4520okJ84Mfz4iZ016fX2kKIcq9PtWLUJpgHmELkjyPj0IgGAy8njH10MrrLhIoD QnZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lGPDnVOvpW5cJYkNK5aiO+HQt8YloxSeZZcAt0L3T+0=; b=EH49eFzhJ4pHL49le0c0ejlSxii5y4ojCAHuvSsBAyh2G2v5MaTrVzaAfQMooExyQp NN1a655vKcyd2JzG+AhI5luMjILeGrm9cG3HubWbY9OMmdue2pKEA1As7OBbWuPlekG/ 1ndx0PKYwcerOyfcH5VRqy5W5qpJEUh2cmOHIADOsvV+U4qIuRGQRJFjrDUl1GHZ3QiO lkcc+RXNJj8Fqc+esC1Zi7fQLW9Nyg+KOldFWFLazUpd+HlEYNxAVGegoCmfx4P+Zd1q 6/QKX84hMrEqb8chUqmoqYy3QfwVS7DorQmVySM/PGKpm6DN32kaP6brBfbUvk3Gh6lY XUkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MN0E+GuQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020aa79530000000b0051b8c526443si13479124pfp.171.2022.06.14.10.00.15; Tue, 14 Jun 2022 10:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MN0E+GuQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238505AbiFNQou (ORCPT + 99 others); Tue, 14 Jun 2022 12:44:50 -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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.