Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:25:34

0001 /*
0002    This file is part of Valgrind, a dynamic binary instrumentation
0003    framework.
0004 
0005    Copyright (C) 2012-2017 Citrix
0006 
0007    This program is free software; you can redistribute it and/or
0008    modify it under the terms of the GNU General Public License as
0009    published by the Free Software Foundation; either version 2 of the
0010    License, or (at your option) any later version.
0011 
0012    This program is distributed in the hope that it will be useful, but
0013    WITHOUT ANY WARRANTY; without even the implied warranty of
0014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015    General Public License for more details.
0016 
0017    You should have received a copy of the GNU General Public License
0018    along with this program; if not, see <http://www.gnu.org/licenses/>.
0019 
0020    The GNU General Public License is contained in the file COPYING.
0021 */
0022 
0023 /* Contributed by Andrew Cooper <andrew.cooper3@citrix.com>
0024    and Ian Campbell <ian.campbell@citrix.com> */
0025 
0026 #ifndef __VKI_XEN_TMEM_H
0027 #define __VKI_XEN_TMEM_H
0028 
0029 typedef VKI_XEN_GUEST_HANDLE(char) vki_xen_tmem_cli_va_t;
0030 
0031 
0032 /* version of ABI */
0033 #define VKI_XEN_TMEM_spec_version          1
0034 
0035 /* Commands to HYPERVISOR_tmem_op() */
0036 #define VKI_XEN_TMEM_control               0
0037 #define VKI_XEN_TMEM_new_pool              1
0038 #define VKI_XEN_TMEM_destroy_pool          2
0039 #define VKI_XEN_TMEM_new_page              3
0040 #define VKI_XEN_TMEM_put_page              4
0041 #define VKI_XEN_TMEM_get_page              5
0042 #define VKI_XEN_TMEM_flush_page            6
0043 #define VKI_XEN_TMEM_flush_object          7
0044 #define VKI_XEN_TMEM_read                  8
0045 #define VKI_XEN_TMEM_write                 9
0046 #define VKI_XEN_TMEM_xchg                 10
0047 /* Privileged commands to HYPERVISOR_tmem_op() */
0048 #define VKI_XEN_tmem_auth                 101
0049 #define VKI_XEN_tmem_restore_new          102
0050 
0051 /* for cmd = TMEM_CONTROL */
0052 struct vki_xen_tmem_ctrl {
0053     vki_uint32_t subop;
0054 
0055 /* Subops for HYPERVISOR_tmem_op(TMEM_CONTROL) */
0056 #define VKI_XEN_TMEMC_thaw                   0
0057 #define VKI_XEN_TMEMC_freeze                 1
0058 #define VKI_XEN_TMEMC_flush                  2
0059 #define VKI_XEN_TMEMC_destroy                3
0060 #define VKI_XEN_TMEMC_list                   4
0061 #define VKI_XEN_TMEMC_set_weight             5
0062 #define VKI_XEN_TMEMC_set_cap                6
0063 #define VKI_XEN_TMEMC_set_compress           7
0064 #define VKI_XEN_TMEMC_query_freeable_mb      8
0065 #define VKI_XEN_TMEMC_save_begin             10
0066 #define VKI_XEN_TMEMC_save_get_version       11
0067 #define VKI_XEN_TMEMC_save_get_maxpools      12
0068 #define VKI_XEN_TMEMC_save_get_client_weight 13
0069 #define VKI_XEN_TMEMC_save_get_client_cap    14
0070 #define VKI_XEN_TMEMC_save_get_client_flags  15
0071 #define VKI_XEN_TMEMC_save_get_pool_flags    16
0072 #define VKI_XEN_TMEMC_save_get_pool_npages   17
0073 #define VKI_XEN_TMEMC_save_get_pool_uuid     18
0074 #define VKI_XEN_TMEMC_save_get_next_page     19
0075 #define VKI_XEN_TMEMC_save_get_next_inv      20
0076 #define VKI_XEN_TMEMC_save_end               21
0077 #define VKI_XEN_TMEMC_restore_begin          30
0078 #define VKI_XEN_TMEMC_restore_put_page       32
0079 #define VKI_XEN_TMEMC_restore_flush_page     33
0080 
0081     vki_uint32_t cli_id;
0082     vki_uint32_t arg1;
0083     vki_uint32_t arg2;
0084     vki_uint64_t oid[3];
0085     vki_xen_tmem_cli_va_t buf;
0086 };
0087 
0088 struct vki_xen_tmem_op {
0089     vki_uint32_t cmd;
0090     vki_int32_t pool_id;
0091     union {
0092         struct vki_xen_tmem_ctrl ctrl;
0093     } u;
0094 };
0095 
0096 #endif // __VKI_XEN_TMEM_H
0097 
0098 /*--------------------------------------------------------------------*/
0099 /*--- end                                                          ---*/
0100 /*--------------------------------------------------------------------*/