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

# hv_gic_set_icv_reg(_:_:_:)

Writes to a generic interrupt controller (GIC) ICV system register.

```
func hv_gic_set_icv_reg(_ vcpu: hv_vcpu_t, _ reg: hv_gic_icv_reg_t, _ value: UInt64) -> hv_return_t
```

## Parameters

`vcpu`

The handle for the vCPU.

`reg`

The enumeration value that represents the ICV system register.

`value`

The GIC ICV register value the framework writes to.

## Return Value

[`HV_SUCCESS`](/documentation/Hypervisor/HV_SUCCESS) on success; otherwise, an error code.

## Discussion

ICV registers are only available when exception level 2 (EL2) is in an enabled state, otherwise the framework returns an error.

> Important:
> Call this method on 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)