win-pvdrivers

annotate common/include/public/acm_ops.h @ 12:5712dede5a1b

add in xen public includes, so the extra step of copying them over is not needed
author Andy Grover <andy@groveronline.com>
date Wed Nov 28 14:44:10 2007 -0800 (2007-11-28)
parents
children
rev   line source
andy@12 1 /*
andy@12 2 * acm_ops.h: Xen access control module hypervisor commands
andy@12 3 *
andy@12 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
andy@12 5 * of this software and associated documentation files (the "Software"), to
andy@12 6 * deal in the Software without restriction, including without limitation the
andy@12 7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
andy@12 8 * sell copies of the Software, and to permit persons to whom the Software is
andy@12 9 * furnished to do so, subject to the following conditions:
andy@12 10 *
andy@12 11 * The above copyright notice and this permission notice shall be included in
andy@12 12 * all copies or substantial portions of the Software.
andy@12 13 *
andy@12 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
andy@12 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
andy@12 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
andy@12 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
andy@12 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
andy@12 19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
andy@12 20 * DEALINGS IN THE SOFTWARE.
andy@12 21 *
andy@12 22 * Reiner Sailer <sailer@watson.ibm.com>
andy@12 23 * Copyright (c) 2005,2006 International Business Machines Corporation.
andy@12 24 */
andy@12 25
andy@12 26 #ifndef __XEN_PUBLIC_ACM_OPS_H__
andy@12 27 #define __XEN_PUBLIC_ACM_OPS_H__
andy@12 28
andy@12 29 #include "xen.h"
andy@12 30 #include "acm.h"
andy@12 31
andy@12 32 /*
andy@12 33 * Make sure you increment the interface version whenever you modify this file!
andy@12 34 * This makes sure that old versions of acm tools will stop working in a
andy@12 35 * well-defined way (rather than crashing the machine, for instance).
andy@12 36 */
andy@12 37 #define ACM_INTERFACE_VERSION 0xAAAA000A
andy@12 38
andy@12 39 /************************************************************************/
andy@12 40
andy@12 41 /*
andy@12 42 * Prototype for this hypercall is:
andy@12 43 * int acm_op(int cmd, void *args)
andy@12 44 * @cmd == ACMOP_??? (access control module operation).
andy@12 45 * @args == Operation-specific extra arguments (NULL if none).
andy@12 46 */
andy@12 47
andy@12 48
andy@12 49 #define ACMOP_setpolicy 1
andy@12 50 struct acm_setpolicy {
andy@12 51 /* IN */
andy@12 52 XEN_GUEST_HANDLE_64(void) pushcache;
andy@12 53 uint32_t pushcache_size;
andy@12 54 };
andy@12 55
andy@12 56
andy@12 57 #define ACMOP_getpolicy 2
andy@12 58 struct acm_getpolicy {
andy@12 59 /* IN */
andy@12 60 XEN_GUEST_HANDLE_64(void) pullcache;
andy@12 61 uint32_t pullcache_size;
andy@12 62 };
andy@12 63
andy@12 64
andy@12 65 #define ACMOP_dumpstats 3
andy@12 66 struct acm_dumpstats {
andy@12 67 /* IN */
andy@12 68 XEN_GUEST_HANDLE_64(void) pullcache;
andy@12 69 uint32_t pullcache_size;
andy@12 70 };
andy@12 71
andy@12 72
andy@12 73 #define ACMOP_getssid 4
andy@12 74 #define ACM_GETBY_ssidref 1
andy@12 75 #define ACM_GETBY_domainid 2
andy@12 76 struct acm_getssid {
andy@12 77 /* IN */
andy@12 78 uint32_t get_ssid_by; /* ACM_GETBY_* */
andy@12 79 union {
andy@12 80 domaintype_t domainid;
andy@12 81 ssidref_t ssidref;
andy@12 82 } id;
andy@12 83 XEN_GUEST_HANDLE_64(void) ssidbuf;
andy@12 84 uint32_t ssidbuf_size;
andy@12 85 };
andy@12 86
andy@12 87 #define ACMOP_getdecision 5
andy@12 88 struct acm_getdecision {
andy@12 89 /* IN */
andy@12 90 uint32_t get_decision_by1; /* ACM_GETBY_* */
andy@12 91 uint32_t get_decision_by2; /* ACM_GETBY_* */
andy@12 92 union {
andy@12 93 domaintype_t domainid;
andy@12 94 ssidref_t ssidref;
andy@12 95 } id1;
andy@12 96 union {
andy@12 97 domaintype_t domainid;
andy@12 98 ssidref_t ssidref;
andy@12 99 } id2;
andy@12 100 uint32_t hook;
andy@12 101 /* OUT */
andy@12 102 uint32_t acm_decision;
andy@12 103 };
andy@12 104
andy@12 105
andy@12 106 #define ACMOP_chgpolicy 6
andy@12 107 struct acm_change_policy {
andy@12 108 /* IN */
andy@12 109 XEN_GUEST_HANDLE_64(void) policy_pushcache;
andy@12 110 uint32_t policy_pushcache_size;
andy@12 111 XEN_GUEST_HANDLE_64(void) del_array;
andy@12 112 uint32_t delarray_size;
andy@12 113 XEN_GUEST_HANDLE_64(void) chg_array;
andy@12 114 uint32_t chgarray_size;
andy@12 115 /* OUT */
andy@12 116 /* array with error code */
andy@12 117 XEN_GUEST_HANDLE_64(void) err_array;
andy@12 118 uint32_t errarray_size;
andy@12 119 };
andy@12 120
andy@12 121 #define ACMOP_relabeldoms 7
andy@12 122 struct acm_relabel_doms {
andy@12 123 /* IN */
andy@12 124 XEN_GUEST_HANDLE_64(void) relabel_map;
andy@12 125 uint32_t relabel_map_size;
andy@12 126 /* OUT */
andy@12 127 XEN_GUEST_HANDLE_64(void) err_array;
andy@12 128 uint32_t errarray_size;
andy@12 129 };
andy@12 130
andy@12 131 /* future interface to Xen */
andy@12 132 struct xen_acmctl {
andy@12 133 uint32_t cmd;
andy@12 134 uint32_t interface_version;
andy@12 135 union {
andy@12 136 struct acm_setpolicy setpolicy;
andy@12 137 struct acm_getpolicy getpolicy;
andy@12 138 struct acm_dumpstats dumpstats;
andy@12 139 struct acm_getssid getssid;
andy@12 140 struct acm_getdecision getdecision;
andy@12 141 struct acm_change_policy change_policy;
andy@12 142 struct acm_relabel_doms relabel_doms;
andy@12 143 } u;
andy@12 144 };
andy@12 145
andy@12 146 typedef struct xen_acmctl xen_acmctl_t;
andy@12 147 DEFINE_XEN_GUEST_HANDLE(xen_acmctl_t);
andy@12 148
andy@12 149 #endif /* __XEN_PUBLIC_ACM_OPS_H__ */
andy@12 150
andy@12 151 /*
andy@12 152 * Local variables:
andy@12 153 * mode: C
andy@12 154 * c-set-style: "BSD"
andy@12 155 * c-basic-offset: 4
andy@12 156 * tab-width: 4
andy@12 157 * indent-tabs-mode: nil
andy@12 158 * End:
andy@12 159 */