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-4.1-testing] IOMMU: Fail if intremap is not availab

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] IOMMU: Fail if intremap is not available and iommu=required/force.
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Wed, 01 Jun 2011 03:15:10 +0100
Delivery-date: Tue, 31 May 2011 19:16:19 -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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306570568 -3600
# Node ID f408456e30e8850101fe3917b8b682ddba9e668f
# Parent  d0feff6ff44cfc5a20cc0e2adced7f151f49872b
IOMMU: Fail if intremap is not available and iommu=required/force.

Rather than sprinkling panic()s throughout the setup code hoist the
check up into common code.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
xen-unstable changeset:   23402:f979a1a69fe3
xen-unstable date:        Thu May 26 08:18:44 2011 +0100
---


diff -r d0feff6ff44c -r f408456e30e8 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c   Sat May 28 09:09:40 2011 +0100
+++ b/xen/drivers/passthrough/iommu.c   Sat May 28 09:16:08 2011 +0100
@@ -309,6 +309,7 @@
 int __init iommu_setup(void)
 {
     int rc = -ENODEV;
+    bool_t force_intremap = force_iommu && iommu_intremap;
 
     if ( iommu_dom0_strict )
         iommu_passthrough = 0;
@@ -319,8 +320,10 @@
         iommu_enabled = (rc == 0);
     }
 
-    if ( force_iommu && !iommu_enabled )
-        panic("IOMMU setup failed, crash Xen for security purpose!\n");
+    if ( (force_iommu && !iommu_enabled) ||
+         (force_intremap && !iommu_intremap) )
+        panic("Couldn't enable %s and iommu=required/force\n",
+              !iommu_enabled ? "IOMMU" : "Interrupt Remapping");
 
     if ( !iommu_enabled )
     {
diff -r d0feff6ff44c -r f408456e30e8 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Sat May 28 09:09:40 2011 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Sat May 28 09:16:08 2011 +0100
@@ -1996,6 +1996,7 @@
             iommu = drhd->iommu;
             if ( enable_intremap(iommu, 0) != 0 )
             {
+                iommu_intremap = 0;
                 dprintk(XENLOG_WARNING VTDPREFIX,
                         "Failed to enable Interrupt Remapping!\n");
                 break;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] IOMMU: Fail if intremap is not available and iommu=required/force., Xen patchbot-4 . 1-testing <=