From 99fdba140d93c653f194077a929c845738b812ea Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Tue, 1 Sep 2009 11:59:42 +0200 Subject: [PATCH] --- yaml --- r: 158083 b: refs/heads/master c: 21129f786f231f7a9dce5b504617b893f50a435f h: refs/heads/master i: 158081: 693c876736389c6ea985351dfc562403dd041438 158079: b07a46456d9a97750c812aaa998626844c66ac47 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/amd_iommu.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7abdefaf3233..57cc10f6867f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eba6ac60ba66c6bf6858938442204feaa67dea31 +refs/heads/master: 21129f786f231f7a9dce5b504617b893f50a435f diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index 9aa135d4453f..a8e74c34dd27 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -1141,6 +1141,15 @@ static void __detach_device(struct protection_domain *domain, u16 devid) /* ready */ spin_unlock(&domain->lock); + + /* + * If we run in passthrough mode the device must be assigned to the + * passthrough domain if it is detached from any other domain + */ + if (iommu_pass_through) { + struct amd_iommu *iommu = amd_iommu_rlookup_table[devid]; + __attach_device(iommu, pt_domain, devid); + } } /*