WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] iommu: Make the iommu boot parameters mor

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] iommu: Make the iommu boot parameters more generic and flexible
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 07 Aug 2008 02:00:21 -0700
Delivery-date: Thu, 07 Aug 2008 02:01:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1218032297 -3600
# Node ID 41b7d2e54588d5c6751888ecfefd6715fcc694b4
# Parent  c329dcc9df04ade9c183bfb696bca37296d80a1f
iommu: Make the iommu boot parameters more generic and flexible

Make the 'iommu' boot parameter take a comma separated value
indicating whether iommu is required to boot and whether to enable
iommu for pv domains.

Signed-off-by: Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx>
---
 xen/drivers/passthrough/iommu.c |   40 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 35 insertions(+), 5 deletions(-)

diff -r c329dcc9df04 -r 41b7d2e54588 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c   Wed Aug 06 11:38:42 2008 +0100
+++ b/xen/drivers/passthrough/iommu.c   Wed Aug 06 15:18:17 2008 +0100
@@ -20,18 +20,48 @@
 
 extern struct iommu_ops intel_iommu_ops;
 extern struct iommu_ops amd_iommu_ops;
+static void parse_iommu_param(char *s);
 static int iommu_populate_page_table(struct domain *d);
 int intel_vtd_setup(void);
 int amd_iov_detect(void);
 
+/*
+ * The 'iommu' parameter enables the IOMMU.  Optional comma separated
+ * value may contain:
+ *
+ *   off|no|false|disable       Disable IOMMU (default)
+ *   pv                         Enable IOMMU for PV domains
+ *   no-pv                      Disable IOMMU for PV domains (default)
+ *   force|required             Don't boot unless IOMMU is enabled
+ */
+custom_param("iommu", parse_iommu_param);
 int iommu_enabled = 0;
-boolean_param("iommu", iommu_enabled);
-
 int iommu_pv_enabled = 0;
-boolean_param("iommu_pv", iommu_pv_enabled);
-
 int force_iommu = 0;
-boolean_param("force_iommu", force_iommu);
+
+static void __init parse_iommu_param(char *s)
+{
+    char *ss;
+    iommu_enabled = 1;
+
+    do {
+        ss = strchr(s, ',');
+        if ( ss )
+            *ss = '\0';
+
+        if ( !strcmp(s, "off") || !strcmp(s, "no") || !strcmp(s, "false") ||
+             !strcmp(s, "0") || !strcmp(s, "disable") )
+            iommu_enabled = 0;
+        else if ( !strcmp(s, "pv") )
+            iommu_pv_enabled = 1;
+        else if ( !strcmp(s, "no-pv") )
+            iommu_pv_enabled = 0;
+        else if ( !strcmp(s, "force") || !strcmp(s, "required") )
+            force_iommu = 1;
+
+        s = ss + 1;
+    } while ( ss );
+}
 
 int iommu_domain_init(struct domain *domain)
 {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] iommu: Make the iommu boot parameters more generic and flexible, Xen patchbot-unstable <=