Skip to content

Commit

Permalink
x86/amd-iommu: Export cache-coherency capability
Browse files Browse the repository at this point in the history
This patch exports the capability of the AMD IOMMU to force
cache coherency of DMA transactions through the IOMMU-API.
This is required to disable some nasty hacks in KVM when
this capability is not available.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Joerg Roedel committed Jul 27, 2010
1 parent 6c54aab commit 80a506b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,11 @@ static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom,
static int amd_iommu_domain_has_cap(struct iommu_domain *domain,
unsigned long cap)
{
switch (cap) {
case IOMMU_CAP_CACHE_COHERENCY:
return 1;
}

return 0;
}

Expand Down

0 comments on commit 80a506b

Please sign in to comment.