Problem with amdgpu driver in in appVM (GPU passthrough)

I used this instruction for gpu passthrough: Create a Gaming HVM
Everything seems to work, but amgdpu does not start in the virtual machine.

I want to use this video card in appVM: 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] (rev c0)

appVM “lspci -k”:

...
00:07.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] (rev c0)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel modules: amdgpu

appVM “dmesg | grep amdgpu”:

[    6.859967] [drm] amdgpu kernel modesetting enabled.
[    6.860628] amdgpu: Virtual CRAT table created for CPU
[    6.860661] amdgpu: Topology: Add CPU node
[    6.862521] amdgpu 0000:00:07.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
[    6.863000] amdgpu 0000:00:07.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
[    6.863183] amdgpu 0000:00:07.0: amdgpu: Unable to locate a BIOS ROM
[    6.863203] amdgpu 0000:00:07.0: amdgpu: Fatal error during GPU init
[    6.863222] amdgpu 0000:00:07.0: amdgpu: amdgpu: finishing device.
[    6.863643] amdgpu 0000:00:07.0: probe with driver amdgpu failed with error -22

dom “lspci -k”:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
	Subsystem: Acer Incorporated [ALI] Device 152b
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
	Subsystem: Acer Incorporated [ALI] Device 152b
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pcieport
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pcieport
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pcieport
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
	Subsystem: Acer Incorporated [ALI] Device 152b
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3
	Kernel driver in use: k10temp
	Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] (rev c0)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pciback
	Kernel modules: amdgpu
02:00.0 Non-Volatile memory controller: Micron Technology Inc 2210 NVMe SSD [Cobain] (rev 03)
	Subsystem: Micron Technology Inc Device 1100
	Kernel driver in use: nvme
	Kernel modules: nvme
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pciback
	Kernel modules: r8169
04:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCIe Wireless Network Adapter [Filogic 330]
	Subsystem: Lite-On Communications Inc Device 3802
	Kernel driver in use: pciback
	Kernel modules: mt7921e
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne (rev c2)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
05:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir/Cezanne HDMI/DP Audio Controller
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
05:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir/Cezanne Platform Security Processor
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: ccp
05:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pciback
	Kernel modules: xhci_pci
05:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: pciback
	Kernel modules: xhci_pci
05:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Audio Coprocessor (rev 01)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh, snd_sof_amd_acp63, snd_sof_amd_acp70
05:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
06:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: ahci
06:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
	Subsystem: Acer Incorporated [ALI] Device 152b
	Kernel driver in use: ahci

GRUB configuration on host:

GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-d352c318-2a3b-4f4b-80b3-ba402968228f rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rhgb quiet rd.qubes.hide_pci=01:00.0 amd_iommu=on"

I tried adding a boot option for appVM: pci=nomsi, but it didn’t help.
I also found this post unanswered: AMD passthrough driver not work in appVM

Has anyone had a similar problem?

Did you install the AMD firmware package for your hardware in the appVM?

The appVM needs to have both the driver and firmware installed.

1 Like

Yes, I installed all possible packages. I also tried changing the template from Debian to Fedora.

No idea for you, but some years ago I had the same error message Ryzen 7000 serie , maybe it will give you some ideas. You could try to add the parameter " amdgpu.runpm=0 " but I don’t think it will solve your issue.

1 Like