context_cmd.h (1863B)
1 #ifndef _VX_CONTEXT_CMD_H 2 #define _VX_CONTEXT_CMD_H 3 4 5 /* vinfo commands */ 6 7 #define VCMD_task_xid VC_CMD(VINFO, 1, 0) 8 9 10 #define VCMD_vx_info VC_CMD(VINFO, 5, 0) 11 12 struct vcmd_vx_info_v0 { 13 uint32_t xid; 14 uint32_t initpid; 15 /* more to come */ 16 }; 17 18 19 #define VCMD_ctx_stat VC_CMD(VSTAT, 0, 0) 20 21 struct vcmd_ctx_stat_v0 { 22 uint32_t usecnt; 23 uint32_t tasks; 24 /* more to come */ 25 }; 26 27 28 /* context commands */ 29 30 #define VCMD_ctx_create_v0 VC_CMD(VPROC, 1, 0) 31 #define VCMD_ctx_create_v1 VC_CMD(VPROC, 1, 1) 32 #define VCMD_ctx_create VC_CMD(VPROC, 1, 2) 33 34 struct vcmd_ctx_create { 35 uint64_t flagword; 36 }; 37 38 #define VCMD_ctx_migrate_v0 VC_CMD(PROCMIG, 1, 0) 39 #define VCMD_ctx_migrate_v1 VC_CMD(PROCMIG, 1, 1) 40 #define VCMD_ctx_migrate VC_CMD(PROCMIG, 1, 2) 41 42 struct vcmd_ctx_migrate { 43 uint64_t flagword; 44 }; 45 46 47 48 /* flag commands */ 49 50 #define VCMD_get_cflags VC_CMD(FLAGS, 1, 0) 51 #define VCMD_set_cflags VC_CMD(FLAGS, 2, 0) 52 53 struct vcmd_ctx_flags_v0 { 54 uint64_t flagword; 55 uint64_t mask; 56 }; 57 58 59 60 /* context caps commands */ 61 62 #define VCMD_get_ccaps_v0 VC_CMD(FLAGS, 3, 0) 63 #define VCMD_set_ccaps_v0 VC_CMD(FLAGS, 4, 0) 64 65 struct vcmd_ctx_caps_v0 { 66 uint64_t bcaps; 67 uint64_t ccaps; 68 uint64_t cmask; 69 }; 70 71 #define VCMD_get_ccaps VC_CMD(FLAGS, 3, 1) 72 #define VCMD_set_ccaps VC_CMD(FLAGS, 4, 1) 73 74 struct vcmd_ctx_caps_v1 { 75 uint64_t ccaps; 76 uint64_t cmask; 77 }; 78 79 80 81 /* bcaps commands */ 82 83 #define VCMD_get_bcaps VC_CMD(FLAGS, 9, 0) 84 #define VCMD_set_bcaps VC_CMD(FLAGS, 10, 0) 85 86 struct vcmd_bcaps { 87 uint64_t bcaps; 88 uint64_t bmask; 89 }; 90 91 92 93 /* umask commands */ 94 95 #define VCMD_get_umask VC_CMD(FLAGS, 13, 0) 96 #define VCMD_set_umask VC_CMD(FLAGS, 14, 0) 97 98 struct vcmd_umask { 99 uint64_t umask; 100 uint64_t mask; 101 }; 102 103 104 105 /* OOM badness */ 106 107 #define VCMD_get_badness VC_CMD(MEMCTRL, 5, 0) 108 #define VCMD_set_badness VC_CMD(MEMCTRL, 6, 0) 109 110 struct vcmd_badness_v0 { 111 int64_t bias; 112 }; 113 114 #endif /* _VX_CONTEXT_CMD_H */