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

# hv_gic_set_spi(_:_:)

Triggers a shared peripheral interrupt (SPI).

```
func hv_gic_set_spi(_ intid: UInt32, _ level: Bool) -> hv_return_t
```

## Parameters

`intid`

The interrupt number of the SPI.

`level`

The high- or low-level state for the interrupt. Setting the level also causes an edge on the line for an edge triggered interrupt.

## Return Value

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

## Discussion

Setting a level value causes level interrupts. To cause an edge interrupt, call this method with a level of <doc://com.apple.documentation/documentation/Swift/true>. The framework ignores a level of <doc://com.apple.documentation/documentation/Swift/false> for an edge interrupt.

An interrupt identifier outside of [`hv_gic_get_spi_interrupt_range(_:_:)`](/documentation/Hypervisor/hv_gic_get_spi_interrupt_range(_:_:)) or in the message signaled interrupt (MSI) range returns a [`HV_BAD_ARGUMENT`](/documentation/Hypervisor/HV_BAD_ARGUMENT) error code.

---

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)