Function

hv_vcpu_write_register

Sets the value of an architectural x86 register of a vCPU.

Declaration

hv_return_t hv_vcpu_write_register(hv_vcpuid_t vcpu, hv_x86_reg_t reg, uint64_t value);

Parameters

vcpu

The ID of the vCPU.

reg

The ID of the register to be written to. For possible values, see hv_x86_reg_t.

value

The value to be written to the specified register.

Return Value

HV_SUCCESS if the operation was successful, otherwise an error code specified in hv_return_t.

Discussion

This function must be called by the owning thread.

See Also

Accessing Registers

hv_vcpu_read_register

Returns, by reference, the current value of an architectural x86 register of a vCPU.