Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iommu-api: Extension to check for interrupt remapping

This patch allows IOMMU users to determine whether the
hardware and software support safe, isolated interrupt
remapping. Not all Intel IOMMUs have the hardware, and the
software for AMD is not there yet.

Signed-off-by: Tom Lyon <pugs@cisco.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

authored by

Tom Lyon and committed by
Joerg Roedel
323f99cb 1c5474a6

+3
+2
drivers/pci/intel-iommu.c
··· 3698 3698 3699 3699 if (cap == IOMMU_CAP_CACHE_COHERENCY) 3700 3700 return dmar_domain->iommu_snooping; 3701 + if (cap == IOMMU_CAP_INTR_REMAP) 3702 + return intr_remapping_enabled; 3701 3703 3702 3704 return 0; 3703 3705 }
+1
include/linux/iommu.h
··· 30 30 }; 31 31 32 32 #define IOMMU_CAP_CACHE_COHERENCY 0x1 33 + #define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */ 33 34 34 35 struct iommu_ops { 35 36 int (*domain_init)(struct iommu_domain *domain);