Coverage Report

Created: 2017-10-25 09:10

/root/src/xen/xen/include/xen/config.h
Line
Count
Source (jump to first uncovered line)
1
/******************************************************************************
2
 * config.h
3
 * 
4
 * A Linux-style configuration list.
5
 */
6
7
#ifndef __XEN_CONFIG_H__
8
#define __XEN_CONFIG_H__
9
10
#include <xen/kconfig.h>
11
12
#ifndef __ASSEMBLY__
13
#include <xen/compiler.h>
14
#endif
15
#include <asm/config.h>
16
17
#define EXPORT_SYMBOL(var)
18
19
/*
20
 * The following log levels are as follows:
21
 *
22
 *   XENLOG_ERR: Fatal errors, either Xen, Guest or Dom0
23
 *               is about to crash.
24
 *
25
 *   XENLOG_WARNING: Something bad happened, but we can recover.
26
 *
27
 *   XENLOG_INFO: Interesting stuff, but not too noisy.
28
 *
29
 *   XENLOG_DEBUG: Use where ever you like. Lots of noise.
30
 *
31
 *
32
 * Since we don't trust the guest operating system, we don't want
33
 * it to allow for DoS by causing the HV to print out a lot of
34
 * info, so where ever the guest has control of what is printed
35
 * we use the XENLOG_GUEST to distinguish that the output is
36
 * controlled by the guest.
37
 *
38
 * To make it easier on the typing, the above log levels all
39
 * have a corresponding _G_ equivalent that appends the
40
 * XENLOG_GUEST. (see the defines below).
41
 *
42
 */
43
0
#define XENLOG_ERR     "<0>"
44
0
#define XENLOG_WARNING "<1>"
45
24
#define XENLOG_INFO    "<2>"
46
8
#define XENLOG_DEBUG   "<3>"
47
48
41
#define XENLOG_GUEST   "<G>"
49
50
0
#define XENLOG_G_ERR     XENLOG_GUEST XENLOG_ERR
51
0
#define XENLOG_G_WARNING XENLOG_GUEST XENLOG_WARNING
52
7
#define XENLOG_G_INFO    XENLOG_GUEST XENLOG_INFO
53
0
#define XENLOG_G_DEBUG   XENLOG_GUEST XENLOG_DEBUG
54
55
/*
56
 * Some code is copied directly from Linux.
57
 * Match some of the Linux log levels to Xen.
58
 */
59
0
#define KERN_ERR       XENLOG_ERR
60
0
#define KERN_CRIT      XENLOG_ERR
61
0
#define KERN_EMERG     XENLOG_ERR
62
0
#define KERN_WARNING   XENLOG_WARNING
63
2
#define KERN_NOTICE    XENLOG_INFO
64
10
#define KERN_INFO      XENLOG_INFO
65
7
#define KERN_DEBUG     XENLOG_DEBUG
66
67
/* Linux 'checker' project. */
68
#define __iomem
69
#define __user
70
#define __force
71
#define __bitwise
72
73
#define KB(_kb)     (_AC(_kb, ULL) << 10)
74
1
#define MB(_mb)     (_AC(_mb, ULL) << 20)
75
149M
#define GB(_gb)     (_AC(_gb, ULL) << 30)
76
77
0
#define IS_ALIGNED(val, align) (((val) & ((align) - 1)) == 0)
78
79
#define __STR(...) #__VA_ARGS__
80
#define STR(...) __STR(__VA_ARGS__)
81
82
/* allow existing code to work with Kconfig variable */
83
257
#define NR_CPUS CONFIG_NR_CPUS
84
85
#ifndef CONFIG_DEBUG
86
#define NDEBUG
87
#endif
88
89
#endif /* __XEN_CONFIG_H__ */