PCI Passthrough

ilbarone87

Member
Sep 14, 2022
14
2
8
Hello everyone,
I want to enable PCIe Passthrough for my AMD node, but reading the guides and watching videos have still left me some questions, hope you can help to clear these doubts.

1) process to enable IOMMU
Regarding this in the official documentation it states that "For AMD CPUs it should be enabled automatically" but i can still see around that people tend to add "amd_iommu=on iommu=pt" in their guides. Which step should be considered as source of truth?
Moreover have seen adding the two values sometime in /etc/default/grub or in /etc/kernel/cmdline which of the 2 is the most correct file to edit?

2) current config of my node

Code:
dmesg | grep -e DMAR -e IOMMU -e AMD-Vi
[    0.122127] AMD-Vi: Using global IVHD EFR:0x246577efa2254afa, EFR2:0x0
[    0.421700] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[    0.423945] AMD-Vi: Extended features (0x246577efa2254afa, 0x0): PPR NX GT [5] IA GA PC GA_vAPIC
[    0.423951] AMD-Vi: Interrupt remapping enabled
[    0.443626] AMD-Vi: Virtual APIC enabled
[    0.443814] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).

And also in a VM I can see that all the PCIe devices can be added as RAW device
1727456697790.png

Does this mean that the PCIe passthrough is already enabled or this is a normal behaviour even without enabling IOMMU groups?


Thanks
 
Regarding this in the official documentation it states that "For AMD CPUs it should be enabled automatically" but i can still see around that people tend to add "amd_iommu=on iommu=pt" in their guides. Which step should be considered as source of truth?
You only need to enable it in the motherboard BIOS. on is not even a valid option for amd_iommu: https://www.kernel.org/doc/html/v6.8/admin-guide/kernel-parameters.html (search for amd_iommu= )
Moreover have seen adding the two values sometime in /etc/default/grub or in /etc/kernel/cmdline which of the 2 is the most correct file to edit?
It depends on which boot loader is used by your Proxmox installation: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysboot
View attachment 75354

Does this mean that the PCIe passthrough is already enabled or this is a normal behaviour even without enabling IOMMU groups?
IOMMU is working because there are IOMMU groups with different numbers in the second column.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!