iommu: elaborate the usage of RMRR specification on the command line
authorVenu Busireddy <venu.busireddy@oracle.com>
Wed, 1 Mar 2017 09:29:23 +0000 (10:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 1 Mar 2017 09:29:23 +0000 (10:29 +0100)
As some users have suggested, elaborate the usage of RMRR specification
on the command line, and provide a usage example.

Also, always treat the specified page numbers as hexadecimal values.

Signed-off-by: Venu Busireddy <venu.busireddy@oracle.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
docs/misc/xen-command-line.markdown
xen/drivers/passthrough/vtd/dmar.c

index deeedf98099620b63dd69de9d684addcfde200cf..6882e357903b7dacebeb30b6e1d71c6f1daff66e 100644 (file)
@@ -1412,6 +1412,16 @@ If segment of the first device is not specified, segment zero will be used.
 If other segments are not specified, first device segment will be used.
 If a segment is specified for other than the first device and it does not match
 the one specified for the first one, an error will be reported.
+
+'start' and 'end' values are page numbers (not full physical addresses),
+in hexadecimal format (can optionally be preceded by "0x").
+
+Usage example: If device 0:0:1d.0 requires one page (0xd5d45) to be
+reserved, and device 0:0:1a.0 requires three pages (0xd5d46 thru 0xd5d48)
+to be reserved, one usage would be:
+
+rmrr=d5d45=0:0:1d.0;0xd5d46-0xd5d48=0:0:1a.0
+
 Note: grub2 requires to escape or use quotations if special characters are used,
 namely ';', refer to the grub2 documentation if multiple ranges are specified.
 
index 16ae6f6ef738b7b901aaaf3933b557b1e5bcb198..82040ddc05d75a68a11418b5e9930d93c1bae00a 100644 (file)
@@ -1097,13 +1097,13 @@ static void __init parse_rmrr_param(const char *str)
     unsigned long start, end;
 
     do {
-        start = simple_strtoul(cur = s, &s, 0);
+        start = simple_strtoul(cur = s, &s, 16);
         if ( cur == s )
             break;
 
         if ( *s == '-' )
         {
-            end = simple_strtoul(cur = s + 1, &s, 0);
+            end = simple_strtoul(cur = s + 1, &s, 16);
             if ( cur == s )
                 break;
         }