Making devices available to Linux

6.10 LPAR mode

Devices must be configured on the hardware and in Linux® before they can be used.

Defining devices to an LPAR

Typical IBM Z® and IBM® LinuxONE systems run numerous operating system instances in parallel and connect to a considerable number of storage, network, and other peripheral devices. In this environment, device access must be controlled.

  • Workload isolation demands selective and controlled device access.
  • Operating systems expend cycles, time, and memory to manage each device. For example, on Linux, udev creates structures for each registered device.

Data centers with discrete host systems can use physical cabling between hosts and peripheral devices to manage device access. On IBM Z and IBM LinuxONE systems with their logical partitions (LPARs), much of this cabling would need to be within the hardware system itself.

Instead of cables, a hardware configuration controls which LPAR has access to which I/O device. The hardware configuration is specified in an input/output configuration data set (IOCDS). Traditionally, IOCDSs are created with the hardware configuration definition (HCD) program.

DPM: The IBM Z or IBM LinuxONE firmware automatically processes the device-configuration data you provide on the HMC interface, and creates and activates a corresponding IOCDS for you.

Controlling device availability on Linux

The hardware configuration already limits the I/O devices that are available to a Linux instance. The cio_ignore feature provides another control point on Linux. With cio_ignore, you can create and maintain a list of devices to be ignored by Linux.
DPM: If cio_ignore is active, the list of devices to be ignored by Linux is automatically adjusted, at boot-time, to accommodate all devices that are configured on the HMC interface. If available to the hardware, these devices become available to Linux and are set online.

To enforce the current cio_ignore list, you can use the rd.zdev=no-auto kernel parameter to disregard auto-configuration for devices on Linux. This parameter also affects the initial online state of PCIe devices and cryptographic devices, see rd.zdev=no-auto - Override initial device availability for DPM mode.

Configuring devices on Linux

On a running Linux instance, you can use the chzdev command to configure individual devices. With the lszdev command you can display the device settings. These tools distinguish different types of configurations.
Active configuration
The current configuration, which might include settings that do not persist across reboots.
Persistent configuration
The configuration to be applied when the Linux instance is booted.
DPM only: Auto-configuration
The configuration as specified on the HMC interface.

chzdev provides a richer set of configuration options than the HMC interface. The active and persistent settings are often a fine-tuned version of the auto-configuration.

Overriding the auto-configuration

You can override the auto-configuration for a device with a persistent configuration.

For devices that come online early in the boot process, use the zdev:early device attribute to ensure that this persistent configuration is available at this early stage.