ia64/xen-unstable

view xen/include/asm-x86/hvm/iommu.h @ 18627:7f9706875b5b

Missing file from prev c/s
author Keir Fraser <keir.fraser@citrix.com>
date Tue Oct 14 11:29:46 2008 +0100 (2008-10-14)
parents
children a72eebf02915
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 }
21 }
23 static inline int iommu_hardware_setup(void)
24 {
25 switch ( boot_cpu_data.x86_vendor )
26 {
27 case X86_VENDOR_INTEL:
28 return intel_vtd_setup();
29 case X86_VENDOR_AMD:
30 return amd_iov_detect();
31 default:
32 BUG();
33 }
34 }
35 #endif /* __ASM_X86_HVM_IOMMU_H__ */