Crate qemu_plugin_sys
source ·Expand description
Low level bindings to the QEMU Plugin API
These bindings are generated from the QEMU source code, and should not be used directly.
Instead, use the qeu-plugin crate.
Structs
- We have to define the
uintmax_t' type usingldiv_t’. - Define ‘max_align_t’ to match the GCC definition.
- struct qemu_info_t - system information for plugins
- @version: minimum and current plugin API level
- @system: information relevant to system emulation
- struct qemu_plugin_hwaddr - opaque hw address handle
- struct qemu_plugin_insn - Opaque handle for a translated instruction
- struct qemu_plugin_tb - Opaque handle for a translation block
Enums
- enum qemu_plugin_cb_flags - type of callback
- enum qemu_plugin_op - describes an inline op
Constants
Functions
- Compute absolute value of N.
- Return the `imaxdiv_t’ representation of the value of NUMER over DENOM.
- qemu_plugin_bool_parse() - parses a boolean argument in the form of “
=[on|yes|true|off|no|false]” - qemu_plugin_end_code() - returns end of text segment
- qemu_plugin_entry_code() - returns start address for module
- qemu_plugin_get_hwaddr() - return handle for memory operation @info: opaque memory info structure @vaddr: the virtual address of the memory operation
- Returns a string representing the device. The string is valid for the lifetime of the plugin.
- qemu_plugin_hwaddr_is_io() - query whether memory operation is IO @haddr: address handle from qemu_plugin_get_hwaddr()
- qemu_plugin_hwaddr_phys_addr() - query physical address for memory operation @haddr: address handle from qemu_plugin_get_hwaddr()
- qemu_plugin_insn_data() - return ptr to instruction data @insn: opaque instruction handle from qemu_plugin_tb_get_insn()
- qemu_plugin_insn_disas() - return disassembly string for instruction @insn: instruction reference
- qemu_plugin_insn_haddr() - return hardware addr of instruction @insn: opaque instruction handle from qemu_plugin_tb_get_insn()
- qemu_plugin_insn_size() - return size of instruction @insn: opaque instruction handle from qemu_plugin_tb_get_insn()
- qemu_plugin_insn_symbol() - best effort symbol lookup @insn: instruction reference
- qemu_plugin_insn_vaddr() - return vaddr of instruction @insn: opaque instruction handle from qemu_plugin_tb_get_insn()
- qemu_plugin_mem_is_big_endian() - was the access big endian @info: opaque memory transaction handle
- qemu_plugin_mem_is_sign_extended() - was the access sign extended @info: opaque memory transaction handle
- qemu_plugin_mem_is_store() - was the access a store @info: opaque memory transaction handle
- qemu_plugin_mem_size_shift() - get size of access @info: opaque memory transaction handle
- returns -1 in user-mode
- returns -1 in user-mode
- qemu_plugin_outs() - output string via QEMU’s logging system @string: a string
- qemu_plugin_path_to_binary() - path to binary file being executed
- qemu_plugin_register_atexit_cb() - register exit callback @id: plugin ID @cb: callback @userdata: user data for callback
- qemu_plugin_register_vcpu_exit_cb() - register a vCPU exit callback @id: plugin ID @cb: callback function
- qemu_plugin_register_vcpu_idle_cb() - register a vCPU idle callback @id: plugin ID @cb: callback function
- qemu_plugin_register_vcpu_init_cb() - register a vCPU initialization callback @id: plugin ID @cb: callback function
- qemu_plugin_register_vcpu_insn_exec_cb() - register insn execution cb @insn: the opaque qemu_plugin_insn handle for an instruction @cb: callback function @flags: does the plugin read or write the CPU’s registers? @userdata: any plugin data to pass to the @cb?
- qemu_plugin_register_vcpu_insn_exec_inline() - insn execution inline op @insn: the opaque qemu_plugin_insn handle for an instruction @op: the type of qemu_plugin_op (e.g. ADD_U64) @ptr: the target memory location for the op @imm: the op data (e.g. 1)
- qemu_plugin_register_vcpu_mem_cb() - register memory access callback @insn: handle for instruction to instrument @cb: callback of type qemu_plugin_vcpu_mem_cb_t @flags: (currently unused) callback flags @rw: monitor reads, writes or both @userdata: opaque pointer for userdata
- qemu_plugin_register_vcpu_mem_inline() - register an inline op to any memory access @insn: handle for instruction to instrument @rw: apply to reads, writes or both @op: the op, of type qemu_plugin_op @ptr: pointer memory for the op @imm: immediate data for @op
- qemu_plugin_register_vcpu_resume_cb() - register a vCPU resume callback @id: plugin ID @cb: callback function
- qemu_plugin_register_vcpu_tb_exec_cb() - register execution callback @tb: the opaque qemu_plugin_tb handle for the translation @cb: callback function @flags: does the plugin read or write the CPU’s registers? @userdata: any plugin data to pass to the @cb?
- qemu_plugin_register_vcpu_tb_exec_inline() - execution inline op @tb: the opaque qemu_plugin_tb handle for the translation @op: the type of qemu_plugin_op (e.g. ADD_U64) @ptr: the target memory location for the op @imm: the op data (e.g. 1)
- qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb @id: plugin ID @cb: callback function
- qemu_plugin_reset() - Reset a plugin @id: this plugin’s opaque ID @cb: callback to be called once the plugin has been reset
- qemu_plugin_start_code() - returns start of text segment
- qemu_plugin_tb_get_insn() - retrieve handle for instruction @tb: opaque handle to TB passed to callback @idx: instruction number, 0 indexed
- qemu_plugin_tb_n_insns() - query helper for number of insns in TB @tb: opaque handle to TB passed to callback
- qemu_plugin_tb_vaddr() - query helper for vaddr of TB start @tb: opaque handle to TB passed to callback
- qemu_plugin_uninstall() - Uninstall a plugin @id: this plugin’s opaque ID @cb: callback to be called once the plugin has been removed
- qemu_plugin_vcpu_for_each() - iterate over the existing vCPU @id: plugin ID @cb: callback function
- Like
strtol' but convert tointmax_t’. - Like
strtoul' but convert touintmax_t’. - Like
wcstol' but convert tointmax_t’. - Like
wcstoul' but convert touintmax_t’.
Type Aliases
- Fixed-size types, underlying types depend on word size and compiler.
- Smallest types with at least a given width.
- These few don’t really vary by system, they always correspond to one of the other defined types.
- C99: An integer type that can be accessed as an atomic entity, even in the presence of asynchronous interrupts. It is not currently necessary for this to be machine-specific.
- Convenience types.
- Signed.
- Signed.
- Largest integral types.
- typedef qemu_plugin_id_t - Unique plugin ID
- typedef qemu_plugin_meminfo_t - opaque memory transaction handle
- typedef qemu_plugin_simple_cb_t - simple callback @id: the unique qemu_plugin_id_t
- typedef qemu_plugin_udata_cb_t - callback with user data @id: the unique qemu_plugin_id_t @userdata: a pointer to some user data supplied when the callback was registered.
- typedef qemu_plugin_vcpu_mem_cb_t - memory callback function type @vcpu_index: the executing vCPU @info: an opaque handle for further queries about the memory @vaddr: the virtual address of the transaction @userdata: any user data attached to the callback
- typedef qemu_plugin_vcpu_simple_cb_t - vcpu callback @id: the unique qemu_plugin_id_t @vcpu_index: the current vcpu context
- typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback @id: unique plugin id @tb: opaque handle used for querying and instrumenting a block.
- typedef qemu_plugin_vcpu_udata_cb_t - vcpu callback @vcpu_index: the current vcpu context @userdata: a pointer to some user data supplied when the callback was registered.
- Unsigned.
- Unsigned.