<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Hypervisor",
  "identifier" : "/documentation/Hypervisor/hv_vmx_vcpu_read_shadow_vmcs(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Hypervisor"
    ],
    "preciseIdentifier" : "c:@F@hv_vmx_vcpu_read_shadow_vmcs"
  },
  "title" : "hv_vmx_vcpu_read_shadow_vmcs(_:_:_:)"
}
-->

# hv_vmx_vcpu_read_shadow_vmcs(_:_:_:)

Returns the current value of a shadow VMCS field of a vCPU.

```
func hv_vmx_vcpu_read_shadow_vmcs(_ vcpu: hv_vcpuid_t, _ field: UInt32, _ value: UnsafeMutablePointer<UInt64>) -> hv_return_t
```

## Parameters

`vcpu`

The vCPU ID.

`field`

The ID of the shadow VMCS field to read.

`value`

The pointer to the shadow VMCS field value the Hypervisor writes following a successful operation.

## Return Value

[`HV_SUCCESS`](/documentation/Hypervisor/HV_SUCCESS) if the operation was successful, otherwise an error code specified in [`hv_return_t`](/documentation/Hypervisor/hv_return_t).

## Discussion> Important:
> This function must be called by the owning thread.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)