public:gpu-passthrough
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:gpu-passthrough [2015/11/11 07:49] – squires | public:gpu-passthrough [2015/11/13 20:29] (current) – [References] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== GPU Passthrough ====== | ====== GPU Passthrough ====== | ||
| - | GPU passthrough refers to configuration | + | GPU passthrough refers to configurations |
| - | This page describes my specific | + | This page first describes |
| + | |||
| + | ====== Information ====== | ||
| + | |||
| + | ===== Hardware Requirements ===== | ||
| + | |||
| + | The focus will be on Intel + NVIDIA systems, because I am unfamiliar with how GPU passthrough works with AMD processors and GPUs. | ||
| + | |||
| + | ==== VT-d ==== | ||
| + | |||
| + | The CPU, motherboard, | ||
| + | |||
| + | ==== IOMMU Groups and ACS ==== | ||
| + | |||
| + | The guest graphics card needs proper IOMMU isolation from other devices on the PCIe bus. It should be alone in its own IOMMU group. This ensures no DMA transfers will occur between devices without being translated by the IOMMU. | ||
| + | |||
| + | If you have a Xeon E5 processor, it will probably support ACS. Your PCIe devices will be isolated in their own IOMMU groups. Some socket 2011 CPUs also support ACS (according to the datasheets). | ||
| + | |||
| + | If your processor doesn' | ||
| + | |||
| + | ++++ iommu_groups.sh | | ||
| + | < | ||
| + | #!/bin/sh | ||
| + | |||
| + | # List the devices in each IOMMU group, from AW at | ||
| + | # https:// | ||
| + | |||
| + | BASE="/ | ||
| + | |||
| + | for i in $(find $BASE -maxdepth 1 -mindepth 1 -type d); do | ||
| + | GROUP=$(basename $i) | ||
| + | echo "### Group $GROUP ###" | ||
| + | for j in $(find $i/devices -type l); do | ||
| + | DEV=$(basename $j) | ||
| + | echo -n " | ||
| + | lspci -s $DEV | ||
| + | done | ||
| + | done | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | If your guest graphics card is not isolated, you can try moving it to a different slot on your motherboard to see if that slot has better isolation. Some slots are connected to the processor PCI lanes, which only have isolation if your processor supports ACS. Other slots are connected to the PCH PCI lanes, which may have isolation on root ports. | ||
| + | |||
| + | If you don't have isolation on any PCI slot and you don't need the devices that share the guest graphics card's IOMMU group, you can bind the extra device to either of the vfio-pci or pci-stub drivers. | ||
| + | |||
| + | As a last resort, you can try using the ACS override kernel patch. However, this does not create isolation. It merely hides the fact that isolation doesn' | ||
| + | ==== Graphics Cards ==== | ||
| + | |||
| + | You must have at least one GPU for the host and one GPU for the guest. | ||
| + | |||
| + | You may use an IGP (CPU integrated graphics) for the host, but you cannot pass it through to the guest. If you use an IGP for the host and a guest graphics card that doesn' | ||
| + | |||
| + | ^ Host Device ^ Guest Device ^ Guest Device UEFI-enabled ^ Result | ||
| + | | GPU | GPU | Yes or No | OK | | ||
| + | | GPU | IGP | Yes or No | Invalid | ||
| + | | IGP | GPU | No | Requires VGA arbitration kernel patch; DRI will be disabled | | ||
| + | | IGP | GPU | Yes | Use OVMF firmware; can still use DRI | | ||
| + | |||
| + | Virtualization is fully supported by NVIDIA Quadro cards. GeForce cards will work, but require that the virtualization be hidden from NVIDIA drivers. | ||
| + | |||
| + | GeForce 600 series cards probably did not ship with a UEFI firmware, but one can be flashed onto them. Check the manufacturer' | ||
| + | |||
| + | ====== Xeon E3-1275 ====== | ||
| ===== Hardware ===== | ===== Hardware ===== | ||
| Line 98: | Line 160: | ||
| ===== Kernel ===== | ===== Kernel ===== | ||
| - | Because the C206 chipset is affected by the Intel root port isolation quirk ([[https:// | + | Because the C206 chipset is affected by the Intel root port isolation quirk ([[https:// |
| - | ===== References ===== | + | If we wanted to use the integrated graphics of the E3-1275, then we would need to either: |
| + | * Use the i914.enable_hd_vgaarb patch (and lose DRI). | ||
| + | * Use a guest GPU that supports UEFI and use the OVMF boot firmware to start the virtual machine. (OVMF can initialize the GPU using legacy-free UEFI, keeping DRI and bypassing VGA and the need for arbitration.) | ||
| + | |||
| + | ====== Core i5-4690K ====== | ||
| + | |||
| + | ===== Hardware ===== | ||
| + | |||
| + | ===== Kernel ===== | ||
| + | |||
| + | ====== References ====== | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | [[http:// | ||
| [[https:// | [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
public/gpu-passthrough.1447228147.txt.gz · Last modified: 2015/11/11 07:49 by squires