* Nikola Ciprich ([email protected]) wrote:
> diff -Naur kvm-kmod-devel-86/external-module-compat-comm.h 
> kvm-kmod-devel-86-disable-iommu-for-old-kernels/external-module-compat-comm.h
> --- kvm-kmod-devel-86/external-module-compat-comm.h     2009-05-20 
> 15:59:56.000000000 +0200
> +++ 
> kvm-kmod-devel-86-disable-iommu-for-old-kernels/external-module-compat-comm.h 
>       2009-05-20 22:37:23.632038570 +0200
> @@ -791,3 +791,7 @@
>  }
> 
>  #endif
> +
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
> +#undef CONFIG_IOMMU_API
> +#endif

This is too heavy handed.  The only thing that's new is newer iommu
code provides a query for cache coherency.  You could do something as
simple as:

#ifndef IOMMU_CACHE
#define IOMMU_CACHE     (4)
#define IOMMU_CAP_CACHE_COHERENCY       0x1
static inline int kvm_iommu_domain_has_cap(struct iommu_domain *domain,
                                           unsigned long cap)
{
        return 0;
}
#else
#define kvm_iommu_domain_has_cap iommu_domain_has_cap
#endif

and add it to the compat_api list in the sync script

> diff -Naur kvm-kmod-devel-86/x86/iommu.c 
> kvm-kmod-devel-86-disable-iommu-for-old-kernels/x86/iommu.c
> --- kvm-kmod-devel-86/x86/iommu.c       2009-05-20 16:00:00.000000000 +0200
> +++ kvm-kmod-devel-86-disable-iommu-for-old-kernels/x86/iommu.c 2009-05-20 
> 22:37:43.840878726 +0200
> @@ -1,3 +1,4 @@
> +#ifdef CONFIG_IOMMU_API
>  #ifndef KVM_UNIFDEF_H
>  #define KVM_UNIFDEF_H
> 
> @@ -271,3 +272,4 @@
>         iommu_domain_free(domain);
>         return 0;
>  }
> +#endif

BTW, just to clarify something...this file isn't part of kvm-kmod repo,
it's a generated file from the 'make sync' process.

thanks,
-chris
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to