guest_cpu_to_vrs()

Convert an error from a vCPU read or a vCPU write into a vdev return status value

Synopsis:

#include <qvm/vdev-core.h>
static vdev_ref_status_t guest_cpu_to_vrs(int errcode)

Arguments:

errcode
A value returned by a vCPU read or a vCPU write.

Description:

This function converts an error from a guest_cpu_read() or guest_cpu_write() function call into a vdev_ref_status_t value.

It is assumed that the returned value is an error.

Returns:

VRS_BUS_ERROR if errcode is -1; otherwise, VRS_ERRNO and the errcode value.

Page updated: