Function

hv_vcpu_write_msr

Sets the value of a machine specific register (MSR) of a vCPU.

Declaration

hv_return_t hv_vcpu_write_msr(hv_vcpuid_t vcpu, uint32_t msr, uint64_t value);

Parameters

vcpu

The ID of the vCPU.

msr

The ID of the MSR.

value

The value to be written.

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 Machine Specific Registers (MSRs)

hv_vcpu_read_msr

Returns, by reference, the current value of a machine specific register (MSR) of a vCPU.