From: Steven Rostedt <rostedt@goodmis.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jason Baron <jbaron@redhat.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Paul Turner <pjt@google.com>
Subject: Re: [RFC][PATCH 3/3] x86: Add workaround to NMI iret woes
Date: Fri, 09 Dec 2011 10:00:28 -0500 [thread overview]
Message-ID: <1323442828.1937.17.camel@frodo> (raw)
In-Reply-To: <1323422521.17673.47.camel@twins>
On Fri, 2011-12-09 at 10:22 +0100, Peter Zijlstra wrote:
> Its was definitely tongue in cheek, also I did say this'll be a massive
> pain with paravirt since I doubt paravirt calls are NMI safe.
But does paravirt simulate NMIs? Does a guest ever take an NMI? I can
enable paravirt to see if it breaks.
>
> But yeah, it might all be slightly less painful than trying to teach the
> INT3 handler about this recursion.
That's my goal. Yes, I agree this is all just an ugly hack, but I'm
trying hard to keep the ugly hack contained in the NMI handling. Once
you start letting this hack spread, it will grow like a virus, and
resistance will be futile. And we will end up with nasty dependencies
that will become a horror show to maintain.
Right now, I've quarantined the NMI code, and I'm keeping the infection
at bay. The NMI code will grow warts and nasty appendages, but the NMI
code was ugly to begin with, and maybe these mutations might even make
it prettier. That's the nature of NMI. It's an ugly beast in all its
incarnations.
This is why I like my patches. It contains the damage to only the NMI
code. If something breaks from this code, it will be easy to find it. If
anything, a bisect should show exactly what caused change caused the
problem. But if we add hacks in other places, it will be much more
difficult to figure out.
>
> This all started with wanting to do pagefaults from NMI context, those
> too will have this recursion, although for faults we'll end up in the
> double fault handler, which seems to allow a slightly saner way out.
It didn't start with the pagefaults. That discussion only brought the
issue to LKML. This has been a pain in our side or breakpoints from day
one.
-- Steve
next prev parent reply other threads:[~2011-12-09 15:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 19:30 [RFC][PATCH 0/3] x86: Find a way to allow breakpoints in NMIs Steven Rostedt
2011-12-08 19:30 ` [RFC][PATCH 1/3] x86: Do not schedule while still in NMI context Steven Rostedt
2011-12-08 19:30 ` [RFC][PATCH 2/3] x86: Document the NMI handler about not using paranoid_exit Steven Rostedt
2011-12-08 19:30 ` [RFC][PATCH 3/3] x86: Add workaround to NMI iret woes Steven Rostedt
2011-12-08 19:36 ` Steven Rostedt
2011-12-09 2:43 ` Steven Rostedt
2011-12-09 9:22 ` Peter Zijlstra
2011-12-09 15:00 ` Steven Rostedt [this message]
2011-12-09 15:10 ` Peter Zijlstra
2011-12-09 15:25 ` Steven Rostedt
2011-12-09 15:20 ` Steven Rostedt
2011-12-09 16:34 ` Steven Rostedt
2011-12-09 17:19 ` Steven Rostedt
2011-12-09 17:49 ` Borislav Petkov
2011-12-09 18:20 ` Steven Rostedt
2011-12-09 16:49 ` Jason Baron
2011-12-09 17:14 ` Steven Rostedt
2011-12-09 12:40 ` Mathieu Desnoyers
2011-12-09 13:02 ` Mathieu Desnoyers
2011-12-09 14:49 ` Steven Rostedt
2011-12-09 15:02 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323442828.1937.17.camel@frodo \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox