Re: [PATCH] watchdog: hpwdt: Remove spinlock acquire and BIOS calls from NMI context

Ingo Molnar
2018-02-15T19:02:34Z

* Jerry Hoemann <jerry.hoemann@hpe.com> wrote:

> On Thu, Feb 15, 2018 at 12:17:04AM +0100, Ingo Molnar wrote:
> >
> > * Jerry Hoemann <jerry.hoemann@hpe.com> wrote:
> >
> > >
> > > Ingo,
> > >
> > > I have a patch set under review that brings hpwdt into compliance
> > > with the watchdog core.
> > >
> > > One of the changes removes the callback into firmware in hpwdt_pretimeout
> > > and its associated spinlock.
> > >
> > > https://lkml.org/lkml/2018/2/12/30
> >
> > drivers/watchdog/hpwdt.c | 490 +----------------------------------------------
> > 1 file changed, 8 insertions(+), 482 deletions(-)
> >
> > Very nice, and this should solve all the NMI handling complications!
> >
> > > I will add you to the CC list of the next version of the set.
> >
> > Thanks!
> >
> > Ingo
>
>
> Ingo,
>
> Is your desire to remove of the firmware callback/spinlock in hpwdt_pretimeout
> related to David Woodhouse patch set:
>
> https://lkml.org/lkml/2018/2/14/305 ?
>
> Which I think are to mitigate performance issues resulting from the
> changes to address the specter/meltdown?

So the motivation was that we are trying to wrap BIOS/EFI calls into
Spectre-disabling sections - and while doing that we realized that hpwdt calls the
firmware from an NMI callback, which would have complicated the Spectre work..

But with that call removed from NMI context it's all perfect!

> Any there other changes to hpwdt needed related to this work?

No other changes needed I think!

Thanks,

Ingo