GPU passthrough operation not permitted error

SyntaxError210

New Member
Apr 10, 2021
7
1
3
26
hi, I'm attempting to setup a windows 10 vm with a Radeon pro wx 5100 passed through as the gpu. After following all the steps given in the guide for pci passthrough, I cannot boot the vm after repeatedly getting the error:
Code:
kvm: -device vfio-pci,host=0000:09:00.0,id=hostpci0.0,bus=pci.0,addr=0x10.0,multifunction=on: vfio 0000:09:00.0: failed to setup container for group 39: Failed to set iommu for container: Operation not permitted
TASK ERROR: start failed: QEMU exited with code 1
I am able to boot the vm without the gpu passed through. It's been about three days of searching the web and trying different solutions, and I'm at my wits end.
Here's my grub commandline settings:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_acs_override=downstream,multifunction"
Here's my vm config:
Code:
bios: ovmf
bootdisk: ide0
cores: 2
efidisk0: HDDPool:125/vm-125-disk-1.qcow2,size=128K
hostpci0: 09:00.0;09:00.1,x-vga=on
ide0: HDDPool:125/vm-125-disk-0.qcow2,size=32G
ide2: SSDPool:iso/Windows.iso,media=cdrom
machine: q35
memory: 10144
name: windows-vm
net0: e1000=B6:51:AA:3E:62:FC,bridge=vmbr1,firewall=1,tag=10
numa: 0
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=b0aab691-0b0c-4536-bf8b-14b2dc458f6c
sockets: 2
vmgenid: 2a28f1e4-e48b-42a7-a175-447c8aec33d0
My output to the interrupt remapping test was a bit off and I was unsure so I added the iommu_unsafe_interrupts.conf file. This was the output of the remapping test:
Code:
[    0.605574] DMAR-IR: This system BIOS has enabled interrupt remapping
               interrupt remapping is being disabled.  Please
[  314.626088] vfio_iommu_type1_attach_group: No interrupt remapping support.  Use the module param "allow_unsafe_interrupts" to enable VFIO IOMMU support on this platform
So I have blacklist.conf, iommu_unsafe_interrupts.conf, pve-blacklist.conf, and vfio.conf in my modprobe.d directory and this is my vfio.conf file:
Code:
options vfio-pci ids=1002:67c7,1002:aaf0
let me know if there's anything else needed. I really hope I'm missing something obvious.
 
I'm using an HP Proliant d360 G7.
So the directory where I should edit the kernel parameters is /proc/cmdline?
Also this is the output of of that command:
Code:
BOOT_IMAGE=/boot/vmlinuz-5.4.34-1-pve root=/dev/mapper/pve-root ro quiet intel_iommu=on pcie_acs_override=downstream,multifunction
I assumed that I should use grub because there was no cmdline directory in /etc/kernel/ and that's what the guide said to determine which one to use.
 
So I just read that post and now realize my problem. I've spent three days on this just to find out that hp sucks. It's a good thing we have other servers. Thanks anyways.
 
I just wanted to check if you were editing the right place for the kernel parameters, which your are because we see the changes you made to /etc/default/grub are visible in /proc/cmdline. Please try adding vfio_iommu_type1.allow_unsafe_interrupts=1 to your 'grub commandline settings' in /etc/default/grub, as the system error message suggests. If that does not help and there is no BIOS update available from HP, then I don't know how to fix this.
Or did you put options vfio_iommu_type1 allow_unsafe_interrupts=1 inside /etc/modprobe.d/iommu_unsafe_interrupts.conf and run update-initramfs -u && update-grub before rebooting? You appear to be hinting to this in your first message, but it is not clear to me if you actually did do all of those steps.
 

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!