ia64/xen-unstable

view xen/include/xen/iocap.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents 2d68d518038b
children
line source
1 /******************************************************************************
2 * iocap.h
3 *
4 * Per-domain I/O capabilities.
5 */
7 #ifndef __XEN_IOCAP_H__
8 #define __XEN_IOCAP_H__
10 #include <xen/rangeset.h>
11 #include <asm/iocap.h>
13 #define iomem_permit_access(d, s, e) \
14 rangeset_add_range((d)->iomem_caps, s, e)
15 #define iomem_deny_access(d, s, e) \
16 rangeset_remove_range((d)->iomem_caps, s, e)
17 #define iomem_access_permitted(d, s, e) \
18 rangeset_contains_range((d)->iomem_caps, s, e)
20 #define irq_permit_access(d, i) \
21 rangeset_add_singleton((d)->irq_caps, i)
22 #define irq_deny_access(d, i) \
23 rangeset_remove_singleton((d)->irq_caps, i)
24 #define irqs_permit_access(d, s, e) \
25 rangeset_add_range((d)->irq_caps, s, e)
26 #define irqs_deny_access(d, s, e) \
27 rangeset_remove_range((d)->irq_caps, s, e)
28 #define irq_access_permitted(d, i) \
29 rangeset_contains_singleton((d)->irq_caps, i)
31 #endif /* __XEN_IOCAP_H__ */