LMDE7 GPU Passthrough Issues

rbeard.js

Member
Aug 11, 2022
71
2
13
Im trying to pass an AMD Radeon card to my lmde7 vm but Im running into alot of issues.
On lmde6 I was using VirtIO for my vIOMMU and passthrough seemed to work, however, since updating if I use the virtIO drivers I get dropped onto an initramfs prompt so I switched my configuration to use Intel (AMD Compatible)
Unfortunately, this change is forcing me to disable PCIExpress due to this error when booking with it on:
Code:
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset
kvm: -device vfio-pci,host=0000:03:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1: vfio 0000:03:00.1: group 27 used in multiple address spaces
TASK ERROR: start failed: QEMU exited with code 1

I have tried passing the audio device associated with the card as another PCI device but that results in an error complaining that Im passing the same PCI device twice on the same system.
Im pretty certain I have all the basics set like blacklisting drivers and the necessary cmdline flags set.
I think I need the PCIexpress toggle on to get the card to pass correctly though.

Code:
 ls -l /dev/dri/
total 0
drwxr-xr-x  2 root root         80 Oct 16 01:14 by-path
crw-rw----+ 1 root video  226,   0 Oct 16 01:14 card0
crw-rw----+ 1 root render 226, 128 Oct 16 01:14 renderD128

Code:
vainfo
Trying display: wayland
Trying display: x11
error: can't connect to X server!
Trying display: drm
libva info: VA-API version 1.22.0
libva info: User environment variable requested driver 'virtio'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/virtio_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Code:
lspci | grep VGA
00:01.0 VGA compatible controller: Red Hat, Inc. Virtio 1.0 GPU (rev 01)
06:10.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa XT [Radeon PRO WX 3100]
 
I was able to get immou virtio working again by updating the initramfs on the vm itself to include the virtio drivers
Im now able to select PCI device and boot into the VM successfully, YAY

Sadly though Im still not seeing the device working in the VM properly. My vainfo shows the same errors and im also not seeing the device under /dev/dri
 
Some additional info. It looks like the VM/drivers cant access the cards BIOS?


Code:
dmesg | grep amdgpu
[    8.827963] [drm] amdgpu kernel modesetting enabled.
[    8.828441] amdgpu: Virtual CRAT table created for CPU
[    8.828477] amdgpu: Topology: Add CPU node
[    8.828812] amdgpu 0000:01:00.0: Adding to iommu group 10
[    8.838786] amdgpu 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
[    8.843777] amdgpu 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
[    8.846279] amdgpu 0000:01:00.0: amdgpu: Unable to locate a BIOS ROM
[    8.846342] amdgpu 0000:01:00.0: amdgpu: Fatal error during GPU init
[    8.847435] amdgpu 0000:01:00.0: amdgpu: amdgpu: finishing device.
[    8.849185] amdgpu 0000:01:00.0: probe with driver amdgpu failed with error -22

Code:
dmesg | grep amdgpu
[    8.827963] [drm] amdgpu kernel modesetting enabled.
[    8.828441] amdgpu: Virtual CRAT table created for CPU
[    8.828477] amdgpu: Topology: Add CPU node
[    8.828812] amdgpu 0000:01:00.0: Adding to iommu group 10
[    8.838786] amdgpu 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
[    8.843777] amdgpu 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
[    8.846279] amdgpu 0000:01:00.0: amdgpu: Unable to locate a BIOS ROM
[    8.846342] amdgpu 0000:01:00.0: amdgpu: Fatal error during GPU init
[    8.847435] amdgpu 0000:01:00.0: amdgpu: amdgpu: finishing device.
[    8.849185] amdgpu 0000:01:00.0: probe with driver amdgpu failed with error -22