ia64/xen-unstable

view xen/include/xen/iocap.h @ 19175:92557a0b021f

Fix PCI passthrough for devices w/o iomem.

From: Manuel Bouyer <bouyer@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 05 15:08:53 2009 +0000 (2009-02-05)
parents 062fe1c7b09f
children 2d68d518038b
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) || \
33 !rangeset_is_empty((d)->arch.ioport_caps))
35 #endif /* __XEN_IOCAP_H__ */