[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZykbvVZ32FKCRT_q@smile.fi.intel.com>
Date: Mon, 4 Nov 2024 21:08:45 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>
Subject: Re: [PATCH v2 1/1] x86/reboot: KVM: Guard
nmi_shootdown_cpus_on_restart() with ifdeffery
On Thu, Oct 10, 2024 at 02:37:59AM +0300, Andy Shevchenko wrote:
> Wed, Oct 09, 2024 at 12:34:37PM -0700, Sean Christopherson kirjoitti:
> > On Tue, Oct 08, 2024, Andy Shevchenko wrote:
> > > The nmi_shootdown_cpus_on_restart() in some cases may be not used.
> > > This, in particular, prevents kernel builds with clang, `make W=1`
> > > and CONFIG_WERROR=y:
> > >
> > > arch/x86/kernel/reboot.c:957:20: error: unused function 'nmi_shootdown_cpus_on_restart' [-Werror,-Wunused-function]
> > > 957 | static inline void nmi_shootdown_cpus_on_restart(void)
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > Fix this by guarging the definitions with the respective KVM ifdeffery.
> > >
> > > See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
> > > inline functions for W=1 build").
>
> > Heh, I tried fixing this too, and have patches to clean things up, but I ended up
> > not posting them because I decided the W=1 warning was less ugly than the resulting
> > code in nmi_shootdown_cpus().
>
> CONFIG_WERROR=y is the default (at least in the current defconfigs for x86).
> My goal is to match what ARM builds survive (to some extend?), i.e. W=1, so
> may one apply either version I provided or yours?
>
> > If we're willing to take on a bit of weirdness in nmi_shootdown_cpus(), then much
> > of the #ifdeffery can go away. Patches attached (lightly tested).
So, what's the status either with the proposed change or with what Sean shared?
Can we somehow move forward to fix the issue?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists