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] xen: AMD IOMMU: Automatically enable per-

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: AMD IOMMU: Automatically enable per-device vector maps
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 03 Aug 2011 21:44:17 +0100
Delivery-date: Wed, 03 Aug 2011 13:48:04 -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 George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1311701852 -3600
# Node ID fa4e2ca9ecffbc432b451f495ad0a403644a6be8
# Parent  2e0cf9428554da666616982cd0074024ff85b221
xen: AMD IOMMU: Automatically enable per-device vector maps

Automatically enable per-device vector maps when using IOMMU,
unless disabled specifically by an IOMMU parameter.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---


diff -r 2e0cf9428554 -r fa4e2ca9ecff xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Tue Jul 26 18:37:16 2011 +0100
+++ b/xen/arch/x86/irq.c        Tue Jul 26 18:37:32 2011 +0100
@@ -32,6 +32,7 @@
 unsigned int __read_mostly nr_irqs;
 integer_param("nr_irqs", nr_irqs);
 
+/* This default may be changed by the AMD IOMMU code */
 bool_t __read_mostly opt_irq_perdev_vector_map = 0;
 boolean_param("irq-perdev-vector-map", opt_irq_perdev_vector_map);
 
diff -r 2e0cf9428554 -r fa4e2ca9ecff xen/drivers/passthrough/amd/pci_amd_iommu.c
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c       Tue Jul 26 18:37:16 
2011 +0100
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c       Tue Jul 26 18:37:32 
2011 +0100
@@ -25,6 +25,9 @@
 #include <asm/amd-iommu.h>
 #include <asm/hvm/svm/amd-iommu-proto.h>
 
+extern bool_t __read_mostly opt_irq_perdev_vector_map;
+extern bool_t __read_mostly iommu_amd_perdev_vector_map;
+
 struct amd_iommu *find_iommu_for_device(int bdf)
 {
     BUG_ON ( bdf >= ivrs_bdf_entries );
@@ -148,6 +151,18 @@
         return -ENODEV;
     }
 
+    /* Enable use of per-device vector map unless otherwise
+     * specified */
+    if ( iommu_amd_perdev_vector_map )
+    {
+        printk("AMD-Vi: Enabling per-device vector maps\n");
+        opt_irq_perdev_vector_map=1;
+    }
+    else
+    {
+        printk("AMD-Vi: WARNING - not enabling per-device vector maps\n");
+    }
+
     return scan_pci_devices();
 }
 
diff -r 2e0cf9428554 -r fa4e2ca9ecff xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c   Tue Jul 26 18:37:16 2011 +0100
+++ b/xen/drivers/passthrough/iommu.c   Tue Jul 26 18:37:32 2011 +0100
@@ -49,6 +49,7 @@
 bool_t __read_mostly iommu_intremap = 1;
 bool_t __read_mostly iommu_hap_pt_share;
 bool_t __read_mostly iommu_debug;
+bool_t __read_mostly iommu_amd_perdev_vector_map = 1;
 
 static void __init parse_iommu_param(char *s)
 {
@@ -81,6 +82,8 @@
             iommu_dom0_strict = 1;
         else if ( !strcmp(s, "sharept") )
             iommu_hap_pt_share = 1;
+        else if ( !strcmp(s, "no-perdev-vector-map") )
+            iommu_amd_perdev_vector_map = 0;
 
         s = ss + 1;
     } while ( ss );

_______________________________________________
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] xen: AMD IOMMU: Automatically enable per-device vector maps, Xen patchbot-unstable <=