How to passthrough a GPU device with two functions ?

asked 2020-06-05 00:35:38 -0500

SCN gravatar image

We have a GPU device with two functions on a ubuntu 16.04 hypervisor :

$ lspci -vt
     +-[0000:80]-+-00.0-[81]--
     |           +-01.0-[82]--
     |           +-02.0-[83]--+-00.0  Xilinx Corporation Device 5020
     |           |            \-00.1  Xilinx Corporation Device 5021
$ lspci -nn |grep -i xili
    83:00.0 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5020]
    83:00.1 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5021]

IOMMU groups on the hypervisor:

IOMMU Group 57 83:00.0 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5020]
IOMMU Group 58 83:00.1 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5021]

When we passthrough this device to VM on openstack rocky the device looks as two devices:

$ lspci -nn |grep -i xili
    0:5.0 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5020]
    0:6.0 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5021]

We are using two aliases to passthrough which is resulting in this situation. Is there a way to passthrough this device as a single device with two functions similar to what is seen on the hypervisor ?

edit retag flag offensive close merge delete