Handle gcc __builtin_strcmp using 128/256 bit vectors with sse4.1, avx/avx2
[valgrind.git] / include / vki / vki-xen-tmem.h
blobef3f72e5aa10d383e1c46f7a9955671e1fd35149
1 /*
2 This file is part of Valgrind, a dynamic binary instrumentation
3 framework.
5 Copyright (C) 2012-2017 Citrix
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, see <http://www.gnu.org/licenses/>.
20 The GNU General Public License is contained in the file COPYING.
23 /* Contributed by Andrew Cooper <andrew.cooper3@citrix.com>
24 and Ian Campbell <ian.campbell@citrix.com> */
26 #ifndef __VKI_XEN_TMEM_H
27 #define __VKI_XEN_TMEM_H
29 typedef VKI_XEN_GUEST_HANDLE(char) vki_xen_tmem_cli_va_t;
32 /* version of ABI */
33 #define VKI_XEN_TMEM_spec_version 1
35 /* Commands to HYPERVISOR_tmem_op() */
36 #define VKI_XEN_TMEM_control 0
37 #define VKI_XEN_TMEM_new_pool 1
38 #define VKI_XEN_TMEM_destroy_pool 2
39 #define VKI_XEN_TMEM_new_page 3
40 #define VKI_XEN_TMEM_put_page 4
41 #define VKI_XEN_TMEM_get_page 5
42 #define VKI_XEN_TMEM_flush_page 6
43 #define VKI_XEN_TMEM_flush_object 7
44 #define VKI_XEN_TMEM_read 8
45 #define VKI_XEN_TMEM_write 9
46 #define VKI_XEN_TMEM_xchg 10
47 /* Privileged commands to HYPERVISOR_tmem_op() */
48 #define VKI_XEN_tmem_auth 101
49 #define VKI_XEN_tmem_restore_new 102
51 /* for cmd = TMEM_CONTROL */
52 struct vki_xen_tmem_ctrl {
53 vki_uint32_t subop;
55 /* Subops for HYPERVISOR_tmem_op(TMEM_CONTROL) */
56 #define VKI_XEN_TMEMC_thaw 0
57 #define VKI_XEN_TMEMC_freeze 1
58 #define VKI_XEN_TMEMC_flush 2
59 #define VKI_XEN_TMEMC_destroy 3
60 #define VKI_XEN_TMEMC_list 4
61 #define VKI_XEN_TMEMC_set_weight 5
62 #define VKI_XEN_TMEMC_set_cap 6
63 #define VKI_XEN_TMEMC_set_compress 7
64 #define VKI_XEN_TMEMC_query_freeable_mb 8
65 #define VKI_XEN_TMEMC_save_begin 10
66 #define VKI_XEN_TMEMC_save_get_version 11
67 #define VKI_XEN_TMEMC_save_get_maxpools 12
68 #define VKI_XEN_TMEMC_save_get_client_weight 13
69 #define VKI_XEN_TMEMC_save_get_client_cap 14
70 #define VKI_XEN_TMEMC_save_get_client_flags 15
71 #define VKI_XEN_TMEMC_save_get_pool_flags 16
72 #define VKI_XEN_TMEMC_save_get_pool_npages 17
73 #define VKI_XEN_TMEMC_save_get_pool_uuid 18
74 #define VKI_XEN_TMEMC_save_get_next_page 19
75 #define VKI_XEN_TMEMC_save_get_next_inv 20
76 #define VKI_XEN_TMEMC_save_end 21
77 #define VKI_XEN_TMEMC_restore_begin 30
78 #define VKI_XEN_TMEMC_restore_put_page 32
79 #define VKI_XEN_TMEMC_restore_flush_page 33
81 vki_uint32_t cli_id;
82 vki_uint32_t arg1;
83 vki_uint32_t arg2;
84 vki_uint64_t oid[3];
85 vki_xen_tmem_cli_va_t buf;
88 struct vki_xen_tmem_op {
89 vki_uint32_t cmd;
90 vki_int32_t pool_id;
91 union {
92 struct vki_xen_tmem_ctrl ctrl;
93 } u;
96 #endif // __VKI_XEN_TMEM_H
98 /*--------------------------------------------------------------------*/
99 /*--- end ---*/
100 /*--------------------------------------------------------------------*/