Re: [PATCH RFC] x86/cpu: fix intermittent lockup on poweroff

From: Andi Kleen
Date: Wed Apr 26 2023 - 18:02:26 EST


> > > This is probably going to pull in a cache line and cause the problem the
> > > native_wbinvd() is trying to avoid.
> >
> > Is one _more_ cacheline really the problem?
>
> The answer is it depends. If the cacheline ends up modified/dirty, then it
> can be a problem.

I haven't followed this all in detail, but if any dirty cache line a
problem you probably would need to be sure that any possible NMI user
(like perf or watchdogs) is disabled at this point, otherwise you could
still get NMIs here.

I don't think perf currently has a mechanism to do that other
than to offline the CPU.

Also there are of course machine checks and SMIs that could still happen,
but I guess there's nothing you could do about them.

-Andi