qemu_plugin_read_memory_hwaddr

Function qemu_plugin_read_memory_hwaddr 

Source
pub unsafe extern "C" fn qemu_plugin_read_memory_hwaddr(
    addr: u64,
    data: *mut GByteArray,
    len: usize,
) -> qemu_plugin_hwaddr_operation_result
Expand description

qemu_plugin_read_memory_hwaddr() - read from memory using a hardware address

@addr: The physical address to read from @data: A byte array to store data into @len: The number of bytes to read, starting from @addr

@len bytes of data is read from the current memory space for the current vCPU starting at @addr and stored into @data. If @data is not large enough to hold @len bytes, it will be expanded to the necessary size, reallocating if necessary. @len must be greater than 0.

This function does not ensure writes are flushed prior to reading, so callers should take care when calling this function in plugin callbacks to avoid attempting to read data which may not yet be written and should use the memory callback API instead.

This function is only valid for softmmu targets.

Returns a qemu_plugin_hwaddr_operation_result indicating the result of the operation.