ia64/xen-unstable

view xen/include/xen/iocap.h @ 8468:d966b7a00959

Allow non-privileged domains restricted access to
I/O memory and physical interrupts, under control
of domain0. Capabilities are maintained as rangesets
in Xen.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Dec 31 14:15:22 2005 +0100 (2005-12-31)
parents 4369fd869f51
children 781ea5017f18
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 #define multipage_allocation_permitted(d) \
32 (!rangeset_is_empty((d)->iomem_caps))
34 #endif /* __XEN_IOCAP_H__ */