User Tools

Site Tools


ubuntu:gpu:gpu_pass-through

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ubuntu:gpu:gpu_pass-through [2023/06/25 11:13] – created peterubuntu:gpu:gpu_pass-through [2023/06/25 11:32] (current) peter
Line 5: Line 5:
 ---- ----
  
-===== Verify the host environment supports GPU pass-through =====+[[Ubuntu:GPU:GPU pass-through:Configuring the host|Configuring the host]]
  
-TODO:+[[Ubuntu:GPU:GPU pass-through:Configuring the guest|Configuring the guest]]
  
- 
----- 
- 
-===== Enable IOMMU ===== 
- 
-**IOMMU** is usually disabled by default. 
- 
-  * It needs to be enable at boot time in the **/etc/default/grub** configuration file. 
- 
-For AMD-based hosts: 
- 
-<file bash /etc/default/grub> 
-GRUB_CMDLINE_LINUX="iommu=pt amd_iommu=on rd.driver.pre=vfio-pci" 
-</file> 
- 
-For Intel-based hosts: 
- 
-<file bash /etc/default/grub> 
-GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt rd.driver.pre=vfio-pci" 
-</file> 
- 
----- 
- 
-===== Re-generate the main GRUB 2 configuration file ===== 
- 
-The GRUB 2 configuration file is **/boot/grub2/grub.cfg**. 
- 
-<code bash> 
-sudo grub2-mkconfig -o /boot/grub2/grub.cfg 
-</code> 
- 
----- 
- 
-===== Reboot ===== 
- 
- 
----- 
- 
-===== Verify that IOMMU is enabled ===== 
- 
-<code bash> 
-sudo dmesg | grep -e DMAR -e IOMMU 
-</code> 
- 
-returns: 
- 
-<code bash> 
-[    2.172228] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported 
-[    2.176588] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40 
-[    2.176924] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). 
-[    3.875165] AMD-Vi: AMD IOMMUv2 loaded and initialized 
-</code> 
- 
----- 
  
ubuntu/gpu/gpu_pass-through.1687691591.txt.gz · Last modified: 2023/06/25 11:13 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki