debuggers.hg

view xen/include/asm-x86/iocap.h @ 22855:1d1eec7e1fb4

xl: Perform minimal validation of virtual disk file while parsing config file

This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.

[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents 2d68d518038b
children
line source
1 /******************************************************************************
2 * iocap.h
3 *
4 * Architecture-specific per-domain I/O capabilities.
5 */
7 #ifndef __X86_IOCAP_H__
8 #define __X86_IOCAP_H__
10 #define ioports_permit_access(d, s, e) \
11 rangeset_add_range((d)->arch.ioport_caps, s, e)
12 #define ioports_deny_access(d, s, e) \
13 rangeset_remove_range((d)->arch.ioport_caps, s, e)
14 #define ioports_access_permitted(d, s, e) \
15 rangeset_contains_range((d)->arch.ioport_caps, s, e)
17 #define cache_flush_permitted(d) \
18 (!rangeset_is_empty((d)->iomem_caps) || \
19 !rangeset_is_empty((d)->arch.ioport_caps))
21 #define multipage_allocation_permitted(d, order) \
22 (((order) <= 9) || /* allow 2MB superpages */ \
23 !rangeset_is_empty((d)->iomem_caps) || \
24 !rangeset_is_empty((d)->arch.ioport_caps))
26 #endif /* __X86_IOCAP_H__ */