pub unsafe extern "C" fn qemu_plugin_write_register(
handle: *mut qemu_plugin_register,
buf: *mut GByteArray,
) -> c_intExpand description
qemu_plugin_write_register() - write register for current vCPU
@handle: a @qemu_plugin_reg_handle handle @buf: A GByteArray for the data owned by the plugin
This function is only available in a context that register read access is explicitly requested via the QEMU_PLUGIN_CB_RW_REGS flag, if called inside a callback that can be registered with a qemu_plugin_cb_flags argument. This function can also be used in any callback context that does not use a flags argument, such as in a callback registered with qemu_plugin_register_vcpu_init_cb(), except for callbacks registered with qemu_plugin_register_atexit_cb() and qemu_plugin_register_flush_cb().
The size of @buf must be at least the size of the requested register. Attempting to write a register with @buf smaller than the register size will result in a crash or other undesired behavior.
Returns the number of bytes written. On failure returns 0.