[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vtd: Add a boot parameter option for snoop control capability for VT-d.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1233748806 0
# Node ID 6058887e55d7096f8b32c1f0576c601b080dc879
# Parent  7e15ccb7bbd88e550ada6a6b86196cc4e5d880b6
vtd: Add a boot parameter option for snoop control capability for VT-d.
The default is to use snoop control.

Signed-off-by: Xin, Xiaohui <xiaohui.xin@xxxxxxxxx>
---
 xen/drivers/passthrough/iommu.c    |    7 +++++++
 xen/drivers/passthrough/vtd/dmar.c |   16 +++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff -r 7e15ccb7bbd8 -r 6058887e55d7 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c   Wed Feb 04 11:58:25 2009 +0000
+++ b/xen/drivers/passthrough/iommu.c   Wed Feb 04 12:00:06 2009 +0000
@@ -33,6 +33,8 @@ int amd_iov_detect(void);
  *   no-pv                      Disable IOMMU for PV domains (default)
  *   force|required             Don't boot unless IOMMU is enabled
  *   passthrough                Bypass VT-d translation for Dom0
+ *   snoop                      Utilize the snoop control for IOMMU (default)
+ *   no-snoop                   Dont utilize the snoop control for IOMMU
  */
 custom_param("iommu", parse_iommu_param);
 int iommu_enabled = 0;
@@ -45,6 +47,7 @@ static void __init parse_iommu_param(cha
 {
     char *ss;
     iommu_enabled = 1;
+    iommu_snoop = 1;
 
     do {
         ss = strchr(s, ',');
@@ -62,6 +65,10 @@ static void __init parse_iommu_param(cha
             force_iommu = 1;
         else if ( !strcmp(s, "passthrough") )
             iommu_passthrough = 1;
+        else if ( !strcmp(s, "snoop") )
+            iommu_snoop = 1;
+        else if ( !strcmp(s, "no-snoop") )
+            iommu_snoop = 0;
 
         s = ss + 1;
     } while ( ss );
diff -r 7e15ccb7bbd8 -r 6058887e55d7 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c        Wed Feb 04 11:58:25 2009 +0000
+++ b/xen/drivers/passthrough/vtd/dmar.c        Wed Feb 04 12:00:06 2009 +0000
@@ -540,13 +540,15 @@ int acpi_dmar_init(void)
     /* Giving that all devices within guest use same io page table,
      * enable snoop control only if all VT-d engines support it.
      */
-    iommu_snoop = 1;
-    for_each_drhd_unit ( drhd )
-    {
-        iommu = drhd->iommu;
-        if ( !ecap_snp_ctl(iommu->ecap) ) {
-            iommu_snoop = 0;
-            break;
+    if ( iommu_snoop )
+    {
+        for_each_drhd_unit ( drhd )
+        {
+            iommu = drhd->iommu;
+            if ( !ecap_snp_ctl(iommu->ecap) ) {
+                iommu_snoop = 0;
+                break;
+            }
         }
     }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.