Sets the value of a machine specific register (MSR) of a vCPU.
SDK
- macOS 10.10+
Framework
- Hypervisor
Declaration
func hv_vcpu_write_msr(_ vcpu: hv _vcpuid _t, _ msr: UInt32, _ value: UInt64) -> hv _return _t
Parameters
vcpu
The ID of the vCPU.
msr
The ID of the MSR.
value
The value to be written.
Return Value
HV
if the operation was successful, otherwise an error code specified in hv
.
Discussion
This function must be called by the owning thread.