Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [patch V6 04/37] x86: Make hardware latency tracing explicit | Date | Mon, 18 May 2020 10:03:04 +0200 |
| |
Andy Lutomirski <luto@kernel.org> writes: > On Sun, May 17, 2020 at 1:48 AM Thomas Gleixner <tglx@linutronix.de> wrote: >> Remember this is about ensuring that all the state is properly >> established before any of this instrumentation muck can happen. >> >> DR7 handling is specific to #DB and done even before nmi_enter to >> prevent recursion. > > So why is this change needed?
We really want nmi_enter() to be the carefully crafted mechanism which establishes correct state in whatever strange context the exception hits. Not more, not less.
Random instrumentation has absolutely no business there and I went a long way to make sure that this is enforcible by objtool.
Aside of that the tracing which is contained in nmi_enter() is about taking timestamps for hardware latency detection. If someone runs hardware latency detection with active break/watchpoints then I really can't help it.
Thanks,
tglx
| |