debuggers.hg

view xen/include/asm-x86/types.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 8bd776540ab3
children
line source
1 #ifndef __X86_TYPES_H__
2 #define __X86_TYPES_H__
4 #ifndef __ASSEMBLY__
6 #include <xen/config.h>
8 typedef __signed__ char __s8;
9 typedef unsigned char __u8;
11 typedef __signed__ short __s16;
12 typedef unsigned short __u16;
14 typedef __signed__ int __s32;
15 typedef unsigned int __u32;
17 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
18 #if defined(__i386__)
19 typedef __signed__ long long __s64;
20 typedef unsigned long long __u64;
21 #elif defined(__x86_64__)
22 typedef __signed__ long __s64;
23 typedef unsigned long __u64;
24 #endif
25 #endif
27 typedef signed char s8;
28 typedef unsigned char u8;
30 typedef signed short s16;
31 typedef unsigned short u16;
33 typedef signed int s32;
34 typedef unsigned int u32;
36 #if defined(__i386__)
37 typedef signed long long s64;
38 typedef unsigned long long u64;
39 typedef u64 paddr_t;
40 #define INVALID_PADDR (~0ULL)
41 #define PRIpaddr "016llx"
42 #elif defined(__x86_64__)
43 typedef signed long s64;
44 typedef unsigned long u64;
45 typedef unsigned long paddr_t;
46 #define INVALID_PADDR (~0UL)
47 #define PRIpaddr "016lx"
48 #endif
50 typedef unsigned long size_t;
52 typedef char bool_t;
53 #define test_and_set_bool(b) xchg(&(b), 1)
54 #define test_and_clear_bool(b) xchg(&(b), 0)
56 #endif /* __ASSEMBLY__ */
58 #if defined(__i386__)
59 #define BITS_PER_LONG 32
60 #define BYTES_PER_LONG 4
61 #define LONG_BYTEORDER 2
62 #elif defined(__x86_64__)
63 #define BITS_PER_LONG 64
64 #define BYTES_PER_LONG 8
65 #define LONG_BYTEORDER 3
66 #endif
68 #endif /* __X86_TYPES_H__ */