ia64/xen-unstable

view xen/include/public/tmem.h @ 19836:d9890e67d2b7

tools: add SHAREDIR to buildmakevars2file

c/s 19818 dropped SHAREDIR from xen/util/path.py, which broke the "xm
new" command. This patch adds SHAREDIR back to the new
buildmakevars2file-closure function.

Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 25 13:05:10 2009 +0100 (2009-06-25)
parents 0ea75c3b7743
children
line source
1 /******************************************************************************
2 * tmem.h
3 *
4 * Guest OS interface to Xen Transcendent Memory.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *
24 * Copyright (c) 2004, K A Fraser
25 */
27 #ifndef __XEN_PUBLIC_TMEM_H__
28 #define __XEN_PUBLIC_TMEM_H__
30 #include "xen.h"
32 /* Commands to HYPERVISOR_tmem_op() */
33 #define TMEM_CONTROL 0
34 #define TMEM_NEW_POOL 1
35 #define TMEM_DESTROY_POOL 2
36 #define TMEM_NEW_PAGE 3
37 #define TMEM_PUT_PAGE 4
38 #define TMEM_GET_PAGE 5
39 #define TMEM_FLUSH_PAGE 6
40 #define TMEM_FLUSH_OBJECT 7
41 #define TMEM_READ 8
42 #define TMEM_WRITE 9
43 #define TMEM_XCHG 10
45 /* Subops for HYPERVISOR_tmem_op(TMEM_CONTROL) */
46 #define TMEMC_THAW 0
47 #define TMEMC_FREEZE 1
48 #define TMEMC_FLUSH 2
49 #define TMEMC_DESTROY 3
50 #define TMEMC_LIST 4
51 #define TMEMC_SET_WEIGHT 5
52 #define TMEMC_SET_CAP 6
53 #define TMEMC_SET_COMPRESS 7
55 /* Bits for HYPERVISOR_tmem_op(TMEM_NEW_POOL) */
56 #define TMEM_POOL_PERSIST 1
57 #define TMEM_POOL_SHARED 2
58 #define TMEM_POOL_PAGESIZE_SHIFT 4
59 #define TMEM_POOL_PAGESIZE_MASK 0xf
60 #define TMEM_POOL_VERSION_SHIFT 24
61 #define TMEM_POOL_VERSION_MASK 0xff
63 /* Special errno values */
64 #define EFROZEN 1000
65 #define EEMPTY 1001
68 #ifndef __ASSEMBLY__
69 typedef xen_pfn_t tmem_cli_mfn_t;
70 typedef XEN_GUEST_HANDLE(char) tmem_cli_va_t;
71 struct tmem_op {
72 uint32_t cmd;
73 int32_t pool_id; /* private > 0; shared < 0; 0 is invalid */
74 union {
75 struct { /* for cmd == TMEM_NEW_POOL */
76 uint64_t uuid[2];
77 uint32_t flags;
78 } new;
79 struct { /* for cmd == TMEM_CONTROL */
80 uint32_t subop;
81 uint32_t cli_id;
82 uint32_t arg1;
83 uint32_t arg2;
84 tmem_cli_va_t buf;
85 } ctrl;
86 struct {
87 uint64_t object;
88 uint32_t index;
89 uint32_t tmem_offset;
90 uint32_t pfn_offset;
91 uint32_t len;
92 tmem_cli_mfn_t cmfn; /* client machine page frame */
93 } gen;
94 } u;
95 };
96 typedef struct tmem_op tmem_op_t;
97 DEFINE_XEN_GUEST_HANDLE(tmem_op_t);
99 #endif
101 #endif /* __XEN_PUBLIC_TMEM_H__ */
103 /*
104 * Local variables:
105 * mode: C
106 * c-set-style: "BSD"
107 * c-basic-offset: 4
108 * tab-width: 4
109 * indent-tabs-mode: nil
110 * End:
111 */