Skip to main content
Ctrl+K

Level Zero Specification documentation

  • Introduction
  • Core Programming Guide
  • Tools Programming Guide
  • Sysman Programming Guide
  • Runtime Programming Guide
  • SPIR-V Programming Guide
  • Extensions
  • API Documentation
    • Core API
    • Tools API
    • Sysman API
    • Runtime API
  • Versions
  • .rst

PCI Link Speed Downgrade Extension

Contents

  • API
    • PCI Link Speed Downgrade
    • Query PCI Link Speed Downgrade Capability
    • Query PCI Link Speed Downgrade Status
    • Update PCI Link Speed
    • Example Usage

PCI Link Speed Downgrade Extension#

API#

  • Functions

    • zesDevicePciLinkSpeedUpdateExt

  • Enumerations

    • zes_pci_link_speed_downgrade_ext_version_t

  • Structures

    • zes_pci_link_speed_downgrade_ext_state_t

    • zes_pci_link_speed_downgrade_ext_properties_t

PCI Link Speed Downgrade#

This extension provides the ability to query and update PCIe link speed, enabling downgrade or upgrade (restore to its default speed) of the connection between the device and the host.

Query PCI Link Speed Downgrade Capability#

To check if the device supports PCIe link speed downgrade capability, pass zes_pci_link_speed_downgrade_ext_properties_t to zesDevicePciGetProperties as pNext member of zes_pci_properties_t.

Query PCI Link Speed Downgrade Status#

To check the current PCIe downgrade status, pass zes_pci_link_speed_downgrade_ext_state_t to zesDevicePciGetState as pNext member of zes_pci_state_t.

Update PCI Link Speed#

To downgrade or set to the default PCIe link speed, use zesDevicePciLinkSpeedUpdateExt function.

zes_device_action_t pendingAction;
ze_bool_t shouldDowngrade = true;  // true for downgrade

ze_result_t result = zesDevicePciLinkSpeedUpdateExt(hDevice, shouldDowngrade, &pendingAction);

Example Usage#

The following pseudo-code demonstrates an example Usage for managing PCIe link speed:

// Step 1: Check if device supports PCIe link speed update
zes_pci_properties_t pciProperties = {ZES_STRUCTURE_TYPE_PCI_PROPERTIES};
zes_pci_link_speed_downgrade_ext_properties_t extProperties = {ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES};
pciProperties.pNext = &extProperties;

if (zesDevicePciGetProperties(hDevice, &pciProperties) == ZE_RESULT_SUCCESS) {
    if (!extProperties.pciLinkSpeedUpdateCapable) {
        // Device does not support PCIe link speed update
        return;
    }

    printf("Max PCIe Gen Supported: %d\n", extProperties.maxPciGenSupported);
}

// Step 2: Check current downgrade status
zes_pci_state_t pciState = {ZES_STRUCTURE_TYPE_PCI_STATE};
zes_pci_link_speed_downgrade_ext_state_t extState = {ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_STATE};
pciState.pNext = &extState;

if (zesDevicePciGetState(hDevice, &pciState) == ZE_RESULT_SUCCESS) {
    printf("Current downgrade status: %s\n",
           extState.pciLinkSpeedDowngradeStatus ? "Downgraded" : "Normal");
}

// Step 3: Perform downgrade
zes_device_action_t pendingAction;
ze_result_t result = zesDevicePciLinkSpeedUpdateExt(hDevice, true, &pendingAction);

if (result == ZE_RESULT_SUCCESS) {
    printf("PCIe link speed downgrade initiated\n");
    printf("Required action: %d\n", pendingAction);
}
Contents
  • API
    • PCI Link Speed Downgrade
    • Query PCI Link Speed Downgrade Capability
    • Query PCI Link Speed Downgrade Status
    • Update PCI Link Speed
    • Example Usage

By Intel

© Copyright 2025, Intel.