<hostdev>

Passes host-attached devices to a virtual server.

Ensure that the device that is passed through to the virtual server is not in use by the host. The virtualization of the pass-through device can be SCSI-based or it can be based on the VFIO framework.

Text content

None.

Selected attributes

mode="subsystem"
Specifies the pass-through mode. Other relevant tributes depend on the specified type.
type="scsi"
Specifies SCSI as the type of device that is assigned to a virtual server.
rawio=no| yes
Indicates whether the device needs raw I/O capability. If any device in a device configuration-XML file is specified in raw I/O mode, this capability is enabled for all such devices of the virtual server.
sgio=filtered | unfiltered
Indicates whether the kernel filters unprivileged SG_IO commands for the device.
type="pci"
Specifies PCI as the type of device that is assigned to a virtual server.
managed=yes | no
For managed="yes", automatically handles the host setup of the PCI device. When the virtual server is started or the device is hotplugged to a running virtual server, the device is detached from the host and assigned to the virtual server. When the virtual server is stopped or detaches the device, it is returned to the host.
type="mdev"
Specifies a VFIO mediated device as the type of device that is assigned to a virtual server.
model=vfio-ccw | vfio-ap
Specifies the device driver that controls the host resource that the mediated device represents. For a pass-through DASD, the value is vfio-ccw, and for pass-through cryptographic adapter resources the value is vfio-ap.

Usage

Parent elements

<devices>

Child elements

Example

<devices>
   <controller type="scsi" model="virtio-scsi" index="0"/>
   <hostdev mode="subsystem" type="scsi">
      <source>
        <adapter name="scsi_host0"/>
        <address bus="0" target="0" unit="0"/>
      </source>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </hostdev>
 </devices>