Function

hv_vcpu_read_msr(_:_:_:)

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

Declaration

func hv_vcpu_read_msr(_ vcpu: hv_vcpuid_t, _ msr: UInt32, _ value: UnsafeMutablePointer<UInt64>!) -> hv_return_t

Parameters

vcpu

The ID of the vCPU.

msr

The ID of the MSR.

value

On return, this argument is populated with the value read from the MSR.

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)

func hv_vcpu_write_msr(hv_vcpuid_t, UInt32, UInt64) -> hv_return_t

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