From: Don Zickus <dzickus@redhat.com>
To: mingo@elte.hu, fweisbec@gmail.com, andi@firstfloor.org
Cc: robert.richter@amd.com, gorcunov@gmail.com, linux-kernel@vger.kernel.org
Subject: [RFC] arch generic way to trigger unknown NMIs
Date: Wed, 6 Oct 2010 23:08:07 -0400 [thread overview]
Message-ID: <20101007030807.GA4076@redhat.com> (raw)
Hi,
I was trying to put some automation test scripts together and was looking
for an arch neutral way to generate an unknown NMI. I know some arches
do not support NMI. Any way I wanted to add the code to the lkdtm module,
so I could more easily generate unknown NMIs without hacking up the code.
For x86, I have been using:
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
index ef34de7..c685242 100644
--- a/drivers/misc/lkdtm.c
+++ b/drivers/misc/lkdtm.c
@@ -43,6 +43,7 @@
#include <linux/slab.h>
#include <scsi/scsi_cmnd.h>
#include <linux/debugfs.h>
+#include <asm/apic.h>
#ifdef CONFIG_IDE
#include <linux/ide.h>
@@ -78,6 +79,7 @@ enum ctype {
SOFTLOCKUP,
HARDLOCKUP,
HUNG_TASK,
+ NMI,
};
static char* cp_name[] = {
@@ -105,6 +107,7 @@ static char* cp_type[] = {
"SOFTLOCKUP",
"HARDLOCKUP",
"HUNG_TASK",
+ "NMI",
};
static struct jprobe lkdtm;
@@ -340,6 +343,9 @@ static void lkdtm_do_action(enum ctype which)
set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
break;
+ case NMI:
+ apic->send_IPI_allbutself(NMI_VECTOR);
+ break;
case NONE:
default:
break;
Anyone have any thoughts? Maybe there is an easier way?
Thanks,
Don
next reply other threads:[~2010-10-07 3:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 3:08 Don Zickus [this message]
2010-10-07 7:26 ` [RFC] arch generic way to trigger unknown NMIs Andi Kleen
2010-10-07 14:01 ` Don Zickus
2010-10-07 15:11 ` Andi Kleen
2010-10-07 15:47 ` Don Zickus
2010-10-07 16:17 ` Andi Kleen
2010-10-07 22:45 ` Maciej W. Rozycki
2010-10-10 20:23 ` Cyrill Gorcunov
2010-10-16 7:24 ` Maciej W. Rozycki
2010-10-16 15:32 ` Cyrill Gorcunov
2010-10-16 16:15 ` Maciej W. Rozycki
2010-10-16 16:36 ` Cyrill Gorcunov
2010-10-16 23:59 ` Maciej W. Rozycki
2010-10-17 8:58 ` Cyrill Gorcunov
2010-10-17 16:08 ` Cyrill Gorcunov
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=20101007030807.GA4076@redhat.com \
--to=dzickus@redhat.com \
--cc=andi@firstfloor.org \
--cc=fweisbec@gmail.com \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robert.richter@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.