Transitional Device
A transitional device is a virtio device which supports drivers conforming to virtio specification 1.x and legacy drivers operating under virtio specification 0.95 (i.e., legacy mode) so servers with old Linux kernels can still utilize virtio-based technology.
Currently, only transitional VF device is supported.
Host kernel version must be newer than v6.9.
When using this feature, vfe-vdpa-dpdk solutions cannot be used anymore, including vfe-vdpa-dpdk live migration.
Libvirt does not support the virtio_vfio_pci kernel driver. Use the QEMU command line to start the VM instead.
Configure virtio-net SR-IOV. R efer to "Virtio-net Deployment" for details.
Modify configuration file to add the "lm_prov": "kernel" option.
[dpu]# cat /opt/mellanox/mlnx_virtnet/virtnet.conf { ... "lm_prov": "kernel", ... }
Restart the virtio-net controller for the configuration to take effect:
[dpu]# systemctl restart virtio-net-controller.service
Create virtio-net VF devices on the host:
[host]# modprobe -v virtio_pci [host]# modprobe -v virtio_net [host]# echo <vf_num> > /sys/bus/pci/devices/<pf_bdf>/sriov_numvfs
Bind the VF devices with the virtio_vfio_pci kernel driver:
[host]# echo <vf_bdf> > /sys/bus/pci/devices/<vf_bdf>/driver/unbind [host]# echo 0x1af4 0x1041 > /sys/bus/pci/drivers/virtio_vfio_pci/new_id [host]# modprobe -v virtio_vfio_pci [host]# lspci -s <vf_bdf> -vvv | grep -i virtio_vfio_pci Kernel driver in use: virtio_vfio_pci
Add the following option into the QEMU cmdline to passthrough the VF device into the VM:
-device vfio-pci,host=<vf_bdf>,id=hostdev0,bus=pci.<#BUS_IN_VM>,addr=<#FUNC_IN_VM>
Load virtio-net driver as legacy mode inside the VM:
[vm]# modprobe -v virtio_pci force_legacy=1 [vm]# modprobe -v virtio_net [vm]# lspci -s <vf_bdf_in_vm> -n 00:0a.0 0200: 1af4:1000
Verify that the VF is a transitional device:
[dpu]# virtnet query -p <pf_id> -v <vf_id> | grep transitional "transitional": 1,