TEE侧机密虚机支持PCIe设备直通,包括网卡、磁盘、GPU卡等设备。本章节主要介绍如何使能IO设备直通机密虚机,实现IO性能大幅提升。
vim /boot/efi/EFI/openEuler/grub.cfg
virtcca_cvm_host=1 arm_smmu_v3.disable_ecmdq=1 vfio_pci.disable_idle_d3=1
make menuconfig
make Image -j64
lspci -tv
该案例中domain为0000,BDF为17:00.0。
<devices> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x17' slot='0x00' function='0x0'/> </source> </hostdev> </devices>
lspci -tv