[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.2-testing] vt-d: Set agaw properly for vt-d passthrough translation.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |