guest_cpu_read()

Read data from a vCPU

Synopsis:

#include <qvm/guest.h>
int guest_cpu_read(struct guest_cpu *gcp,
                   unsigned flags,
                   const struct qvm_state_block *blk,
                   unsigned nblks,
                   void *data,
                   unsigned data_len)

Arguments:

gcp
A pointer to the source vCPU.
flags
GXF_* flags flags.
blk
An array of qvm_state_block of source information.
nblks
The number of blocks in the array referenced by blk.
data
A pointer to where the data is to be placed.
data_len
The length, in bytes, of the destination buffer.

Library:

Provided by qvm; no external library is required.

Description:

This function is typically used by the vdev's vwrite() callback.

Returns:

EOK if successful; otherwise, an error code.