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

# hv_vm_config_get_el2_enabled(_:_:)

Return a status value that indicates whether the VM configuration enables support for Exception Level 2 (EL2).

```
func hv_vm_config_get_el2_enabled(_ config: hv_vm_config_t, _ el2_enabled: UnsafeMutablePointer<Bool>) -> hv_return_t
```

## Parameters

`config`

The VM’s configuration object.

`el2_enabled`

A pointer to a Boolean value that indicates whether the current platform supports EL2. The framework writes this value on success; otherwise `nil`.

## 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

---

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)