[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pv-drivers] [PATCH 29/36] cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean
- To: Nadav Amit <namit@xxxxxxxxxx>
- From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- Date: Tue, 14 Jun 2022 18:44:02 +0200
- Cc: "srivatsa@xxxxxxxxxxxxx" <srivatsa@xxxxxxxxxxxxx>, "juri.lelli@xxxxxxxxxx" <juri.lelli@xxxxxxxxxx>, "rafael@xxxxxxxxxx" <rafael@xxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, "linus.walleij@xxxxxxxxxx" <linus.walleij@xxxxxxxxxx>, "bsegall@xxxxxxxxxx" <bsegall@xxxxxxxxxx>, "guoren@xxxxxxxxxx" <guoren@xxxxxxxxxx>, "pavel@xxxxxx" <pavel@xxxxxx>, "agordeev@xxxxxxxxxxxxx" <agordeev@xxxxxxxxxxxxx>, "linux-clk@xxxxxxxxxxxxxxx" <linux-clk@xxxxxxxxxxxxxxx>, linux-arch <linux-arch@xxxxxxxxxxxxxxx>, "vincent.guittot@xxxxxxxxxx" <vincent.guittot@xxxxxxxxxx>, "mpe@xxxxxxxxxxxxxx" <mpe@xxxxxxxxxxxxxx>, "chenhuacai@xxxxxxxxxx" <chenhuacai@xxxxxxxxxx>, "linux-acpi@xxxxxxxxxxxxxxx" <linux-acpi@xxxxxxxxxxxxxxx>, "agross@xxxxxxxxxx" <agross@xxxxxxxxxx>, "geert@xxxxxxxxxxxxxx" <geert@xxxxxxxxxxxxxx>, "linux-imx@xxxxxxx" <linux-imx@xxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "mattst88@xxxxxxxxx" <mattst88@xxxxxxxxx>, "borntraeger@xxxxxxxxxxxxx" <borntraeger@xxxxxxxxxxxxx>, "mturquette@xxxxxxxxxxxx" <mturquette@xxxxxxxxxxxx>, "sammy@xxxxxxxxx" <sammy@xxxxxxxxx>, "pmladek@xxxxxxxx" <pmladek@xxxxxxxx>, "linux-pm@xxxxxxxxxxxxxxx" <linux-pm@xxxxxxxxxxxxxxx>, "jiangshanlai@xxxxxxxxx" <jiangshanlai@xxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, "linux-um@xxxxxxxxxxxxxxxxxxx" <linux-um@xxxxxxxxxxxxxxxxxxx>, "acme@xxxxxxxxxx" <acme@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, "linux-omap@xxxxxxxxxxxxxxx" <linux-omap@xxxxxxxxxxxxxxx>, "dietmar.eggemann@xxxxxxx" <dietmar.eggemann@xxxxxxx>, "rth@xxxxxxxxxxx" <rth@xxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, "linux-perf-users@xxxxxxxxxxxxxxx" <linux-perf-users@xxxxxxxxxxxxxxx>, "senozhatsky@xxxxxxxxxxxx" <senozhatsky@xxxxxxxxxxxx>, "svens@xxxxxxxxxxxxx" <svens@xxxxxxxxxxxxx>, "jolsa@xxxxxxxxxx" <jolsa@xxxxxxxxxx>, "paulus@xxxxxxxxx" <paulus@xxxxxxxxx>, "mark.rutland@xxxxxxx" <mark.rutland@xxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Linux Virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "James.Bottomley@xxxxxxxxxxxxxxxxxxxxx" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "jcmvbkbc@xxxxxxxxx" <jcmvbkbc@xxxxxxxxx>, "thierry.reding@xxxxxxxxx" <thierry.reding@xxxxxxxxx>, "kernel@xxxxxxxxxx" <kernel@xxxxxxxxxx>, "quic_neeraju@xxxxxxxxxxx" <quic_neeraju@xxxxxxxxxxx>, linux-s390 <linux-s390@xxxxxxxxxxxxxxx>, "vschneid@xxxxxxxxxx" <vschneid@xxxxxxxxxx>, "john.ogness@xxxxxxxxxxxxx" <john.ogness@xxxxxxxxxxxxx>, "ysato@xxxxxxxxxxxxxxxxxxxx" <ysato@xxxxxxxxxxxxxxxxxxxx>, "linux-sh@xxxxxxxxxxxxxxx" <linux-sh@xxxxxxxxxxxxxxx>, "festevam@xxxxxxxxx" <festevam@xxxxxxxxx>, "deller@xxxxxx" <deller@xxxxxx>, "daniel.lezcano@xxxxxxxxxx" <daniel.lezcano@xxxxxxxxxx>, "jonathanh@xxxxxxxxxx" <jonathanh@xxxxxxxxxx>, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, "frederic@xxxxxxxxxx" <frederic@xxxxxxxxxx>, "lenb@xxxxxxxxxx" <lenb@xxxxxxxxxx>, "linux-xtensa@xxxxxxxxxxxxxxxx" <linux-xtensa@xxxxxxxxxxxxxxxx>, "kernel@xxxxxxxxxxxxxx" <kernel@xxxxxxxxxxxxxx>, "gor@xxxxxxxxxxxxx" <gor@xxxxxxxxxxxxx>, "linux-arm-msm@xxxxxxxxxxxxxxx" <linux-arm-msm@xxxxxxxxxxxxxxx>, "linux-alpha@xxxxxxxxxxxxxxx" <linux-alpha@xxxxxxxxxxxxxxx>, "linux-m68k@xxxxxxxxxxxxxxxxxxxx" <linux-m68k@xxxxxxxxxxxxxxxxxxxx>, "shorne@xxxxxxxxx" <shorne@xxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "chris@xxxxxxxxxx" <chris@xxxxxxxxxx>, "sboyd@xxxxxxxxxx" <sboyd@xxxxxxxxxx>, "dinguyen@xxxxxxxxxx" <dinguyen@xxxxxxxxxx>, "bristot@xxxxxxxxxx" <bristot@xxxxxxxxxx>, "alexander.shishkin@xxxxxxxxxxxxxxx" <alexander.shishkin@xxxxxxxxxxxxxxx>, "lpieralisi@xxxxxxxxxx" <lpieralisi@xxxxxxxxxx>, "linux@xxxxxxxxxxxxxxxxxx" <linux@xxxxxxxxxxxxxxxxxx>, "joel@xxxxxxxxxxxxxxxxx" <joel@xxxxxxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, "khilman@xxxxxxxxxx" <khilman@xxxxxxxxxx>, "linux-csky@xxxxxxxxxxxxxxx" <linux-csky@xxxxxxxxxxxxxxx>, Pv-drivers <Pv-drivers@xxxxxxxxxx>, "linux-snps-arc@xxxxxxxxxxxxxxxxxxx" <linux-snps-arc@xxxxxxxxxxxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxx>, "jacob.jun.pan@xxxxxxxxxxxxxxx" <jacob.jun.pan@xxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, "ulli.kroll@xxxxxxxxxxxxxx" <ulli.kroll@xxxxxxxxxxxxxx>, "vgupta@xxxxxxxxxx" <vgupta@xxxxxxxxxx>, "josh@xxxxxxxxxxxxxxxx" <josh@xxxxxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, "rcu@xxxxxxxxxxxxxxx" <rcu@xxxxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, "bcain@xxxxxxxxxxx" <bcain@xxxxxxxxxxx>, "tsbogend@xxxxxxxxxxxxxxxx" <tsbogend@xxxxxxxxxxxxxxxx>, "linux-parisc@xxxxxxxxxxxxxxx" <linux-parisc@xxxxxxxxxxxxxxx>, "sudeep.holla@xxxxxxx" <sudeep.holla@xxxxxxx>, "shawnguo@xxxxxxxxxx" <shawnguo@xxxxxxxxxx>, "davem@xxxxxxxxxxxxx" <davem@xxxxxxxxxxxxx>, "dalias@xxxxxxxx" <dalias@xxxxxxxx>, "tony@xxxxxxxxxxx" <tony@xxxxxxxxxxx>, "bjorn.andersson@xxxxxxxxxx" <bjorn.andersson@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "linux-hexagon@xxxxxxxxxxxxxxx" <linux-hexagon@xxxxxxxxxxxxxxx>, "linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>, Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx>, "jonas@xxxxxxxxxxxx" <jonas@xxxxxxxxxxxx>, "yury.norov@xxxxxxxxx" <yury.norov@xxxxxxxxx>, "richard@xxxxxx" <richard@xxxxxx>, X86 ML <x86@xxxxxxxxxx>, "linux@xxxxxxxxxxxxxxx" <linux@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, "aou@xxxxxxxxxxxxxxxxx" <aou@xxxxxxxxxxxxxxxxx>, "paulmck@xxxxxxxxxx" <paulmck@xxxxxxxxxx>, "hca@xxxxxxxxxxxxx" <hca@xxxxxxxxxxxxx>, "stefan.kristiansson@xxxxxxxxxxxxx" <stefan.kristiansson@xxxxxxxxxxxxx>, "openrisc@xxxxxxxxxxxxxxxxxxxx" <openrisc@xxxxxxxxxxxxxxxxxxxx>, "paul.walmsley@xxxxxxxxxx" <paul.walmsley@xxxxxxxxxx>, "linux-tegra@xxxxxxxxxxxxxxx" <linux-tegra@xxxxxxxxxxxxxxx>, "namhyung@xxxxxxxxxx" <namhyung@xxxxxxxxxx>, "andriy.shevchenko@xxxxxxxxxxxxxxx" <andriy.shevchenko@xxxxxxxxxxxxxxx>, "jpoimboe@xxxxxxxxxx" <jpoimboe@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "monstr@xxxxxxxxx" <monstr@xxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "palmer@xxxxxxxxxxx" <palmer@xxxxxxxxxxx>, "anup@xxxxxxxxxxxxxx" <anup@xxxxxxxxxxxxxx>, "ink@xxxxxxxxxxxxxxxxxxxx" <ink@xxxxxxxxxxxxxxxxxxxx>, "johannes@xxxxxxxxxxxxxxxx" <johannes@xxxxxxxxxxxxxxxx>, linuxppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 15 Jun 2022 04:05:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.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 <srivatsa@xxxxxxxxxxxxx> 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) <peterz@xxxxxxxxxxxxx>
> >
> > Reviewed-by: Srivatsa S. Bhat (VMware) <srivatsa@xxxxxxxxxxxxx>
> >
> >>
> >> -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.
|