/xen/tools/libxc/ |
A D | xc_sr_save.c | 344 (ctx->dominfo.domid != ctx->domid) ) in suspend_domain() 405 return ctx->save.ops.check_vm_state(ctx); in send_dirty_pages() 419 return send_dirty_pages(ctx, ctx->save.p2m_size); in send_all_pages() 597 rc = read_record(ctx, ctx->save.recv_fd, &rec); in colo_merge_secondary_dirty_bitmap() 804 rc = ctx->save.ops.setup(ctx); in setup() 839 if ( ctx->save.ops.cleanup(ctx) ) in cleanup() 869 rc = ctx->save.ops.static_data(ctx); in save() 877 rc = ctx->save.ops.start_of_stream(ctx); in save() 882 rc = ctx->save.ops.start_of_checkpoint(ctx); in save() 886 rc = ctx->save.ops.check_vm_state(ctx); in save() [all …]
|
A D | xc_sr_restore.c | 187 ctx->restore.ops.set_gfn(ctx, pfns[i], mfns[i]); in populate_pfns() 234 ctx->restore.ops.set_page_type(ctx, pfns[i], types[i]); in process_page_data() 402 if ( !ctx->restore.ops.pfn_is_valid(ctx, pfn) ) in handle_page_data() 600 rc = ctx->restore.ops.stream_complete(ctx); in handle_checkpoint() 673 rc = ctx->restore.ops.static_data_complete(ctx, &missing); in handle_static_data_end() 713 rc = ctx->restore.ops.process_record(ctx, rec); in process_record() 743 rc = ctx->restore.ops.setup(ctx); in setup() 788 if ( ctx->restore.ops.cleanup(ctx) ) in cleanup() 809 rc = read_record(ctx, ctx->fd, &rec); in restore() 863 rc = ctx->restore.ops.stream_complete(ctx); in restore() [all …]
|
A D | xc_sr_restore_x86_pv.c | 9 return xc_pfn_to_mfn(pfn, ctx->x86.pv.p2m, ctx->x86.pv.width); in pfn_to_mfn() 62 ctx->restore.ops.set_gfn(ctx, i, INVALID_MFN); in expand_p2m() 63 ctx->restore.ops.set_page_type(ctx, i, 0); in expand_p2m() 193 ctx->restore.xenstore_evtchn, ctx->x86.pv.width); in process_start_info() 214 ctx->restore.console_evtchn, ctx->x86.pv.width); in process_start_info() 218 ctx->x86.pv.max_pfn + 1, ctx->x86.pv.width); in process_start_info() 297 pfn = cr3_to_mfn(ctx, GET_FIELD(vcpu, ctrlreg[3], ctx->x86.pv.width)); in process_vcpu_basic() 323 SET_FIELD(vcpu, ctrlreg[3], mfn_to_cr3(ctx, mfn), ctx->x86.pv.width); in process_vcpu_basic() 573 (ctx->x86.pv.max_pfn + 1) * ctx->x86.pv.width); in update_guest_p2m() 662 ctx->x86.pv.width, ctx->x86.pv.levels); in handle_x86_pv_info() [all …]
|
A D | xc_sr_save_x86_pv.c | 20 xch, ctx->domid, PAGE_SIZE, PROT_READ, ctx->dominfo.shared_info_frame); in map_shinfo() 85 ctx->x86.pv.p2m = xc_map_foreign_pages(xch, ctx->domid, PROT_READ, in map_p2m_leaves() 93 ctx->save.p2m_size = ctx->x86.pv.max_pfn + 1; in map_p2m_leaves() 114 ctx->x86.pv.p2m_pfns[x] = mfn_to_pfn(ctx, mfns[x]); in map_p2m_leaves() 221 ctx->x86.pv.p2m_frames = (ctx->x86.pv.max_pfn + fpp) / fpp; in map_p2m_tree() 337 ctx->x86.pv.p2m_frames = ctx->x86.pv.max_pfn / fpp + 1; in map_p2m_list() 470 ctx->x86.pv.max_pfn = GET_FIELD(ctx->x86.pv.shinfo, arch.max_pfn, in map_p2m() 474 return p2m_cr3 ? map_p2m_list(ctx, p2m_cr3) : map_p2m_tree(ctx); in map_p2m() 994 return xc_pfn_to_mfn(pfn, ctx->x86.pv.p2m, ctx->x86.pv.width); in x86_pv_pfn_to_gfn() 1124 munmap(ctx->x86.pv.p2m, ctx->x86.pv.p2m_frames * PAGE_SIZE); in x86_pv_cleanup() [all …]
|
A D | xc_sr_restore_x86_hvm.c | 12 xc_interface *xch = ctx->xch; in handle_hvm_context() 27 xc_interface *xch = ctx->xch; in handle_hvm_params() 138 xc_interface *xch = ctx->xch; in x86_hvm_setup() 150 ctx->restore.guest_page_size); in x86_hvm_setup() 156 if ( ctx->restore.p2m_size > 0x0fffffff ) in x86_hvm_setup() 179 return handle_hvm_context(ctx, rec); in x86_hvm_process_record() 182 return handle_hvm_params(ctx, rec); in x86_hvm_process_record() 200 xc_interface *xch = ctx->xch; in x86_hvm_stream_complete() 244 free(ctx->x86.hvm.restore.context.ptr); in x86_hvm_cleanup() 246 free(ctx->x86.restore.cpuid.ptr); in x86_hvm_cleanup() [all …]
|
A D | xc_sr_common_x86_pv.c | 7 assert(mfn <= ctx->x86.pv.max_mfn); in mfn_to_pfn() 8 return ctx->x86.pv.m2p[mfn]; in mfn_to_pfn() 14 (mfn_to_pfn(ctx, mfn) <= ctx->x86.pv.max_pfn) && in mfn_in_pseudophysmap() 15 (xc_pfn_to_mfn(mfn_to_pfn(ctx, mfn), ctx->x86.pv.p2m, in mfn_in_pseudophysmap() 21 xc_interface *xch = ctx->xch; in dump_bad_pseudophysmap_entry() 28 pfn = ctx->x86.pv.m2p[mfn]; in dump_bad_pseudophysmap_entry() 35 pfn, xc_pfn_to_mfn(pfn, ctx->x86.pv.p2m, ctx->x86.pv.width)); in dump_bad_pseudophysmap_entry() 40 if ( ctx->x86.pv.width == 8 ) in cr3_to_mfn() 56 if ( ctx->x86.pv.width == 8 ) in mfn_to_cr3() 70 xc_interface *xch = ctx->xch; in x86_pv_domain_info() [all …]
|
A D | xc_sr_save_x86_hvm.c | 12 xc_interface *xch = ctx->xch; in write_hvm_context() 44 rc = write_record(ctx, &hvm_rec); in write_hvm_context() 81 xc_interface *xch = ctx->xch; in write_hvm_params() 140 xc_interface *xch = ctx->xch; in x86_hvm_setup() 158 ctx->save.p2m_size = nr_pfns; in x86_hvm_setup() 161 ctx->domid, 1, ctx->save.callbacks->data) ) in x86_hvm_setup() 197 rc = write_x86_tsc_info(ctx); in x86_hvm_end_of_checkpoint() 202 rc = write_hvm_context(ctx); in x86_hvm_end_of_checkpoint() 207 rc = write_hvm_params(ctx); in x86_hvm_end_of_checkpoint() 216 xc_interface *xch = ctx->xch; in x86_hvm_cleanup() [all …]
|
A D | xc_sr_common_x86.c | 3 int write_x86_tsc_info(struct xc_sr_context *ctx) in write_x86_tsc_info() argument 5 xc_interface *xch = ctx->xch; in write_x86_tsc_info() 20 return write_record(ctx, &rec); in write_x86_tsc_info() 25 xc_interface *xch = ctx->xch; in handle_x86_tsc_info() 47 xc_interface *xch = ctx->xch; in write_x86_cpu_policy_records() 86 rc = write_record(ctx, &msrs); in write_x86_cpu_policy_records() 97 xc_interface *xch = ctx->xch; in handle_x86_cpuid_policy() 117 xc_interface *xch = ctx->xch; in handle_x86_msr_policy() 137 xc_interface *xch = ctx->xch; in x86_static_data_complete() 141 if ( ctx->x86.restore.cpuid.ptr ) in x86_static_data_complete() [all …]
|
A D | xc_sr_common.h | 63 int (*setup)(struct xc_sr_context *ctx); 69 int (*static_data)(struct xc_sr_context *ctx); 75 int (*start_of_stream)(struct xc_sr_context *ctx); 89 int (*end_of_checkpoint)(struct xc_sr_context *ctx); 98 int (*check_vm_state)(struct xc_sr_context *ctx); 104 int (*cleanup)(struct xc_sr_context *ctx); 146 int (*setup)(struct xc_sr_context *ctx); 174 int (*stream_complete)(struct xc_sr_context *ctx); 180 int (*cleanup)(struct xc_sr_context *ctx); 431 return write_split_record(ctx, rec, NULL, 0); in write_record() [all …]
|
/xen/xen/common/ |
A D | gdbstub.c | 178 ctx->in_bytes < sizeof(ctx->in_buf); in attempt_receive_packet() 184 ctx->in_buf[ctx->in_bytes] = ch; in attempt_receive_packet() 188 if ( ctx->in_bytes == sizeof(ctx->in_buf) ) in attempt_receive_packet() 194 ctx->in_buf[ctx->in_bytes] = '\0'; in attempt_receive_packet() 224 ctx->out_offset = 1; in gdb_start_packet() 225 ctx->out_csum = 0; in gdb_start_packet() 232 ctx->out_buf[ctx->out_offset] = data; in gdb_write_to_packet_char() 233 ctx->out_offset++; in gdb_write_to_packet_char() 327 gdb_io_write(ctx->out_buf, ctx->out_offset, ctx); in gdb_send_packet() 349 gdb_write_to_packet_hex(ctx->signum, sizeof(ctx->signum), ctx); in gdb_cmd_signum() [all …]
|
/xen/tools/libxl/ |
A D | libxl.h | 1609 int libxl_domain_soft_reset(libxl_ctx *ctx, 1704 int libxl_get_max_cpus(libxl_ctx *ctx); 1707 int libxl_get_online_cpus(libxl_ctx *ctx); 1715 int libxl_get_max_nodes(libxl_ctx *ctx); 1732 libxl_ctx *ctx, uint32_t domid) in libxl_domain_pause_0x041200() argument 1737 libxl_ctx *ctx, uint32_t domid) in libxl_domain_unpause_0x041200() argument 1768 int libxl_domain_need_memory(libxl_ctx *ctx, 2461 int libxl_get_scheduler(libxl_ctx *ctx); 2553 int libxl_tmem_freeable(libxl_ctx *ctx); 2585 int libxl_flask_getenforce(libxl_ctx *ctx); [all …]
|
A D | libxl.c | 28 ctx = malloc(sizeof(*ctx)); in libxl_ctx_alloc() 29 if (!ctx) { in libxl_ctx_alloc() 37 ctx->lg = lg; in libxl_ctx_alloc() 42 ctx->nogc_gc.owner = ctx; in libxl_ctx_alloc() 78 if (libxl__init_recursive_mutex(ctx, &ctx->lock) < 0) { in libxl_ctx_alloc() 81 ctx = 0; in libxl_ctx_alloc() 172 if (ctx->xch) xc_interface_close(ctx->xch); in libxl_ctx_free() 174 if (ctx->xsh) xs_daemon_close(ctx->xsh); in libxl_ctx_free() 175 if (ctx->xce) xenevtchn_close(ctx->xce); in libxl_ctx_free() 177 libxl__poller_put(ctx, ctx->poller_app); in libxl_ctx_free() [all …]
|
A D | libxl_utils.h | 30 char *libxl_domid_to_name(libxl_ctx *ctx, uint32_t domid); 36 int libxl_cpupoolid_is_valid(libxl_ctx *ctx, uint32_t poolid); 37 int libxl_get_stubdom_id(libxl_ctx *ctx, int guest_domid); 60 int libxl_pipe(libxl_ctx *ctx, int pipes[2]); 68 int libxl_mac_to_device_nic(libxl_ctx *ctx, uint32_t domid, 101 void libxl_bitmap_copy(libxl_ctx *ctx, libxl_bitmap *dptr, 109 int libxl_bitmap_or(libxl_ctx *ctx, libxl_bitmap *or_map, 112 int libxl_bitmap_and(libxl_ctx *ctx, libxl_bitmap *and_map, 166 int libxl_nodemap_to_cpumap(libxl_ctx *ctx, 170 int libxl_node_to_cpumap(libxl_ctx *ctx, int node, [all …]
|
A D | libxl_cpupool.c | 67 int libxl_cpupool_info(libxl_ctx *ctx, in libxl_cpupool_info() argument 70 GC_INIT(ctx); in libxl_cpupool_info() 78 GC_INIT(ctx); in libxl_list_cpupool() 117 ncpus = libxl_get_max_cpus(ctx); in libxl_get_freecpus() 135 GC_INIT(ctx); in libxl_cpupool_create() 194 GC_INIT(ctx); in libxl_cpupool_destroy() 246 xc_cpupool_infofree(ctx->xch, info); in libxl_cpupool_destroy() 254 GC_INIT(ctx); in libxl_cpupool_rename() 297 GC_INIT(ctx); in libxl_cpupool_cpuadd() 360 GC_INIT(ctx); in libxl_cpupool_cpuremove() [all …]
|
A D | libxlu_cfg.c | 45 ctx->cfg= cfg; in ctx_prep() 46 ctx->err= 0; in ctx_prep() 49 ctx->scanner= 0; in ctx_prep() 51 e= xlu__cfg_yylex_init_extra(ctx, &ctx->scanner); in ctx_prep() 61 if (ctx->scanner) xlu__cfg_yylex_destroy(ctx->scanner); in ctx_dispose() 73 if (ctx->err && ctx->likely_python) { in parse() 100 parse(&ctx); in xlu_cfg_readfile() 106 return ctx.err; in xlu_cfg_readfile() 125 parse(&ctx); in xlu_cfg_readdata() 131 return ctx.err; in xlu_cfg_readdata() [all …]
|
A D | libxl_psr.c | 148 GC_INIT(ctx); in libxl_psr_cmt_attach() 163 GC_INIT(ctx); in libxl_psr_cmt_detach() 190 return xc_psr_cmt_enabled(ctx->xch); in libxl_psr_cmt_enabled() 195 GC_INIT(ctx); in libxl_psr_cmt_get_total_rmid() 212 GC_INIT(ctx); in libxl_psr_cmt_get_l3_cache_size() 236 GC_INIT(ctx); in libxl_psr_cmt_type_supported() 259 GC_INIT(ctx); in libxl_psr_cmt_get_sample() 381 GC_INIT(ctx); in libxl_psr_cat_get_info() 431 GC_INIT(ctx); in libxl_psr_set_val() 461 GC_INIT(ctx); in libxl_psr_get_val() [all …]
|
A D | libxl_tmem.c | 21 char *libxl_tmem_list(libxl_ctx *ctx, uint32_t domid, int use_long) in libxl_tmem_list() argument 23 GC_INIT(ctx); in libxl_tmem_list() 29 int libxl_tmem_freeze(libxl_ctx *ctx, uint32_t domid) in libxl_tmem_freeze() argument 31 GC_INIT(ctx); in libxl_tmem_freeze() 37 int libxl_tmem_thaw(libxl_ctx *ctx, uint32_t domid) in libxl_tmem_thaw() argument 39 GC_INIT(ctx); in libxl_tmem_thaw() 47 GC_INIT(ctx); in libxl_tmem_set() 53 int libxl_tmem_shared_auth(libxl_ctx *ctx, uint32_t domid, in libxl_tmem_shared_auth() argument 56 GC_INIT(ctx); in libxl_tmem_shared_auth() 62 int libxl_tmem_freeable(libxl_ctx *ctx) in libxl_tmem_freeable() argument [all …]
|
A D | libxl_event.h | 38 int libxl_event_check(libxl_ctx *ctx, libxl_event **event_r, 50 int libxl_event_wait(libxl_ctx *ctx, libxl_event **event_r, 60 void libxl_event_free(libxl_ctx *ctx, libxl_event *event); 76 void libxl_event_register_callbacks(libxl_ctx *ctx, 179 int libxl_evenable_domain_death(libxl_ctx *ctx, uint32_t domid, 261 int libxl_osevent_beforepoll(libxl_ctx *ctx, int *nfds_io, 379 void libxl_osevent_register_hooks(libxl_ctx *ctx, 389 void libxl_osevent_occurred_fd(libxl_ctx *ctx, void *for_libxl, 573 int libxl_childproc_reaped(libxl_ctx *ctx, pid_t, int status) 592 void libxl_childproc_sigchld_occurred(libxl_ctx *ctx) [all …]
|
/xen/xen/drivers/acpi/apei/ |
A D | apei-base.c | 60 if (!ctx) in apei_exec_ctx_init() 63 ctx->ins_table = ins_table; in apei_exec_ctx_init() 66 ctx->entries = entries; in apei_exec_ctx_init() 92 ctx->value = val; in apei_exec_read_register() 105 ctx->value = (ctx->value == entry->value); in apei_exec_read_register_value() 164 ctx->ip = 0; in __apei_exec_run() 178 if (ip == ctx->ip) { in __apei_exec_run() 187 rc = run(ctx, entry); in __apei_exec_run() 191 ctx->ip++; in __apei_exec_run() 194 if (ctx->ip < ip) in __apei_exec_run() [all …]
|
A D | erst.c | 138 ctx->var1 += ctx->var2; in erst_exec_add() 145 ctx->var1 -= ctx->var2; in erst_exec_subtract() 158 val += ctx->value; in erst_exec_add_value() 172 val -= ctx->value; in erst_exec_subtract_value() 182 ctx->var1); in erst_exec_stall() 194 ctx->var1; in erst_exec_stall_while_true() 200 if (val != ctx->value) in erst_exec_stall_while_true() 219 ctx->ip += 2; in erst_exec_skip_next_instruction_if_true() 229 ctx->ip = ctx->value; in erst_exec_goto() 263 src = ioremap(ctx->src_base + offset, ctx->var2); in erst_exec_move_data() [all …]
|
A D | apei-internal.h | 11 typedef int (*apei_exec_ins_func_t)(struct apei_exec_context *ctx, 34 int apei_exec_ctx_init(struct apei_exec_context *ctx, 43 ctx->value = input; in apei_exec_ctx_set_input() 48 return ctx->value; in apei_exec_ctx_get_output() 55 return __apei_exec_run(ctx, action, 0); in apei_exec_run() 61 return __apei_exec_run(ctx, action, 1); in apei_exec_run_optional() 71 int apei_exec_read_register(struct apei_exec_context *ctx, 75 int apei_exec_write_register(struct apei_exec_context *ctx, 79 int apei_exec_noop(struct apei_exec_context *ctx, 81 int apei_exec_pre_map_gars(struct apei_exec_context *ctx); [all …]
|
/xen/tools/xenstore/ |
A D | talloc.h | 45 #define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type) argument 46 #define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__) argument 48 #define talloc_new(ctx) talloc_named_const(ctx, 0, "talloc_new: " __location__) argument 50 #define talloc_zero(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type) argument 51 #define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__) argument 55 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__) argument 80 #define talloc_zero_p(ctx, type) talloc_zero(ctx, type) argument 81 #define talloc_p(ctx, type) talloc(ctx, type) argument 82 #define talloc_array_p(ctx, type, count) talloc_array(ctx, type, count) argument 83 #define talloc_realloc_p(ctx, p, type, count) talloc_realloc(ctx, p, type, count) argument [all …]
|
/xen/tools/tests/x86_emulator/ |
A D | blowfish.c | 324 y = ctx->S[0][a] + ctx->S[1][b]; in F() 325 y = y ^ ctx->S[2][c]; in F() 326 y = y + ctx->S[3][d]; in F() 342 Xl = Xl ^ ctx->P[i]; in Blowfish_Encrypt() 354 Xr = Xr ^ ctx->P[N]; in Blowfish_Encrypt() 355 Xl = Xl ^ ctx->P[N + 1]; in Blowfish_Encrypt() 372 Xl = Xl ^ ctx->P[i]; in Blowfish_Decrypt() 386 Xr = Xr ^ ctx->P[1]; in Blowfish_Decrypt() 387 Xl = Xl ^ ctx->P[0]; in Blowfish_Decrypt() 419 ctx->P[i] = datal; in Blowfish_Init() [all …]
|
/xen/stubdom/vtpmmgr/ |
A D | tpmrsa.c | 47 tpmrsa_free(ctx); in tpmrsa_set_pubkey() 50 mpi_lset(&ctx->E, 65537); in tpmrsa_set_pubkey() 56 ctx->len = ( mpi_msb(&ctx->N) + 7) >> 3; in tpmrsa_set_pubkey() 71 if( mpi_cmp_mpi( &T, &ctx->N ) >= 0 ) in tpmrsa_public() 77 olen = ctx->len; in tpmrsa_public() 78 MPI_CHK( mpi_exp_mod( &T, &T, &ctx->E, &ctx->N, &ctx->RN ) ); in tpmrsa_public() 97 unsigned char *tmp = alloca(ctx->len); in tpmrsa_sigcheck() 100 rv = tpmrsa_public(ctx, input, tmp); in tpmrsa_sigcheck() 130 sha1_context ctx = mctx; in mgf_mask() local 134 sha1_finish(&ctx, mask); in mgf_mask() [all …]
|
/xen/xen/arch/arm/tee/ |
A D | optee.c | 233 if ( !ctx ) in optee_domain_init() 252 xfree(ctx); in optee_domain_init() 265 d->arch.tee = ctx; in optee_domain_init() 323 spin_lock(&ctx->lock); in allocate_std_call() 335 spin_lock(&ctx->lock); in free_std_call() 369 spin_lock(&ctx->lock); in get_std_call() 398 spin_lock(&ctx->lock); in put_std_call() 427 spin_lock(&ctx->lock); in allocate_and_pin_shm_rpc() 461 spin_lock(&ctx->lock); in free_shm_rpc() 649 if ( !ctx ) in optee_relinquish_resources() [all …]
|