User:Maffblaster/Projects/GPU passthrough

From Gentoo Wiki
Jump to: navigation, search

For many users the single draw back to running Linux continually is gaming. Although the game developer community has made large drives in developing and porting many games to Linux, some games still have no Linux client.

This article exists to help Gentoo users game at full steam (pun intended).

Installation

Kernel

In order for passthrough to operate additional kernel feature support must be enabled.

KERNEL Enable IOMMU hardware and VFIO non-privileged framework support
Device Drivers  --->
   [*] IOMMU Hardware Support  --->
      [*]   AMD IOMMU support
      <*>     AMD IOMMU Version 2 driver
      [*]   Support for Intel IOMMU using DMA Remapping Devices
      [*]     Support for Shared Virtual Memory with Intel IOMMU
      [*]     Enable Intel DMA Remapping Devices by default
      [*]   Support for Interrupt Remapping
   <*> VFIO Non-Privileged userspace driver framework  --->
      [*]   VFIO No-IOMMU support  ----
      <*>   VFIO support for PCI devices
      [*]     VFIO PCI support for VGA devices
      <*>   Mediated device driver framework
      <*>     VFIO driver for Mediated devices

Configuration

modprobe.d

The PCI device IDs that should be passed through to the Windows guest OS should be appended to the kernel command-line.

If vfio support was added as a kernel module, then /etc/modprobe.d/ can be created to define a list of device IDs that should be available to guest OSes. Alternatively it configuration can occur in the bootloader's configuration if the modules have been built-in to the kernel.

Graphics cards will need not only the video related PCI ID, but also their audio counter part. This is the usual case when using HDMI.

See also

  • QEMU — a generic, open source hardware emulator and virtualization suite.

External resources