ia64/xen-unstable

view xen/include/xen/config.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 f210a633571c
children
line source
1 /******************************************************************************
2 * config.h
3 *
4 * A Linux-style configuration list.
5 */
7 #ifndef __XEN_CONFIG_H__
8 #define __XEN_CONFIG_H__
10 #include <asm/config.h>
12 #define EXPORT_SYMBOL(var)
13 #define EXPORT_SYMBOL_GPL(var)
15 /*
16 * The following log levels are as follows:
17 *
18 * XENLOG_ERR: Fatal errors, either Xen, Guest or Dom0
19 * is about to crash.
20 *
21 * XENLOG_WARNING: Something bad happened, but we can recover.
22 *
23 * XENLOG_INFO: Interesting stuff, but not too noisy.
24 *
25 * XENLOG_DEBUG: Use where ever you like. Lots of noise.
26 *
27 *
28 * Since we don't trust the guest operating system, we don't want
29 * it to allow for DoS by causing the HV to print out a lot of
30 * info, so where ever the guest has control of what is printed
31 * we use the XENLOG_GUEST to distinguish that the output is
32 * controlled by the guest.
33 *
34 * To make it easier on the typing, the above log levels all
35 * have a corresponding _G_ equivalent that appends the
36 * XENLOG_GUEST. (see the defines below).
37 *
38 */
39 #define XENLOG_ERR "<0>"
40 #define XENLOG_WARNING "<1>"
41 #define XENLOG_INFO "<2>"
42 #define XENLOG_DEBUG "<3>"
44 #define XENLOG_GUEST "<G>"
46 #define XENLOG_G_ERR XENLOG_GUEST XENLOG_ERR
47 #define XENLOG_G_WARNING XENLOG_GUEST XENLOG_WARNING
48 #define XENLOG_G_INFO XENLOG_GUEST XENLOG_INFO
49 #define XENLOG_G_DEBUG XENLOG_GUEST XENLOG_DEBUG
51 /*
52 * Some code is copied directly from Linux.
53 * Match some of the Linux log levels to Xen.
54 */
55 #define KERN_ERR XENLOG_ERR
56 #define KERN_CRIT XENLOG_ERR
57 #define KERN_EMERG XENLOG_ERR
58 #define KERN_WARNING XENLOG_WARNING
59 #define KERN_NOTICE XENLOG_INFO
60 #define KERN_INFO XENLOG_INFO
61 #define KERN_DEBUG XENLOG_DEBUG
63 /* Linux 'checker' project. */
64 #define __iomem
65 #define __user
66 #define __force
67 #define __bitwise
69 #ifndef __ASSEMBLY__
71 int current_domain_id(void);
72 #define dprintk(_l, _f, _a...) \
73 printk(_l "%s:%d: " _f, __FILE__ , __LINE__ , ## _a )
74 #define gdprintk(_l, _f, _a...) \
75 printk(XENLOG_GUEST _l "%s:%d:d%d " _f, __FILE__, \
76 __LINE__, current_domain_id() , ## _a )
78 #include <xen/compiler.h>
80 #endif /* !__ASSEMBLY__ */
82 #define __STR(...) #__VA_ARGS__
83 #define STR(...) __STR(__VA_ARGS__)
85 #ifndef __ASSEMBLY__
86 /* Turn a plain number into a C unsigned long constant. */
87 #define __mk_unsigned_long(x) x ## UL
88 #define mk_unsigned_long(x) __mk_unsigned_long(x)
89 #else /* __ASSEMBLY__ */
90 /* In assembly code we cannot use C numeric constant suffixes. */
91 #define mk_unsigned_long(x) x
92 #endif /* !__ASSEMBLY__ */
94 #define fastcall
95 #define __cpuinitdata
96 #define __cpuinit
98 #endif /* __XEN_CONFIG_H__ */