4 #include <linux/types.h>
6 #define VC_CATEGORY(c) (((c) >> 24) & 0x3F)
7 #define VC_COMMAND(c) (((c) >> 16) & 0xFF)
8 #define VC_VERSION(c) ((c) & 0xFFF)
10 #define VC_CMD(c,i,v) ((((VC_CAT_ ## c) & 0x3F) << 24) \
11 | (((i) & 0xFF) << 16) | ((v) & 0xFFF))
17 |VERSION|CREATE |MODIFY |MIGRATE|CONTROL|EXPERIM| |SPECIAL|SPECIAL|
18 |STATS |DESTROY|ALTER |CHANGE |LIMIT |TEST | | | |
19 |INFO |SETUP | |MOVE | | | | | |
20 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
21 SYSTEM |VERSION|VSETUP |VHOST | | | | |DEVICES| |
22 HOST | 00| 01| 02| 03| 04| 05| | 06| 07|
23 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
24 CPU | |VPROC |PROCALT|PROCMIG|PROCTRL| | |SCHED. | |
25 PROCESS| 08| 09| 10| 11| 12| 13| | 14| 15|
26 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
27 MEMORY | | | | | | | |SWAP | |
28 | 16| 17| 18| 19| 20| 21| | 22| 23|
29 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
30 NETWORK| |VNET |NETALT |NETMIG |NETCTL | | |SERIAL | |
31 | 24| 25| 26| 27| 28| 29| | 30| 31|
32 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
33 DISK | | | | |DLIMIT | | |INODE | |
34 VFS | 32| 33| 34| 35| 36| 37| | 38| 39|
35 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
36 OTHER | | | | | | | |VINFO | |
37 | 40| 41| 42| 43| 44| 45| | 46| 47|
38 =======+=======+=======+=======+=======+=======+=======+ +=======+=======+
39 SPECIAL|EVENT | | | |FLAGS | | | | |
40 | 48| 49| 50| 51| 52| 53| | 54| 55|
41 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
42 SPECIAL|DEBUG | | | |RLIMIT |SYSCALL| | |COMPAT |
43 | 56| 57| 58| 59| 60|TEST 61| | 62| 63|
44 -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
48 #define VC_CAT_VERSION 0
50 #define VC_CAT_VSETUP 1
51 #define VC_CAT_VHOST 2
53 #define VC_CAT_VPROC 9
54 #define VC_CAT_PROCALT 10
55 #define VC_CAT_PROCMIG 11
56 #define VC_CAT_PROCTRL 12
58 #define VC_CAT_SCHED 14
60 #define VC_CAT_VNET 25
61 #define VC_CAT_NETALT 26
62 #define VC_CAT_NETMIG 27
63 #define VC_CAT_NETCTRL 28
65 #define VC_CAT_DLIMIT 36
66 #define VC_CAT_INODE 38
68 #define VC_CAT_VINFO 46
69 #define VC_CAT_EVENT 48
71 #define VC_CAT_FLAGS 52
72 #define VC_CAT_DEBUG 56
73 #define VC_CAT_RLIMIT 60
75 #define VC_CAT_SYSTEST 61
76 #define VC_CAT_COMPAT 63
78 /* interface version */
80 #define VCI_VERSION 0x00020001
81 #define VCI_LEGACY_VERSION 0x000100FF
85 #define VCMD_get_version VC_CMD(VERSION, 0, 0)
90 #include <linux/errno.h>
93 #else /* __KERNEL__ */
95 #endif /* __KERNEL__ */
97 #endif /* _VX_SWITCH_H */