ia64/xen-unstable

view xen/include/asm-x86/hvm/iommu.h @ 18628:a72eebf02915

iommu: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Oct 14 11:49:08 2008 +0100 (2008-10-14)
parents 7f9706875b5b
children
line source
1 #ifndef __ASM_X86_HVM_IOMMU_H__
2 #define __ASM_X86_HVM_IOMMU_H__
4 struct iommu_ops;
5 extern struct iommu_ops intel_iommu_ops;
6 extern struct iommu_ops amd_iommu_ops;
7 extern int intel_vtd_setup(void);
8 extern int amd_iov_detect(void);
10 static inline struct iommu_ops *iommu_get_ops(void)
11 {
12 switch ( boot_cpu_data.x86_vendor )
13 {
14 case X86_VENDOR_INTEL:
15 return &intel_iommu_ops;
16 case X86_VENDOR_AMD:
17 return &amd_iommu_ops;
18 default:
19 BUG();
20 }
22 return NULL;
23 }
25 static inline int iommu_hardware_setup(void)
26 {
27 switch ( boot_cpu_data.x86_vendor )
28 {
29 case X86_VENDOR_INTEL:
30 return intel_vtd_setup();
31 case X86_VENDOR_AMD:
32 return amd_iov_detect();
33 default:
34 BUG();
35 }
37 return 0;
38 }
40 #endif /* __ASM_X86_HVM_IOMMU_H__ */