kvm: add iommu_domain_has_cap to module compatible
PATCH 1/1 kvm: add iommu_domain_has_cap to module compatible
Signed-off-by Sheng Yang <[email protected]>
--- kvm/kernel/external-module-compat-comm.h | 10 ++++++++++ kvm/kernel/external-module-compat.c | 9 +++++++++ 2 files changed, 19 insertions(+), 0 deletions(-)
kvm/kernel/external-module-compat-comm.h +10 -0
@@ -757,3 +757,13 @@ static inline struct page *compound_head(struct page *page) }#endif + +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,30 ) +#define IOMMU_CAP_CACHE_COHERENCY 0x1 +#define IOMMU_CACHE (4) + +#include <linux/iommu.h> + +int iommu_domain_has_cap (struct iommu_domain *domain,unsigned long cap); + +#endif
kvm/kernel/external-module-compat.c +9 -0
@@ -292,6 +292,15 @@ int intel_iommu_found()#endif +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,30 ) +#include <linux/iommu.h> + +int iommu_domain_has_cap (struct iommu_domain *domain,unsigned long cap) +{ +return 0 ; +} + +#endif #if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,21 )
Signature · 1 line
1.5.4.5