# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial universe deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the sof 大专栏基于SR-IOV的IO虚拟化技术tware. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://security.ubuntu.com/ubuntu xenial-security main restricted deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://security.ubuntu.com/ubuntu xenial-security universe deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://security.ubuntu.com/ubuntu xenial-security multiverse deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
The patch is located in the SRC_DIR/MxGPU-Virtualization/patch directory.
1 2 3 4 5 6
cd linux-4.4.0 && make oldconfig && make menuconfig
patch < ../MxGPU-Virtualization/patch/0001-Added-legacy-endpoint-type-to-sriov-for-ubuntu-4.4.0-75-generic.diff File to patch: ./drivers/pci/iov.c patch < ../MxGPU-Virtualization/patch/0002-add-pci-io-access-cap-for-ubuntu-4.4.0-75-generic.diff File to patch: ./drivers/vfio/pci/vfio_pci_config.c
Kernel compilation
make -j deb-pkg LOCALVERSION=-vm-firepro
Kernel installation
1 2
cd .. dpkg -i *.deb
GRUB and BLACKLIST preparation
GRUB
1 2 3 4 5 6 7 8
vim /etc/default/grub --- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on" --- Check if IOMMU is supported after rebooting the system. Command is as follows: dmesg | grep -e DMAR -e IOMMU You should be able to see something like the following:DMAR: IOMMU enabled
Blacklist amdgpu and amdkfd
adding the following line to the end of file
1 2 3 4 5
vi /etc/modprobe.d/blacklist.conf --- blacklist amdgpu blacklist amdkfd ---
gim module compilation
Compile gim module
cd MxGPU-Virtualization && make && make install
Use gim module
1 2 3 4 5 6 7 8 9 10 11
modprobe gim modprobe -r gim vi /etc/gim_config ---- ... vf_num=16 # This is going to activate the 16 cores of the GPU ... ---- modprobe gim dmesg # Finally, we need to check that the gim module has successfully been loaded, without errors lspci -vvv # We can now see that the FirePro S7150 has all the 16 cores activated