This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / xen / interface / acm_ops.h
1 /*
2  * acm_ops.h: Xen access control module hypervisor commands
3  *
4  * Reiner Sailer <sailer@watson.ibm.com>
5  * Copyright (c) 2005,2006 International Business Machines Corporation.
6  */
7
8 #ifndef __XEN_PUBLIC_ACM_OPS_H__
9 #define __XEN_PUBLIC_ACM_OPS_H__
10
11 #include "xen.h"
12 #include "sched_ctl.h"
13 #include "acm.h"
14
15 /*
16  * Make sure you increment the interface version whenever you modify this file!
17  * This makes sure that old versions of acm tools will stop working in a
18  * well-defined way (rather than crashing the machine, for instance).
19  */
20 #define ACM_INTERFACE_VERSION   0xAAAA0008
21
22 /************************************************************************/
23
24 /*
25  * Prototype for this hypercall is:
26  *  int acm_op(int cmd, void *args)
27  * @cmd  == ACMOP_??? (access control module operation).
28  * @args == Operation-specific extra arguments (NULL if none).
29  */
30
31
32 #define ACMOP_setpolicy         1
33 struct acm_setpolicy {
34     /* IN */
35     uint32_t interface_version;
36     XEN_GUEST_HANDLE(void) pushcache;
37     uint32_t pushcache_size;
38 };
39
40
41 #define ACMOP_getpolicy         2
42 struct acm_getpolicy {
43     /* IN */
44     uint32_t interface_version;
45     XEN_GUEST_HANDLE(void) pullcache;
46     uint32_t pullcache_size;
47 };
48
49
50 #define ACMOP_dumpstats         3
51 struct acm_dumpstats {
52     /* IN */
53     uint32_t interface_version;
54     XEN_GUEST_HANDLE(void) pullcache;
55     uint32_t pullcache_size;
56 };
57
58
59 #define ACMOP_getssid           4
60 #define ACM_GETBY_ssidref  1
61 #define ACM_GETBY_domainid 2
62 struct acm_getssid {
63     /* IN */
64     uint32_t interface_version;
65     uint32_t get_ssid_by; /* ACM_GETBY_* */
66     union {
67         domaintype_t domainid;
68         ssidref_t    ssidref;
69     } id;
70     XEN_GUEST_HANDLE(void) ssidbuf;
71     uint32_t ssidbuf_size;
72 };
73
74 #define ACMOP_getdecision      5
75 struct acm_getdecision {
76     /* IN */
77     uint32_t interface_version;
78     uint32_t get_decision_by1; /* ACM_GETBY_* */
79     uint32_t get_decision_by2; /* ACM_GETBY_* */
80     union {
81         domaintype_t domainid;
82         ssidref_t    ssidref;
83     } id1;
84     union {
85         domaintype_t domainid;
86         ssidref_t    ssidref;
87     } id2;
88     uint32_t hook;
89     /* OUT */
90     uint32_t acm_decision;
91 };
92
93 #endif /* __XEN_PUBLIC_ACM_OPS_H__ */
94
95 /*
96  * Local variables:
97  * mode: C
98  * c-set-style: "BSD"
99  * c-basic-offset: 4
100  * tab-width: 4
101  * indent-tabs-mode: nil
102  * End:
103  */