---
title: "hv_vmx_read_capability(_:_:)"
framework: hypervisor
role: symbol
role_heading: Function
path: "hypervisor/hv_vmx_read_capability(_:_:)"
---

# hv_vmx_read_capability(_:_:)

Returns, by reference, the VMX virtualization capabilities of the host processor.

## Declaration

```swift
func hv_vmx_read_capability(_ field: hv_vmx_capability_t, _ value: UnsafeMutablePointer<UInt64>) -> hv_return_t
```

## Parameters

- `field`: The capability of the host processor to return. For a list of field IDs, see doc://com.apple.hypervisor/documentation/Hypervisor/hv_vmx_capability_t.
- `value`: The value of the capability field, on output. For a list of possible values, see VMX Capability Field Values.

## Return Value

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

## Discussion

Discussion important: This function must be called by the owning thread.

## See Also

### Capabilities

- [hv_vmx_get_msr_info(_:_:)](hypervisor/hv_vmx_get_msr_info(_:_:).md)
- [hv_vmx_capability_t](hypervisor/hv_vmx_capability_t.md)
- [VMX Capabilities](hypervisor/1469645-vmx-capabilities.md)
- [hv_vmx_msr_info_t](hypervisor/hv_vmx_msr_info_t.md)
- [MSR Information Fields](hypervisor/3567084-msr-information-fields.md)
