xen: Implement the xsm_op hypercall
[valgrind.git] / include / vki / vki-xen-tmem.h
blobab402f09c87431594c6e3e9ef71d44d899b48cdd
1 #ifndef __VKI_XEN_TMEM_H
2 #define __VKI_XEN_TMEM_H
4 typedef VKI_XEN_GUEST_HANDLE(char) vki_xen_tmem_cli_va_t;
7 /* version of ABI */
8 #define VKI_XEN_TMEM_spec_version 1
10 /* Commands to HYPERVISOR_tmem_op() */
11 #define VKI_XEN_TMEM_control 0
12 #define VKI_XEN_TMEM_new_pool 1
13 #define VKI_XEN_TMEM_destroy_pool 2
14 #define VKI_XEN_TMEM_new_page 3
15 #define VKI_XEN_TMEM_put_page 4
16 #define VKI_XEN_TMEM_get_page 5
17 #define VKI_XEN_TMEM_flush_page 6
18 #define VKI_XEN_TMEM_flush_object 7
19 #define VKI_XEN_TMEM_read 8
20 #define VKI_XEN_TMEM_write 9
21 #define VKI_XEN_TMEM_xchg 10
22 /* Privileged commands to HYPERVISOR_tmem_op() */
23 #define VKI_XEN_tmem_auth 101
24 #define VKI_XEN_tmem_restore_new 102
26 /* for cmd = TMEM_CONTROL */
27 struct vki_xen_tmem_ctrl {
28 vki_uint32_t subop;
30 /* Subops for HYPERVISOR_tmem_op(TMEM_CONTROL) */
31 #define VKI_XEN_TMEMC_thaw 0
32 #define VKI_XEN_TMEMC_freeze 1
33 #define VKI_XEN_TMEMC_flush 2
34 #define VKI_XEN_TMEMC_destroy 3
35 #define VKI_XEN_TMEMC_list 4
36 #define VKI_XEN_TMEMC_set_weight 5
37 #define VKI_XEN_TMEMC_set_cap 6
38 #define VKI_XEN_TMEMC_set_compress 7
39 #define VKI_XEN_TMEMC_query_freeable_mb 8
40 #define VKI_XEN_TMEMC_save_begin 10
41 #define VKI_XEN_TMEMC_save_get_version 11
42 #define VKI_XEN_TMEMC_save_get_maxpools 12
43 #define VKI_XEN_TMEMC_save_get_client_weight 13
44 #define VKI_XEN_TMEMC_save_get_client_cap 14
45 #define VKI_XEN_TMEMC_save_get_client_flags 15
46 #define VKI_XEN_TMEMC_save_get_pool_flags 16
47 #define VKI_XEN_TMEMC_save_get_pool_npages 17
48 #define VKI_XEN_TMEMC_save_get_pool_uuid 18
49 #define VKI_XEN_TMEMC_save_get_next_page 19
50 #define VKI_XEN_TMEMC_save_get_next_inv 20
51 #define VKI_XEN_TMEMC_save_end 21
52 #define VKI_XEN_TMEMC_restore_begin 30
53 #define VKI_XEN_TMEMC_restore_put_page 32
54 #define VKI_XEN_TMEMC_restore_flush_page 33
56 vki_uint32_t cli_id;
57 vki_uint32_t arg1;
58 vki_uint32_t arg2;
59 vki_uint64_t oid[3];
60 vki_xen_tmem_cli_va_t buf;
63 struct vki_xen_tmem_op {
64 vki_uint32_t cmd;
65 vki_int32_t pool_id;
66 union {
67 struct vki_xen_tmem_ctrl ctrl;
68 } u;
71 #endif // __VKI_XEN_TMEM_H
73 /*--------------------------------------------------------------------*/
74 /*--- end ---*/
75 /*--------------------------------------------------------------------*/