direct-io.hg

view xen/include/public/acm_ops.h @ 10057:0f16f0871dc9

[ACM] Replace the union structure parameter of the ACM hypercalls
with command-specific request structures. It aligns the ACM
hypercalls with the way parameters are passed in the event channel
hypercalls.

Advantages include backward-compatibility regarding old guests when
new calls are added and clarity of the code.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun May 21 19:05:31 2006 +0100 (2006-05-21)
parents e99987843336
children c1163951ee2f
line source
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 */
8 #ifndef __XEN_PUBLIC_ACM_OPS_H__
9 #define __XEN_PUBLIC_ACM_OPS_H__
11 #include "xen.h"
12 #include "sched_ctl.h"
13 #include "acm.h"
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 0xAAAA0007
22 /************************************************************************/
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 */
32 #define ACMOP_setpolicy 1
33 struct acm_setpolicy {
34 /* IN */
35 uint32_t interface_version;
36 void *pushcache;
37 uint32_t pushcache_size;
38 };
41 #define ACMOP_getpolicy 2
42 struct acm_getpolicy {
43 /* IN */
44 uint32_t interface_version;
45 void *pullcache;
46 uint32_t pullcache_size;
47 };
50 #define ACMOP_dumpstats 3
51 struct acm_dumpstats {
52 /* IN */
53 uint32_t interface_version;
54 void *pullcache;
55 uint32_t pullcache_size;
56 };
59 #define ACMOP_getssid 4
60 enum get_type {UNSET=0, SSIDREF, DOMAINID};
61 struct acm_getssid {
62 /* IN */
63 uint32_t interface_version;
64 enum get_type get_ssid_by;
65 union {
66 domaintype_t domainid;
67 ssidref_t ssidref;
68 } id;
69 void *ssidbuf;
70 uint32_t ssidbuf_size;
71 };
73 #define ACMOP_getdecision 5
74 struct acm_getdecision {
75 /* IN */
76 uint32_t interface_version;
77 enum get_type get_decision_by1;
78 enum get_type get_decision_by2;
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 enum acm_hook_type hook;
88 /* OUT */
89 int acm_decision;
90 };
92 #endif /* __XEN_PUBLIC_ACM_OPS_H__ */
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 */