This feature could support booting from vfio-ccw dasd devices. It is enabled in our SLE12SP5, SLE15SP1 and SLES15SP2
This feature is actually using a real dasd for ipl device based on vfio-ccw bus. So it is not like using a vfio-cow qcow2 or just use this dasd device as a storage block.
1.HOST Preparation
Make sure HOST enabled below configuration:
CONFIG_S390_CCW_IOMMU=y CONFIG_VFIO=m CONFIG_VFIO_MDEV=m CONFIG_VFIO_MDEV_DEVICE=m CONFIG_VFIO_CCW=m
2. Make sure the Host has an extra active DASD device for passthrough
2.1 check dasd devices
# lsdasd -a Bus-ID Status Name Device Type BlkSz Size Blocks ============================================================================== 0.0.6000 active dasda 94:0 ECKD 4096 7043MB 1803060 0.0.6001 active dasdb 94:4 ECKD 4096 7043MB 1803060 0.0.6002 active dasdc 94:8 ECKD 4096 7043MB 1803060
2.2 Active DASD
For example, for device 0.0.6001, issue:
# chccwdev -e 0.0.6001 WARNING: Device[0.0.6001] is already online Done
2.3 Format the DASD
# dasdfmt -b 4096 /dev/disk/by-path/ccw-0.0.6001 -p
3. Seprate DASD as a MDEV device
3.1 Unbind dasd device and its sub channel
3.1.1 unbind the CCW device from its subchannel
#echo 0.0.6003 > /sys/bus/ccw/devices/0.0.6003/driver/unbind
3.1.2 unbind the subchannel from the I/O subchannel driver
#echo 0.0.023f > /sys/bus/css/devices/0.0.023f/driver/unbind
3.2 Bind the subchannel to vfio_ccw driver
#echo 0.0.023f > /sys/bus/css/drivers/vfio_ccw/bind
3.3 Create a Mediated Device(mdev) for the physical device with vfio_ccw driver
#uuidgen 08e8c006-146d-48d3-b21a-c005f9d3a04b #echo "08e8c006-146d-48d3-b21a-c005f9d3a04b" > \ /sys/bus/css/devices/0.0.023f/mdev_supported_types/vfio_ccw-io/create
4. passthrough mdev to vm
<hostdev mode='subsystem' type='mdev' model='vfio-ccw'> <source> <address uuid='08e8c006-146d-48d3-b21a-c005f9d3a04b'/> </source> <boot order='1'/> </hostdev> </devices>
5 Current s390 bios has some issue, it needs extra xml:
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"> <qemu:commandline> <qemu:arg value="-global"/> <qemu:arg value="vfio-ccw.force-orb-pfch=yes"/> </qemu:commandline>
6. start Guest and check with mdev
Confirm the DASD/ECKD as a Subchannel-attached device on guest system(verify e.g via lscss tool)
For example:
# lscss Device Subchan. DevType CU Type Use PIM PAM POM CHPIDs ---------------------------------------------------------------------- 0.0.0002 0.0.0003 0000/00 3832/05 yes 80 80 ff 00000000 00000000