Re: [RFC] #MC mess

Steven Rostedt
2020-02-18T23:17:38Z

On Tue, 18 Feb 2020 15:10:17 -0800
Andy Lutomirski <luto@amacapital.net> wrote:

> > On Feb 18, 2020, at 10:20 AM, Luck, Tony <tony.luck@intel.com> wrote:
> >
> > ﻿
> >>
> >> Anything else I'm missing? It is likely...
> >
> > + hw_breakpoint_disable();
> > + static_key_disable(&__tracepoint_read_msr.key);
> > + tracing_off();
> > +
> > ist_enter(regs);
> >
> > How about some code to turn all those back on for a recoverable (where we actually recovered) #MC?
> >
> >
>
>
> At the very least, in the user_mode(regs) case, tracing is fine.

Also, I don't think "tracing_off()" is what is wanted here. That just
disables writing to the ring buffer, which can be called in pretty much
any context (if it's before in_nmi() get's set, the worse thing that
happens is that events will get dropped due to the recursion protection
that checks to make sure there's no re-entrant events at the same level
of context).

The only issue with having function tracing enabled, is that it may add
a breakpoint when it gets turned on or off. And that tracing_off()
doesn't prevent that.

tracepoints still use RCU of some kind, and the protection there has
nothing to do with whether a trace point does recording or not.

-- Steve