/xen/tools/libxc/ |
A D | xc_private.c | 43 xch->error_handler = xch->error_handler_tofree = in xc_interface_open() 50 xch = malloc(sizeof(*xch)); in xc_interface_open() 51 if (!xch) { in xc_interface_open() 56 *xch = xch_buf; in xc_interface_open() 61 xch->xcall = xencall_open(xch->error_handler, in xc_interface_open() 66 xch->fmem = xenforeignmemory_open(xch->error_handler, 0); in xc_interface_open() 70 xch->dmod = xendevicemodel_open(xch->error_handler, 0); in xc_interface_open() 74 return xch; in xc_interface_open() 80 if (xch != &xch_buf) free(xch); in xc_interface_open() 88 if (!xch) in xc_interface_close() [all …]
|
A D | xc_flask.c | 79 err = xc_flask_op(xch, &op); in xc_flask_load() 102 err = xc_flask_op(xch, &op); in xc_flask_context_to_sid() 129 err = xc_flask_op(xch, &op); in xc_flask_sid_to_context() 141 return xc_flask_op(xch, &op); in xc_flask_getenforce() 150 return xc_flask_op(xch, &op); in xc_flask_setenforce() 170 rv = xc_flask_op(xch, &op); in xc_flask_getbool_byid() 202 rv = xc_flask_op(xch, &op); in xc_flask_getbool_byname() 236 rv = xc_flask_op(xch, &op); in xc_flask_setbool() 260 return xc_flask_op(xch, &op); in xc_flask_add() 337 err = xc_flask_op(xch, &op); in xc_flask_access() [all …]
|
A D | xc_devicemodel_compat.c | 10 xc_interface *xch, uint32_t domid, int handle_bufioreq, in xc_hvm_create_ioreq_server() argument 13 return xendevicemodel_create_ioreq_server(xch->dmod, domid, in xc_hvm_create_ioreq_server() 21 return xendevicemodel_get_ioreq_server_info(xch->dmod, domid, id, in xc_hvm_get_ioreq_server_info() 27 xc_interface *xch, uint32_t domid, ioservid_t id, int is_mmio, in xc_hvm_map_io_range_to_ioreq_server() argument 36 xc_interface *xch, uint32_t domid, ioservid_t id, int is_mmio, in xc_hvm_unmap_io_range_from_ioreq_server() argument 63 xc_interface *xch, uint32_t domid, ioservid_t id) in xc_hvm_destroy_ioreq_server() argument 65 return xendevicemodel_destroy_ioreq_server(xch->dmod, domid, id); in xc_hvm_destroy_ioreq_server() 69 xc_interface *xch, uint32_t domid, ioservid_t id, int enabled) in xc_hvm_set_ioreq_server_state() argument 90 xc_interface *xch, uint32_t domid, uint8_t link, uint8_t irq) in xc_hvm_set_pci_link_route() argument 116 xc_interface *xch, uint32_t domid, hvmmem_type_t type, in xc_hvm_set_mem_type() argument [all …]
|
A D | xc_private.h | 117 void xc_report_progress_step(xc_interface *xch, 123 xc_report(xch, xch->error_handler, XTL_INFO,0, _f , ## _a); \ 127 xc_report(xch, xch->error_handler, XTL_DETAIL,0, _f , ## _a); \ 131 xc_report(xch, xch->error_handler, XTL_DEBUG,0, _f , ## _a); \ 239 if ( xc_hypercall_bounce_pre(xch, op) ) in do_physdev_op() 254 xc_hypercall_bounce_post(xch, op); in do_physdev_op() 270 if ( xc_hypercall_bounce_pre(xch, domctl) ) in do_domctl_maybe_retry_efault() 288 xc_hypercall_bounce_post(xch, domctl); in do_domctl_maybe_retry_efault() 312 if ( xc_hypercall_bounce_pre(xch, sysctl) ) in do_sysctl() 327 xc_hypercall_bounce_post(xch, sysctl); in do_sysctl() [all …]
|
A D | xc_misc.c | 24 int xc_get_max_cpus(xc_interface *xch) in xc_get_max_cpus() argument 90 sz = xc_get_cpumap_size(xch); in xc_cpumap_alloc() 128 sz = xc_get_nodemap_size(xch); in xc_nodemap_alloc() 183 ret = do_sysctl(xch, &sysctl); in xc_send_debug_keys() 190 int xc_physinfo(xc_interface *xch, in xc_physinfo() argument 332 int xc_sched_id(xc_interface *xch, in xc_sched_id() argument 443 rc = do_sysctl(xch, &sysctl); in xc_perfc_query_number() 491 rc = do_sysctl(xch, &sysctl); in xc_lockprof_query_number() 512 rc = do_sysctl(xch, &sysctl); in xc_lockprof_query() 533 rc = do_sysctl(xch, &sysctl); in xc_getcpuinfo() [all …]
|
A D | xc_domain.c | 1512 xc_interface *xch, in xc_assign_device() argument 1529 xc_interface *xch, in xc_get_device_group() argument 1564 xc_interface *xch, in xc_test_assign_device() argument 1580 xc_interface *xch, in xc_deassign_device() argument 1596 xc_interface *xch, in xc_assign_dt_device() argument 1628 xc_interface *xch, in xc_test_assign_dt_device() argument 1656 xc_interface *xch, in xc_deassign_dt_device() argument 1687 xc_interface *xch, in xc_domain_update_msi_irq() argument 1713 xc_interface *xch, in xc_domain_unbind_msi_irq() argument 1738 xc_interface *xch, in xc_domain_bind_pt_irq_int() argument [all …]
|
A D | xc_dom_boot.c | 57 rc = do_domctl(dom->xch, &domctl); in setup_hypercall_page() 96 dom->xch = xch; in xc_dom_boot_xen_init() 115 DOMPRINTF_CALLED(dom->xch); in xc_dom_boot_mem_init() 171 DOMPRINTF_CALLED(dom->xch); in xc_dom_boot_image() 243 xc_hypercall_buffer_free(xch, gmfnp); in xc_dom_gnttab_setup() 247 xc_dom_panic(xch, XC_INTERNAL_ERROR, in xc_dom_gnttab_setup() 289 gnttab = xc_map_foreign_range(xch, in compat_gnttab_seed() 296 xc_dom_panic(xch, XC_INTERNAL_ERROR, in compat_gnttab_seed() 310 xc_dom_panic(xch, XC_INTERNAL_ERROR, in compat_gnttab_seed() 344 xc_dom_panic(xch, XC_INTERNAL_ERROR, in compat_gnttab_hvm_seed() [all …]
|
A D | xc_pm.c | 37 ret = xc_sysctl(xch, &sysctl); in xc_pm_get_max_px() 81 ret = xc_sysctl(xch, &sysctl); in xc_pm_get_pxstat() 85 xc_hypercall_bounce_post(xch, pt); in xc_pm_get_pxstat() 300 if ( !xch || !govname ) in xc_set_cpufreq_gov() 319 if ( !xch ) in xc_set_cpufreq_para() 338 if ( !xch || !avg_freq ) in xc_get_cpufreq_avgfreq() 365 rc = do_sysctl(xch, &sysctl); in xc_set_sched_opt_smt() 375 if ( !xch || !value ) in get_max_cstate() 404 if ( !xch ) in set_max_cstate() 431 if ( !xch ) in xc_enable_turbo() [all …]
|
A D | xc_kexec.c | 15 int xc_kexec_exec(xc_interface *xch, int type) in xc_kexec_exec() argument 29 ret = xencall2(xch->xcall, __HYPERVISOR_kexec_op, in xc_kexec_exec() 34 xc_hypercall_buffer_free(xch, exec); in xc_kexec_exec() 63 xc_hypercall_buffer_free(xch, get_range); in xc_kexec_get_range() 77 if ( xc_hypercall_bounce_pre(xch, segments) ) in xc_kexec_load() 100 xc_hypercall_buffer_free(xch, load); in xc_kexec_load() 101 xc_hypercall_bounce_post(xch, segments); in xc_kexec_load() 106 int xc_kexec_unload(xc_interface *xch, int type) in xc_kexec_unload() argument 125 xc_hypercall_buffer_free(xch, unload); in xc_kexec_unload() 130 int xc_kexec_status(xc_interface *xch, int type) in xc_kexec_status() argument [all …]
|
A D | xc_mem_paging.c | 41 if ( xc_hypercall_bounce_pre(xch, buffer) ) in xc_mem_paging_memop() 50 rc = do_memory_op(xch, XENMEM_paging_op, &mpo, sizeof(mpo)); in xc_mem_paging_memop() 53 xc_hypercall_bounce_post(xch, buffer); in xc_mem_paging_memop() 58 int xc_mem_paging_enable(xc_interface *xch, uint32_t domain_id, in xc_mem_paging_enable() argument 67 return xc_vm_event_control(xch, domain_id, in xc_mem_paging_enable() 75 return xc_vm_event_control(xch, domain_id, in xc_mem_paging_disable() 83 return xc_vm_event_control(xch, domain_id, in xc_mem_paging_resume() 91 return xc_mem_paging_memop(xch, domain_id, in xc_mem_paging_nominate() 98 return xc_mem_paging_memop(xch, domain_id, in xc_mem_paging_evict() 105 return xc_mem_paging_memop(xch, domain_id, in xc_mem_paging_prep() [all …]
|
A D | xc_resume.c | 35 if ( xc_domain_getinfo(xch, domid, 1, &info) != 1 || in modify_returncode() 103 if ( (rc = modify_returncode(xch, domid)) != 0 ) in xc_domain_resume_cooperative() 108 return do_domctl(xch, &domctl); in xc_domain_resume_cooperative() 129 return do_domctl(xch, &domctl); in xc_domain_resume_hvm() 151 if ( xc_domain_getinfo(xch, domid, 1, &info) != 1 ) in xc_domain_resume_any() 162 return xc_domain_resume_hvm(xch, domid); in xc_domain_resume_any() 208 p2m = xc_map_foreign_pages(xch, domid, PROT_READ, in xc_domain_resume_any() 217 if ( xc_vcpu_getcontext(xch, domid, 0, &ctxt) ) in xc_domain_resume_any() 250 rc = do_domctl(xch, &domctl); in xc_domain_resume_any() 288 ? xc_domain_resume_cooperative(xch, domid) in xc_domain_resume() [all …]
|
A D | xc_memshr.c | 27 int xc_memshr_control(xc_interface *xch, in xc_memshr_control() argument 41 return do_domctl(xch, &domctl); in xc_memshr_control() 44 int xc_memshr_ring_enable(xc_interface *xch, in xc_memshr_ring_enable() argument 54 return xc_vm_event_control(xch, domid, in xc_memshr_ring_enable() 63 return xc_vm_event_control(xch, domid, in xc_memshr_ring_disable() 90 rc = xc_memshr_memop(xch, domid, &mso); in xc_memshr_nominate_gfn() 111 rc = xc_memshr_memop(xch, domid, &mso); in xc_memshr_nominate_gref() 119 int xc_memshr_share_gfns(xc_interface *xch, in xc_memshr_share_gfns() argument 208 return xc_vm_event_control(xch, domid, in xc_memshr_domain_resume() 214 int xc_memshr_debug_gfn(xc_interface *xch, in xc_memshr_debug_gfn() argument [all …]
|
A D | xc_tbuf.c | 39 return xc_sysctl(xch, &sysctl); in tbuf_enable() 51 return xc_sysctl(xch, &sysctl); in xc_tbuf_set_size() 64 rc = xc_sysctl(xch, &sysctl); in xc_tbuf_get_size() 95 if ( tbuf_enable(xch, 1) != 0 ) in xc_tbuf_enable() 102 rc = xc_sysctl(xch, &sysctl); in xc_tbuf_enable() 112 int xc_tbuf_disable(xc_interface *xch) in xc_tbuf_disable() argument 114 return tbuf_enable(xch, 0); in xc_tbuf_disable() 124 cpusize = xc_get_cpumap_size(xch); in xc_tbuf_set_cpu_mask() 133 bits = xc_get_max_cpus(xch); in xc_tbuf_set_cpu_mask() 153 ret = do_sysctl(xch, &sysctl); in xc_tbuf_set_cpu_mask() [all …]
|
A D | xc_gnttab.c | 26 if ( xc_hypercall_bounce_pre(xch, op) ) in xc_gnttab_op() 32 ret = xencall3(xch->xcall, __HYPERVISOR_grant_table_op, in xc_gnttab_op() 35 xc_hypercall_bounce_post(xch, op); in xc_gnttab_op() 53 int xc_gnttab_get_version(xc_interface *xch, uint32_t domid) in xc_gnttab_get_version() argument 59 rc = xc_gnttab_op(xch, GNTTABOP_get_version, &query, sizeof(query), in xc_gnttab_get_version() 121 gnt = xc_map_foreign_pages(xch, domid, PROT_READ, pfn_list, in _gnttab_map_table() 131 xc_hypercall_buffer_free(xch, frame_list); in _gnttab_map_table() 140 if (xc_gnttab_get_version(xch, domid) == 2) in xc_gnttab_map_table_v1() 142 return _gnttab_map_table(xch, domid, gnt_num); in xc_gnttab_map_table_v1() 148 if (xc_gnttab_get_version(xch, domid) != 2) in xc_gnttab_map_table_v2() [all …]
|
A D | xc_core.c | 80 xc_core_strtab_init(xc_interface *xch) in xc_core_strtab_init() argument 164 xc_core_shdr_init(xc_interface *xch) in xc_core_shdr_init() argument 190 xc_core_shdr_get(xc_interface *xch, in xc_core_shdr_get() argument 218 xc_core_shdr_set(xc_interface *xch, in xc_core_shdr_set() argument 268 elfnote_fill_xen_version(xc_interface *xch, in elfnote_fill_xen_version() argument 291 rc = xc_version(xch, in elfnote_fill_xen_version() 350 xc_interface *xch, in elfnote_dump_core_header() argument 594 strtab = xc_core_strtab_init(xch); in xc_domain_dumpcore_via_callback() 600 sheaders = xc_core_shdr_init(xch); in xc_domain_dumpcore_via_callback() 607 shdr = xc_core_shdr_get(xch,sheaders); in xc_domain_dumpcore_via_callback() [all …]
|
A D | xc_monitor.c | 63 rc = do_domctl(xch, &domctl); in xc_monitor_get_capabilities() 89 return do_domctl(xch, &domctl); in xc_monitor_write_ctrlreg() 105 return do_domctl(xch, &domctl); in xc_monitor_mov_to_msr() 119 return do_domctl(xch, &domctl); in xc_monitor_software_breakpoint() 133 return do_domctl(xch, &domctl); in xc_monitor_singlestep() 147 return do_domctl(xch, &domctl); in xc_monitor_descriptor_access() 163 return do_domctl(xch, &domctl); in xc_monitor_guest_request() 177 return do_domctl(xch, &domctl); in xc_monitor_inguest_pagefault() 190 return do_domctl(xch, &domctl); in xc_monitor_emulate_each_rep() 205 return do_domctl(xch, &domctl); in xc_monitor_debug_exceptions() [all …]
|
A D | xc_cpupool.c | 31 ret = do_sysctl(xch, sysctl); in do_sysctl_save() 37 int xc_cpupool_create(xc_interface *xch, in xc_cpupool_create() argument 56 int xc_cpupool_destroy(xc_interface *xch, in xc_cpupool_destroy() argument 64 return do_sysctl_save(xch, &sysctl); in xc_cpupool_destroy() 76 local_size = xc_get_cpumap_size(xch); in xc_cpupool_getinfo() 95 err = do_sysctl_save(xch, &sysctl); in xc_cpupool_getinfo() 104 info->cpumap = xc_cpumap_alloc(xch); in xc_cpupool_getinfo() 128 int xc_cpupool_addcpu(xc_interface *xch, in xc_cpupool_addcpu() argument 190 mapsize = xc_get_cpumap_size(xch); in xc_cpupool_freeinfo() 205 err = do_sysctl_save(xch, &sysctl); in xc_cpupool_freeinfo() [all …]
|
A D | xc_offline_page.c | 75 ret = xc_sysctl(xch, &sysctl); in xc_mark_page_online() 77 xc_hypercall_bounce_post(xch, status); in xc_mark_page_online() 105 ret = xc_sysctl(xch, &sysctl); in xc_mark_page_offline() 107 xc_hypercall_bounce_post(xch, status); in xc_mark_page_offline() 135 ret = xc_sysctl(xch, &sysctl); in xc_query_page_offline_status() 137 xc_hypercall_bounce_post(xch, status); in xc_query_page_offline_status() 205 typedef int (*pte_func)(xc_interface *xch, 211 static int __clear_pte(xc_interface *xch, in __clear_pte() argument 236 static int __update_pte(xc_interface *xch, in __update_pte() argument 331 if ( xc_flush_mmu_updates(xch, mmu) ) in change_pte() [all …]
|
A D | xc_resource.c | 30 if ( xc_hypercall_bounce_pre(xch, entries) ) in xc_resource_op_one() 38 rc = do_platform_op(xch, &platform_op); in xc_resource_op_one() 41 xc_hypercall_bounce_post(xch, entries); in xc_resource_op_one() 54 call_list = xc_hypercall_buffer_alloc(xch, call_list, in xc_resource_op_multi() 59 platform_ops = xc_hypercall_buffer_array_create(xch, nr_ops); in xc_resource_op_multi() 66 entries_list = xc_hypercall_buffer_array_create(xch, nr_ops); in xc_resource_op_multi() 126 xc_hypercall_buffer_array_destroy(xch, entries_list); in xc_resource_op_multi() 127 xc_hypercall_buffer_array_destroy(xch, platform_ops); in xc_resource_op_multi() 128 xc_hypercall_buffer_free(xch, call_list); in xc_resource_op_multi() 135 return xc_resource_op_one(xch, ops); in xc_resource_op() [all …]
|
A D | xc_evtchn.c | 24 static int do_evtchn_op(xc_interface *xch, int cmd, void *arg, in do_evtchn_op() argument 30 if ( xc_hypercall_bounce_pre(xch, arg) ) in do_evtchn_op() 36 ret = xencall2(xch->xcall, __HYPERVISOR_event_channel_op, in do_evtchn_op() 41 xc_hypercall_bounce_post(xch, arg); in do_evtchn_op() 47 xc_evtchn_alloc_unbound(xc_interface *xch, in xc_evtchn_alloc_unbound() argument 57 rc = do_evtchn_op(xch, EVTCHNOP_alloc_unbound, &arg, sizeof(arg), 0); in xc_evtchn_alloc_unbound() 64 int xc_evtchn_reset(xc_interface *xch, in xc_evtchn_reset() argument 68 return do_evtchn_op(xch, EVTCHNOP_reset, &arg, sizeof(arg), 0); in xc_evtchn_reset() 71 int xc_evtchn_status(xc_interface *xch, xc_evtchn_status_t *status) in xc_evtchn_status() argument 73 return do_evtchn_op(xch, EVTCHNOP_status, status, in xc_evtchn_status()
|
A D | xc_hcall_buf.c | 32 void *p = xencall_alloc_buffer_pages(xch->xcall, nr_pages); in xc__hypercall_buffer_alloc_pages() 44 xencall_free_buffer_pages(xch->xcall, b->hbuf, nr_pages); in xc__hypercall_buffer_free_pages() 49 void *p = xencall_alloc_buffer(xch->xcall, size); in xc__hypercall_buffer_alloc() 59 void xc__hypercall_buffer_free(xc_interface *xch, xc_hypercall_buffer_t *b) in xc__hypercall_buffer_free() argument 61 xencall_free_buffer(xch->xcall, b->hbuf); in xc__hypercall_buffer_free() 64 int xc__hypercall_bounce_pre(xc_interface *xch, xc_hypercall_buffer_t *b) in xc__hypercall_bounce_pre() argument 83 p = xc__hypercall_buffer_alloc(xch, b, b->sz); in xc__hypercall_bounce_pre() 107 xc__hypercall_buffer_free(xch, b); in xc__hypercall_bounce_post() 140 void *xc__hypercall_buffer_array_alloc(xc_interface *xch, in xc__hypercall_buffer_array_alloc() argument 151 buf = xc__hypercall_buffer_alloc(xch, hbuf, size); in xc__hypercall_buffer_array_alloc() [all …]
|
A D | xc_vm_event.c | 36 rc = do_domctl(xch, &domctl); in xc_vm_event_control() 42 void *xc_vm_event_enable(xc_interface *xch, uint32_t domain_id, int param, in xc_vm_event_enable() argument 58 rc1 = xc_domain_pause(xch, domain_id); in xc_vm_event_enable() 66 rc1 = xc_hvm_param_get(xch, domain_id, param, &pfn); in xc_vm_event_enable() 75 rc1 = xc_get_pfn_type_batch(xch, domain_id, 1, &mmap_pfn); in xc_vm_event_enable() 79 rc1 = xc_domain_populate_physmap_exact(xch, domain_id, 1, 0, 0, in xc_vm_event_enable() 124 rc1 = xc_vm_event_control(xch, domain_id, op, mode, port); in xc_vm_event_enable() 139 rc2 = xc_domain_unpause(xch, domain_id); in xc_vm_event_enable() 150 xenforeignmemory_unmap(xch->fmem, ring_page, 1); in xc_vm_event_enable() 159 int xc_vm_event_get_version(xc_interface *xch) in xc_vm_event_get_version() argument [all …]
|
/xen/tools/libxc/include/ |
A D | xenctrl.h | 396 int xc_get_max_cpus(xc_interface *xch); 553 int xc_domain_pause(xc_interface *xch, 657 int xc_watchdog(xc_interface *xch, 935 int xc_vcpu_getinfo(xc_interface *xch, 1001 xc_interface *xch, 1007 xc_interface *xch, 1252 int xc_sched_id(xc_interface *xch, 1471 int xc_perfc_query(xc_interface *xch, 1731 xc_interface *xch, 1883 int xc_smt_enable(xc_interface *xch); [all …]
|
A D | xenctrl_compat.h | 27 void *xc_map_foreign_range(xc_interface *xch, uint32_t dom, 31 void *xc_map_foreign_pages(xc_interface *xch, uint32_t dom, int prot, 45 void *xc_map_foreign_bulk(xc_interface *xch, uint32_t dom, int prot, 126 xc_interface *xch, uint32_t domid, int handle_bufioreq, 132 xc_interface *xch, uint32_t domid, ioservid_t id, int is_mmio, 135 xc_interface *xch, uint32_t domid, ioservid_t id, int is_mmio, 144 xc_interface *xch, uint32_t domid, ioservid_t id); 146 xc_interface *xch, uint32_t domid, ioservid_t id, int enabled); 153 xc_interface *xch, uint32_t domid, uint8_t link, uint8_t irq); 162 xc_interface *xch, uint32_t domid, hvmmem_type_t type, [all …]
|
/xen/tools/ocaml/libs/xc/ |
A D | xenctrl_stubs.c | 54 if (xch) { in failwith_xc() 79 if (xch == NULL) in stub_xc_interface_open() 87 CAMLparam1(xch); in stub_xc_interface_close() 260 failwith_xc(_H(xch)); in stub_xc_domain_create() 273 failwith_xc(_H(xch)); in stub_xc_domain_max_vcpus() 588 CAMLparam1(xch); in stub_xc_sched_id() 637 CAMLparam1(xch); in stub_xc_readconsolering() 702 CAMLparam1(xch); in stub_xc_physinfo() 827 CAMLparam1(xch); in stub_xc_version_version() 859 CAMLparam1(xch); in stub_xc_version_compile_info() [all …]
|