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