diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-01 05:59:42 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-03 10:15:45 -0400 |
commit | 21129f786f231f7a9dce5b504617b893f50a435f (patch) | |
tree | d9f507bacc5e657c74257e87a8353cd1e57b3b98 /arch/x86/kernel/amd_iommu.c | |
parent | eba6ac60ba66c6bf6858938442204feaa67dea31 (diff) |
x86/amd-iommu: Make sure a device is assigned in passthrough mode
When the IOMMU driver runs in passthrough mode it has to
make sure that every device not assigned to an IOMMU-API
domain must be put into the passthrough domain instead of
keeping it unassigned.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 9aa135d4453f..a8e74c34dd27 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -1141,6 +1141,15 @@ static void __detach_device(struct protection_domain *domain, u16 devid) | |||
1141 | 1141 | ||
1142 | /* ready */ | 1142 | /* ready */ |
1143 | spin_unlock(&domain->lock); | 1143 | spin_unlock(&domain->lock); |
1144 | |||
1145 | /* | ||
1146 | * If we run in passthrough mode the device must be assigned to the | ||
1147 | * passthrough domain if it is detached from any other domain | ||
1148 | */ | ||
1149 | if (iommu_pass_through) { | ||
1150 | struct amd_iommu *iommu = amd_iommu_rlookup_table[devid]; | ||
1151 | __attach_device(iommu, pt_domain, devid); | ||
1152 | } | ||
1144 | } | 1153 | } |
1145 | 1154 | ||
1146 | /* | 1155 | /* |