Statement
This document is only for learning and exchange, please do not use for other commercial purposes
Author: Chaoyang _tony
E-mail:linzhaolover@163.com
Create date:2018 Year April 8 20:29:38
Last change:2018 year April 8 20:29:50
Reprint please indicate the source: Http://blog.csdn.net/linzhaolover Summary
A recent need to build an environment requires the physical machine's GPU card to be mapped to the KVM for use. That is, passthrough on the Internet to check the information, finally realized. Mainly add Intel_iommu=on test environment to Grub
Ubuntu 16.04.4 LTS
x86_64
GPU, Tesla K80
find machines first with GPU devices
Viewed by command, my machine currently has 4 GPU devices
Lspci | grep NVIDIA
83:00.0 3D controller:nvidia Corporation GK210GL [Tesla K80] (rev A1)
84:00.0 3D Controller:nvidia C Orporation GK210GL [Tesla K80] (Rev. A1)
87:00.0 3D controller:nvidia Corporation GK210GL [Tesla K80] (Rev. A1)
88: 00.0 3D controller:nvidia Corporation GK210GL [Tesla K80] (rev A1)
Update System Grub
Add intel_iommu=on information to grub, and then execute the update command
Cat/etc/default/grub | grep intel_iommu
grub_cmdline_linux= "Intel_iommu=on"
sudo update-grub
reboot Machine View effect
Reboot
DMESG | grep-e dmar-e iommu DMAR:IOMMU
enabled
After restarting the machine, we found that the IOMMU function has been enabled, and we can add PCI devices to the KVM.
The physical machine does not install NVIDIA drivers, otherwise the driver will bind the PCI device, leading to the KVM partial binding Summary
Have time or to collate their own verified things, convenient for everyone to reference, but also for better expression of information.