aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-08-29 09:53:07 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-29 09:53:07 +0200
commitfb3f1c1855bd9aca625bc0d040be4cdcc216e958 (patch)
treeeda55e638eae9594ed35e469842a95c082b49d2b /xen/common
parent3785d30efe8264b899499e0883b10cc434bd0959 (diff)
downloadxen-fb3f1c1855bd9aca625bc0d040be4cdcc216e958.tar.gz
xen-fb3f1c1855bd9aca625bc0d040be4cdcc216e958.tar.bz2
xen-fb3f1c1855bd9aca625bc0d040be4cdcc216e958.zip
AMD IOMMU: allow command line overrides for broken IVRS tables
With there being so many systems with broken ACPI tables, and with it generally being known what's wrong with those tables, give people a handle to overcome the resulting disabling of their IOMMUs. Inspired by Linux side patches providing similar functionality. Suggested-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-By: Sander Eikelenboom <linux@eikelenboom.it> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Suravee Suthikulpanit <suravee.suthikulapanit@amd.com>
Diffstat (limited to 'xen/common')
-rw-r--r--xen/common/kernel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 72fb9055b1..b8707d90a1 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -81,9 +81,15 @@ void __init cmdline_parse(const char *cmdline)
/* Search for value part of a key=value option. */
optval = strchr(opt, '=');
if ( optval != NULL )
+ {
*optval++ = '\0'; /* nul-terminate the option value */
+ q = strpbrk(opt, "([{<");
+ }
else
+ {
optval = q; /* default option value is empty string */
+ q = NULL;
+ }
/* Boolean parameters can be inverted with 'no-' prefix. */
bool_assert = !!strncmp("no-", optkey, 3);
@@ -93,7 +99,17 @@ void __init cmdline_parse(const char *cmdline)
for ( param = &__setup_start; param < &__setup_end; param++ )
{
if ( strcmp(param->name, optkey) )
+ {
+ if ( param->type == OPT_CUSTOM && q &&
+ strlen(param->name) == q + 1 - opt &&
+ !strncmp(param->name, opt, q + 1 - opt) )
+ {
+ optval[-1] = '=';
+ ((void (*)(const char *))param->var)(q);
+ optval[-1] = '\0';
+ }
continue;
+ }
switch ( param->type )
{