fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / linux / vserver / context_cmd.h
1 #ifndef _VX_CONTEXT_CMD_H
2 #define _VX_CONTEXT_CMD_H
3
4
5 /* vinfo commands */
6
7 #define VCMD_task_xid           VC_CMD(VINFO, 1, 0)
8
9 #ifdef  __KERNEL__
10 extern int vc_task_xid(uint32_t, void __user *);
11
12 #endif  /* __KERNEL__ */
13
14 #define VCMD_vx_info            VC_CMD(VINFO, 5, 0)
15
16 struct  vcmd_vx_info_v0 {
17         uint32_t xid;
18         uint32_t initpid;
19         /* more to come */
20 };
21
22 #ifdef  __KERNEL__
23 extern int vc_vx_info(struct vx_info *, void __user *);
24
25 #endif  /* __KERNEL__ */
26
27 #define VCMD_ctx_stat           VC_CMD(VSTAT, 0, 0)
28
29 struct  vcmd_ctx_stat_v0 {
30         uint32_t usecnt;
31         uint32_t tasks;
32         /* more to come */
33 };
34
35 #ifdef  __KERNEL__
36 extern int vc_ctx_stat(struct vx_info *, void __user *);
37
38 #endif  /* __KERNEL__ */
39
40 /* context commands */
41
42 #define VCMD_ctx_create_v0      VC_CMD(VPROC, 1, 0)
43 #define VCMD_ctx_create         VC_CMD(VPROC, 1, 1)
44
45 struct  vcmd_ctx_create {
46         uint64_t flagword;
47 };
48
49 #define VCMD_ctx_migrate_v0     VC_CMD(PROCMIG, 1, 0)
50 #define VCMD_ctx_migrate        VC_CMD(PROCMIG, 1, 1)
51
52 struct  vcmd_ctx_migrate {
53         uint64_t flagword;
54 };
55
56 #ifdef  __KERNEL__
57 extern int vc_ctx_create(uint32_t, void __user *);
58 extern int vc_ctx_migrate(struct vx_info *, void __user *);
59
60 #endif  /* __KERNEL__ */
61
62
63 /* flag commands */
64
65 #define VCMD_get_cflags         VC_CMD(FLAGS, 1, 0)
66 #define VCMD_set_cflags         VC_CMD(FLAGS, 2, 0)
67
68 struct  vcmd_ctx_flags_v0 {
69         uint64_t flagword;
70         uint64_t mask;
71 };
72
73 #ifdef  __KERNEL__
74 extern int vc_get_cflags(struct vx_info *, void __user *);
75 extern int vc_set_cflags(struct vx_info *, void __user *);
76
77 #endif  /* __KERNEL__ */
78
79
80 /* context caps commands */
81
82 #define VCMD_get_ccaps_v0       VC_CMD(FLAGS, 3, 0)
83 #define VCMD_set_ccaps_v0       VC_CMD(FLAGS, 4, 0)
84
85 struct  vcmd_ctx_caps_v0 {
86         uint64_t bcaps;
87         uint64_t ccaps;
88         uint64_t cmask;
89 };
90
91 #define VCMD_get_ccaps          VC_CMD(FLAGS, 3, 1)
92 #define VCMD_set_ccaps          VC_CMD(FLAGS, 4, 1)
93
94 struct  vcmd_ctx_caps_v1 {
95         uint64_t ccaps;
96         uint64_t cmask;
97 };
98
99 #ifdef  __KERNEL__
100 extern int vc_get_ccaps_v0(struct vx_info *, void __user *);
101 extern int vc_set_ccaps_v0(struct vx_info *, void __user *);
102 extern int vc_get_ccaps(struct vx_info *, void __user *);
103 extern int vc_set_ccaps(struct vx_info *, void __user *);
104
105 #endif  /* __KERNEL__ */
106
107
108 /* bcaps commands */
109
110 #define VCMD_get_bcaps          VC_CMD(FLAGS, 9, 0)
111 #define VCMD_set_bcaps          VC_CMD(FLAGS,10, 0)
112
113 struct  vcmd_bcaps {
114         uint64_t bcaps;
115         uint64_t bmask;
116 };
117
118 #ifdef  __KERNEL__
119 extern int vc_get_bcaps(struct vx_info *, void __user *);
120 extern int vc_set_bcaps(struct vx_info *, void __user *);
121
122 #endif  /* __KERNEL__ */
123 #endif  /* _VX_CONTEXT_CMD_H */