ia64/xen-unstable

changeset 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 3ff2461bb5a1
children a72eebf02915
files xen/include/asm-x86/hvm/iommu.h
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xen/include/asm-x86/hvm/iommu.h	Tue Oct 14 11:29:46 2008 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +#ifndef __ASM_X86_HVM_IOMMU_H__
     1.5 +#define __ASM_X86_HVM_IOMMU_H__
     1.6 +
     1.7 +struct iommu_ops;
     1.8 +extern struct iommu_ops intel_iommu_ops;
     1.9 +extern struct iommu_ops amd_iommu_ops;
    1.10 +extern int intel_vtd_setup(void);
    1.11 +extern int amd_iov_detect(void);
    1.12 +
    1.13 +static inline struct iommu_ops *iommu_get_ops(void)
    1.14 +{   
    1.15 +    switch ( boot_cpu_data.x86_vendor )
    1.16 +    {
    1.17 +    case X86_VENDOR_INTEL:
    1.18 +        return &intel_iommu_ops;
    1.19 +    case X86_VENDOR_AMD:
    1.20 +        return &amd_iommu_ops;
    1.21 +    default:
    1.22 +        BUG();
    1.23 +    }
    1.24 +}
    1.25 +
    1.26 +static inline int iommu_hardware_setup(void)
    1.27 +{
    1.28 +    switch ( boot_cpu_data.x86_vendor )
    1.29 +    {
    1.30 +    case X86_VENDOR_INTEL:
    1.31 +        return intel_vtd_setup();
    1.32 +    case X86_VENDOR_AMD:
    1.33 +        return amd_iov_detect();
    1.34 +    default:
    1.35 +        BUG();
    1.36 +    }
    1.37 +}
    1.38 +#endif /* __ASM_X86_HVM_IOMMU_H__ */