From: <suravee.suthikulpanit@amd.com>
To: <iommu@lists.linux-foundation.org>, <joro@8bytes.org>
Cc: <ddutile@redhat.com>, <alex.williamson@redhat.com>,
<linux-kernel@vger.kernel.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [PATCH 1/3] iommu/amd: Adding amd_iommu_log cmdline option
Date: Wed, 22 May 2013 14:15:53 -0500 [thread overview]
Message-ID: <1369250155-12226-2-git-send-email-suravee.suthikulpanit@amd.com> (raw)
In-Reply-To: <1369250155-12226-1-git-send-email-suravee.suthikulpanit@amd.com>
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Adding amd_iommu_log command line option to allow "default", "verbose" and "debug"
IOMMU error logging level in kernel log.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
Documentation/kernel-parameters.txt | 10 ++++++++++
drivers/iommu/amd_iommu_init.c | 17 +++++++++++++++++
drivers/iommu/amd_iommu_types.h | 6 ++++++
3 files changed, 33 insertions(+)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index c3bfacb..752f0f9 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -350,6 +350,16 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
driver will print ACPI tables for AMD IOMMU during
IOMMU initialization.
+ amd_iommu_log= [HW,X86-64]
+ Specify parametes to choose the logging level. By default
+ the AMD IOMMU minimizes the logging detail, filters
+ duplicate log entries and suppress logging when encounters
+ storm of interrupts from a particular device.
+ Available options are:
+ default - Default log level.
+ verbose - Output detail log messages.
+ debug - Output detail log messages and no filter/suppress.
+
amijoy.map= [HW,JOY] Amiga joystick support
Map of devices attached to JOY0DAT and JOY1DAT
Format: <a>,<b>
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index bf51abb..66e3722 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -157,6 +157,8 @@ bool amd_iommu_v2_present __read_mostly;
bool amd_iommu_force_isolation __read_mostly;
+int amd_iommu_log_level __read_mostly = AMD_IOMMU_LOG_DEFAULT;
+
/*
* List of protection domains - used during resume
*/
@@ -2157,6 +2159,20 @@ static int __init parse_amd_iommu_options(char *str)
return 1;
}
+static int __init parse_amd_iommu_log(char *str)
+{
+ for (; *str; ++str) {
+ if (strncmp(str, "default", 7) == 0)
+ amd_iommu_log_level = AMD_IOMMU_LOG_DEFAULT;
+ else if (strncmp(str, "verbose", 7) == 0)
+ amd_iommu_log_level = AMD_IOMMU_LOG_VERBOSE;
+ else if (strncmp(str, "debug", 5) == 0)
+ amd_iommu_log_level = AMD_IOMMU_LOG_DEBUG;
+ }
+
+ return 1;
+}
+
static int __init parse_ivrs_ioapic(char *str)
{
unsigned int bus, dev, fn;
@@ -2219,6 +2235,7 @@ static int __init parse_ivrs_hpet(char *str)
__setup("amd_iommu_dump", parse_amd_iommu_dump);
__setup("amd_iommu=", parse_amd_iommu_options);
+__setup("amd_iommu_log=", parse_amd_iommu_log);
__setup("ivrs_ioapic", parse_ivrs_ioapic);
__setup("ivrs_hpet", parse_ivrs_hpet);
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index 0285a21..85b7a65 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -694,6 +694,12 @@ extern bool amd_iommu_v2_present;
extern bool amd_iommu_force_isolation;
+#define AMD_IOMMU_LOG_DEFAULT 0
+#define AMD_IOMMU_LOG_VERBOSE 1
+#define AMD_IOMMU_LOG_DEBUG 2
+
+extern int amd_iommu_log_level;
+
/* Max levels of glxval supported */
extern int amd_iommu_max_glx_val;
--
1.7.10.4
next prev parent reply other threads:[~2013-05-22 19:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 19:15 [PATCH 0/3] iommu/amd: IOMMU Error Reporting/Handling/Filtering suravee.suthikulpanit
2013-05-22 19:15 ` suravee.suthikulpanit [this message]
2013-05-22 19:15 ` [PATCH 2/3] iommu/amd: Add error handling/reporting/filtering logic suravee.suthikulpanit
2013-05-22 19:15 ` [PATCH 3/3] iommu/amd: Remove old event printing logic suravee.suthikulpanit
2013-06-04 5:27 ` [PATCH 0/3] iommu/amd: IOMMU Error Reporting/Handling/Filtering Suravee Suthikulpanit
2013-06-21 15:15 ` Joerg Roedel
2013-06-21 15:59 ` Borislav Petkov
2013-06-21 16:24 ` Joerg Roedel
2013-06-21 16:44 ` Shuah Khan
2013-06-21 17:36 ` Borislav Petkov
2013-06-24 7:26 ` Joerg Roedel
2013-06-24 7:41 ` Borislav Petkov
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=1369250155-12226-2-git-send-email-suravee.suthikulpanit@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=alex.williamson@redhat.com \
--cc=ddutile@redhat.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®