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-3.2-testing] vt-d: Set agaw properly for vt-d passt

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] vt-d: Set agaw properly for vt-d passthrough translation.
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Oct 2008 15:00:46 -0700
Delivery-date: Wed, 08 Oct 2008 15:00:29 -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 1223456771 -3600
# Node ID 333c354d9796d78795d6598bc82f666bf2f20667
# Parent  6a8faf6d98b2c619256ce2d5ca3684b349e94ed9
vt-d: Set agaw properly for vt-d passthrough translation.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vtd/intel-iommu.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 6a8faf6d98b2 -r 333c354d9796 xen/arch/x86/hvm/vmx/vtd/intel-iommu.c
--- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Wed Sep 17 15:46:15 2008 +0100
+++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Wed Oct 08 10:06:11 2008 +0100
@@ -1063,7 +1063,7 @@ static int domain_context_mapping_one(
     unsigned long flags;
     int ret = 0;
     u64 pgd_maddr;
-    int agaw = -1;
+    int agaw;
 
     context = device_to_context_entry(iommu, bus, devfn);
     if ( !context )
@@ -1086,7 +1086,10 @@ static int domain_context_mapping_one(
     spin_lock_irqsave(&iommu->lock, flags);
 
     if ( ecap_pass_thru(iommu->ecap) && (domain->domain_id == 0) )
+    {
         context_set_translation_type(*context, CONTEXT_TT_PASS_THRU);
+        agaw = level_to_agaw(iommu->nr_pt_levels);
+    }
     else
     {
         /* Ensure we have pagetables allocated down to leaf PTE. */
@@ -1126,7 +1129,6 @@ static int domain_context_mapping_one(
      * domain_id 0 is not valid on Intel's IOMMU, force domain_id to
      * be 1 based as required by intel's iommu hw.
      */
-    BUG_ON(agaw == -1);
     context_set_domain_id(context, domain);
     context_set_address_width(*context, agaw);
     context_set_fault_enable(*context);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] vt-d: Set agaw properly for vt-d passthrough translation., Xen patchbot-3.2-testing <=