Jump to content

Ryzen 7000 iGPU passthrough to VM


Recommended Posts

I've been attempting to do the same for the 7950x iGPU. I've been able to pass through the Radeon RX 6800 XT and RX 7900 XT GPUs, but I haven't had any luck or found any specific info on the Ryzen 7000 iGPUs.

 

I've added the GPU and audio device to a Windows 11 VM and adjusted the XML so they're on the same bus and slot as a multfunction device. If I remote into the VM, I can see the GPU with a code 43 error. I was able to workaround this same error by using a vBIOS rom for the 7900 XT. I tried exporting the 7950x iGPU vBIOS with GPU-Z, but just got an error message: "BIOS reading not supported on this device". I'm not sure if this is an issue with the iGPU or GPU-Z. I also couldn't find a vBIOS online anywhere.

 

My other thought was maybe besides the VGA and audio devices, it may require the other three devices on the same bus and slot:

 

Encryption controller: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP

USB controller: Advanced Micro Devices, Inc. [AMD] Device 15b6

USB controller: Advanced Micro Devices, Inc. [AMD] Device 15b7

 

I tried adding the encryption controller, but it just shows up as not having a driver (and it won't let me install the AMD chipset drivers in a VM). I didn't try the USB controllers as well. The second controller actually has my UnRAID flash drive, so I'd have to find another USB port on an unused controller to be able to add it.

Link to comment
  • 1 month later...
  • 3 months later...

Hello,

 

I have 'error code 43' after trying to passthrought the ryzen 7000 igpu. 

 

somebody managed to make it work?

 

or at lease somebody can please confirm we need the igpu vbios?

 

making it visible to vm was pretty standard, i needed to use zen kernel and add extra kernel parameters for it to be in seperate iommu group

 


 

pcie_acs_override=downstream,multifunction

 

╰─>$ cat /etc/default/grub

 

GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1 video=efifb:off amd_iommu=on iommu=pt loglevel=3 vfio-pci.ids=1002:164e,1002:1640 pcie_acs_override=downstream,multifunction"

 

 

i'm unable to make igpu vrom read using the method

 


mm@desktop: /sys/bus/pci/devices/0000:0f:00.0 $ sudo echo 1 >rom bash: rom: Permission denied

 

2023-09-02-09-17.png

 


─>$ sudo cat /proc/iomem 00000000-00000fff : Reserved 00001000-0009ffff : System RAM 000a0000-000fffff : Reserved 000a0000-000dffff : PCI Bus 0000:00 000f0000-000fffff : System ROM 00100000-09afefff : System RAM 09aff000-09ffffff : Reserved 0a000000-0a1fffff : System RAM 0a200000-0a20ffff : ACPI Non-volatile Storage 0a210000-0affffff : System RAM 0b000000-0b020fff : Reserved 0b021000-586f5017 : System RAM 24e00000-25ffffff : Kernel code 26000000-26c55fff : Kernel rodata 26e00000-270171bf : Kernel data 27871000-27bfffff : Kernel bss 586f5018-58719657 : System RAM 58719658-66edb017 : System RAM 66edb018-66ee5e57 : System RAM 66ee5e58-6914ffff : System RAM 69150000-69150fff : Reserved 69151000-6d67efff : System RAM 6d67f000-7367efff : Reserved 7367f000-7567efff : ACPI Tables 7567f000-7767efff : ACPI Non-volatile Storage 7767f000-797fefff : Reserved 797ff000-7bffafff : System RAM 7bffb000-7cffffff : Reserved 7d7f3000-7fffffff : Reserved 80000000-fec02fff : PCI Bus 0000:00 b0000000-c1ffffff : PCI Bus 0000:01 b0000000-bfffffff : 0000:01:00.0 c0000000-c1ffffff : 0000:01:00.0 d0000000-e01fffff : PCI Bus 0000:0f d0000000-dfffffff : 0000:0f:00.0 e0000000-e01fffff : 0000:0f:00.0 f0000000-f7ffffff : PCI MMCONFIG 0000 [bus 00-7f] f0000000-f7ffffff : pnp 00:00 fb000000-fc0fffff : PCI Bus 0000:01 fb000000-fbffffff : 0000:01:00.0 fb000000-fbffffff : nvidia fc000000-fc07ffff : 0000:01:00.0 fc080000-fc083fff : 0000:01:00.1 fc080000-fc083fff : ICH HD audio fc200000-fc6fffff : PCI Bus 0000:03 fc200000-fc6fffff : PCI Bus 0000:04 fc200000-fc3fffff : PCI Bus 0000:07 fc200000-fc2fffff : 0000:07:00.0 fc200000-fc2fffff : 0000:07:00.0 fc300000-fc307fff : 0000:07:00.0 fc400000-fc4fffff : PCI Bus 0000:0e fc400000-fc47ffff : 0000:0e:00.0 fc480000-fc4803ff : 0000:0e:00.0 fc480000-fc4803ff : ahci fc500000-fc5fffff : PCI Bus 0000:0d fc500000-fc507fff : 0000:0d:00.0 fc500000-fc507fff : xhci-hcd fc600000-fc6fffff : PCI Bus 0000:08 fc600000-fc60ffff : 0000:08:00.0 fc600000-fc60ffff : r8169 fc610000-fc613fff : 0000:08:00.0 fc700000-fcafffff : PCI Bus 0000:0f fc700000-fc7fffff : 0000:0f:00.4 fc700000-fc7fffff : xhci-hcd fc800000-fc8fffff : 0000:0f:00.3 fc800000-fc8fffff : xhci-hcd fc900000-fc9fffff : 0000:0f:00.2 fc900000-fc9fffff : ccp fca00000-fca7ffff : 0000:0f:00.0 fca80000-fca87fff : 0000:0f:00.6 fca80000-fca87fff : ICH HD audio fca88000-fca8bfff : 0000:0f:00.1 fca8c000-fca8dfff : 0000:0f:00.2 fca8c000-fca8dfff : ccp fcb00000-fcbfffff : PCI Bus 0000:10 fcb00000-fcbfffff : 0000:10:00.0 fcb00000-fcbfffff : xhci-hcd fcc00000-fccfffff : PCI Bus 0000:02 fcc00000-fcc03fff : 0000:02:00.0 fcc00000-fcc03fff : nvme fd600000-fd67ffff : amd_iommu feb00000-feb00007 : SB800 TCO fec00000-fec003ff : IOAPIC 0 fec01000-fec013ff : IOAPIC 1 fec10000-fec10fff : pnp 00:04 fec30000-fec30fff : AMDIF031:00 fec30000-fec30fff : AMDIF031:00 AMDIF031:00 fed00000-fed003ff : HPET 0 fed00000-fed003ff : PNP0103:00 fed81500-fed818ff : AMDI0030:00 fed81500-fed818ff : AMDI0030:00 AMDI0030:00 fedc0000-fedc0fff : pnp 00:04 fee00000-ffffffff : PCI Bus 0000:00 fee00000-fee00fff : Local APIC fee00000-fee00fff : Reserved fee00000-fee00fff : pnp 00:04 ff000000-ffffffff : pnp 00:04 100000000-877ffffff : System RAM 878000000-87bffffff : Reserved 878000000-87bffffff : pnp 00:01 87ef40000-87fffffff : Reserved fd00000000-ffffffffff : Reserved

 

 

 

 

 


mm@desktop: ~ $ for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do echo "IOMMU Group ${g##*/}:"; for d in $g/devices/*; do echo -e "\t$(lspci -nns ${d##*/})"; done; done; IOMMU Group 0: 00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da] IOMMU Group 1: 00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14db] IOMMU Group 2: 00:01.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14db] IOMMU Group 3: 00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da] IOMMU Group 4: 00:02.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14db] IOMMU Group 5: 00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da] IOMMU Group 6: 00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da] IOMMU Group 7: 00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14da] IOMMU Group 8: 00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14dd] IOMMU Group 9: 00:08.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:14dd] IOMMU Group 10: 00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 71) 00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51) IOMMU Group 11: 00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e0] 00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e1] 00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e2] 00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e3] 00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e4] 00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e5] 00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e6] 00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:14e7] IOMMU Group 12: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [RTX A2000] [10de:2531] (rev a1) IOMMU Group 13: 01:00.1 Audio device [0403]: NVIDIA Corporation GA106 High Definition Audio Controller [10de:228e] (rev a1) IOMMU Group 14: 02:00.0 Non-Volatile memory controller [0108]: Kingston Technology Company, Inc. Device [2646:5017] (rev 03) IOMMU Group 15: 03:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f4] (rev 01) IOMMU Group 16: 04:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 17: 04:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 18: 04:02.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 19: 04:03.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 20: 04:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 21: 04:05.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 22: 04:06.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 23: 04:08.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 24: 04:0c.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 25: 04:0d.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f5] (rev 01) IOMMU Group 26: 07:00.0 Network controller [0280]: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter [14c3:0616] IOMMU Group 27: 08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05) IOMMU Group 28: 0d:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f7] (rev 01) IOMMU Group 29: 0e:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f6] (rev 01) IOMMU Group 30: 0f:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c3) IOMMU Group 31: 0f:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller [1002:1640] IOMMU Group 32: 0f:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP [1022:1649] IOMMU Group 33: 0f:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15b6] IOMMU Group 34: 0f:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15b7] IOMMU Group 35: 0f:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller [1022:15e3] IOMMU Group 36: 10:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15b8]

 


╰─>$ inxi -F System: Host: desktop Kernel: 6.4.12-arch1-1 arch: x86_64 bits: 64 Desktop: KDE Plasma v: 5.27.7 Distro: Arch Linux Machine: Type: Desktop Mobo: ASRock model: B650M-HDV/M.2 serial: <superuser required> UEFI: American Megatrends LLC. v: 1.28 date: 07/28/2023 CPU: Info: 8-core model: AMD Ryzen 7 7700X bits: 64 type: MT MCP cache: L2: 8 MiB Speed (MHz): avg: 3117 min/max: 3000/5572 cores: 1: 2774 2: 2825 3: 3000 4: 3668 5: 3000 6: 2796 7: 2880 8: 4399 9: 3000 10: 3000 11: 2878 12: 3000 13: 3000 14: 3000 15: 2818 16: 3835 Graphics: Device-1: NVIDIA GA106 [RTX A2000] driver: nvidia v: 535.104.05 Device-2: AMD Raphael driver: vfio-pci v: N/A Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.2.0 driver: X: loaded: nvidia gpu: nvidia,nvidia-nvswitch resolution: 1: 2560x1440~65Hz 2: 3440x1440 API: OpenGL v: 4.6.0 NVIDIA 535.104.05 renderer: NVIDIA RTX A2000/PCIe/SSE2 Audio: Device-1: NVIDIA GA106 High Definition Audio driver: snd_hda_intel Device-2: AMD Rembrandt Radeon High Definition Audio driver: vfio-pci Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel API: ALSA v: k6.4.12-arch1-1 status: kernel-api Server-1: PipeWire v: 0.3.79 status: active Network: Device-1: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter driver: mt7921e IF: wlp7s0 state: down mac: x Device-2: Realtek RTL8125 2.5GbE driver: r8169 IF: enp8s0 state: up speed: 100 Mbps duplex: full mac: x IF-ID-1: virbr0 state: up speed: 10000 Mbps duplex: unknown mac: x IF-ID-2: vnet2 state: unknown speed: 10000 Mbps duplex: full mac:x Bluetooth: Device-1: Foxconn / Hon Hai Wireless_Device driver: btusb type: USB Report: btmgmt ID: hci0 state: up address: x bt-v: 5.2 Drives: Local Storage: total: 4.78 TiB used: 772.57 GiB (15.8%) ID-1: /dev/nvme0n1 vendor: Kingston model: SNV2S2000G size: 1.82 TiB ID-2: /dev/sda vendor: Western Digital model: WD30EZRX-00DC0B0 size: 2.73 TiB ID-3: /dev/sdb vendor: SanDisk model: USB 3.2Gen1 size: 232.88 GiB type: USB Partition: ID-1: / size: 261.25 GiB used: 64.06 GiB (24.5%) fs: ext4 dev: /dev/nvme0n1p3 ID-2: /boot/efi size: 475.1 MiB used: 31.7 MiB (6.7%) fs: vfat dev: /dev/nvme0n1p1 Swap: ID-1: swap-1 type: partition size: 35.39 GiB used: 512 KiB (0.0%) dev: /dev/nvme0n1p2 Sensors: System Temperatures: cpu: 46.1 C mobo: N/A gpu: nvidia temp: 43 C Fan Speeds (rpm): N/A gpu: nvidia fan: 30% Info: Processes: 345 Uptime: 39m Memory: total: 32 GiB note: est. available: 30.47 GiB used: 12.42 GiB (40.8%) Shell: fish inxi: 3.3.29

 

 

Link to comment
  • 2 weeks later...

I have been attempting this for a while. I have a 7950X but I suspect this to be a common problem for all 7000 series iGPU.
The attempt to extract vbios with UBU, amdvbflash, GPU-Z or dump from /sys/bus/pci/devices/0000:01:00.0/rom have failed.
It is very strange that this iGPU doesn't even have a rom file under /sys/bus/pci/devices/0000:01:00.0/.
On the other hand, manual hex-editing of the MoBo BIOS or dumping from /sys/kernel/debug/dri/0/amdgpu_vbios produced identical outcome rom files.
rom_parser confirms that this is a valid vBIOS, but lacks uefi compatibility.

So far I have only seen failed cases reported once every while on reddit. I have yet to see a success case.
I would wait for AGESA 1.0.0.9, which is said to provide better support for Raphael and Phoenix.

Link to comment
  • 4 weeks later...

I was able to passthrough iGPU on my minisforum um790 pro with Ryzen 7940hs and 780m graphics.
Just follow the instruction https://github.com/isc30/UM773-Lite-Proxmox
To get the VBIOS from your gpu use vbios.c (I just run ubuntu from flash drive with "Try Ubuntu" option. Install GCC and extract the bios)
For passthrough to Windows 10 guest just install it with the "Sea Bios" param from the beginning and add the rom file.
If you want to passthrough to Windows 11 guest you also need to extract AMDGopDriver and use it for audio device. (I extracted it from the official bios bin file with UBU tool and then converted to the rom format with the edk2 -> EfiRom.exe)

Link to comment
11 hours ago, Dmytro Piddubnyi said:

I was able to passthrough iGPU on my minisforum um790 pro with Ryzen 7940hs and 780m graphics.
Just follow the instruction https://github.com/isc30/UM773-Lite-Proxmox
To get the VBIOS from your gpu use vbios.c (I just run ubuntu from flash drive with "Try Ubuntu" option. Install GCC and extract the bios)
For passthrough to Windows 10 guest just install it with the "Sea Bios" param from the beginning and add the rom file.
If you want to passthrough to Windows 11 guest you also need to extract AMDGopDriver and use it for audio device. (I extracted it from the official bios bin file with UBU tool and then converted to the rom format with the edk2 -> EfiRom.exe)

How did you adapt those instructions to apply to Unraid?

Link to comment
21 hours ago, JonathanM said:

How did you adapt those instructions to apply to Unraid?

Just did absolutely the same. Getting vbios, then just select the gpu and hdmi audio to fvio via UI(you don't need to follow instructions with manual edit modules/grub/etc...), then I modified the /boot/syslinux/syslinux.cfg.
I added:

append initrd=/bzroot earlymodules=vfio-pci video=efifb:off,vesafb:off gfxpayload=text


This line disables the GPU in Unraid, so I can successfully use it in VM(image will freeze after boot menu until you run a VM which is ok, so we don't use the monitor for unraid).

Then just edit VM setting in xml format and add the rom file for audio. To install amd drivers correctly you should enable mutlifunction='on' to the gpu and set audio and gpu to the same bus and slot and use function=0x1 for audio, then you can install official drivers with adrenaline package.
Then run. I have also a problem with GPU reset, but there is a fix for that:
https://oomza.cutegay.software/inga-lovinde/RadeonResetBugFix/releases

Also, VM freezes sometime, so I still investigate why does it fail(1 cpu core is 100% loaded and vm doesn't start, but all is ok in logs).

Link to comment
  • 1 month later...

Has anyone else had luck getting this to work? I've tried just about everything getting my 7950x igpu to work with an Ubuntu vm. The igpu is visible in lspci output, in the the vm, and journalctl seems to show everything okay, but still nothing on the screen.

I haven't been able to generate my own vbios yet, so i took the ones from https://github.com/isc30/UM773-Lite-Proxmox.

🤷‍♂️

Edited by edog305
Link to comment

My journalctl logs:
 

Nov 16 22:14:01 anon-ubuntu2 kernel: RIP: 0010:gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
Nov 16 22:14:01 anon-ubuntu2 snapd[625]: daemon.go:247: started snapd/2.60.4+23.10.1 (series 16; classic; devmode) ubuntu/23.10 (amd64) linux/6.7.0-060700rc1-generic.
Nov 16 22:16:32 anon-ubuntu2 kernel: amd_pstate: the _CPC object is not present in SBIOS or ACPI disabled
Nov 16 22:16:32 anon-ubuntu2 kernel: kvm_amd: TSC scaling supported
Nov 16 22:16:32 anon-ubuntu2 kernel: kvm_amd: Nested Virtualization enabled
Nov 16 22:16:32 anon-ubuntu2 kernel: kvm_amd: Nested Paging enabled
Nov 16 22:16:32 anon-ubuntu2 kernel: kvm_amd: Virtual VMLOAD VMSAVE supported
Nov 16 22:16:32 anon-ubuntu2 kernel: kvm_amd: Virtual GIF supported
Nov 16 22:16:32 anon-ubuntu2 kernel: kvm_amd: LBR virtualization supported
Nov 16 22:16:33 anon-ubuntu2 kernel: [drm] amdgpu kernel modesetting enabled.
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu: Virtual CRAT table created for CPU
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu: Topology: Add CPU node
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu 0000:05:00.0: amdgpu: Fetched VBIOS from ROM BAR
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu: ATOM BIOS: 102-RAPHAEL-008
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu 0000:05:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu 0000:05:00.0: amdgpu: VRAM: 512M 0x0000FFFFFF000000 - 0x000100001EFFFFFF (512M used)
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu 0000:05:00.0: amdgpu: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
Nov 16 22:16:33 anon-ubuntu2 kernel: amdgpu 0000:05:00.0: amdgpu: AGP: 17592186028032M 0x0001000400000000 - 0x0000FFFFFFFFFFFF
Nov 16 22:16:33 anon-ubuntu2 kernel: [drm] amdgpu: 512M of VRAM memory ready
Nov 16 22:16:33 anon-ubuntu2 kernel: [drm] amdgpu: 3971M of GTT memory ready.
Nov 16 22:16:33 anon-ubuntu2 kernel: kernel BUG at drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:595!
Nov 16 22:16:33 anon-ubuntu2 kernel: RIP: 0010:gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  ? gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  ? gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  ? gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  ? gmc_v10_0_get_vm_pde+0xb2/0xf0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  amdgpu_gmc_get_pde_for_bo+0x80/0xc0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  ? gmc_v10_0_flush_gpu_tlb+0xe7/0x330 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  amdgpu_gmc_pd_addr+0x4c/0x80 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  gfxhub_v2_1_init_gart_aperture_regs+0x1b/0x2b0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  gfxhub_v2_1_gart_enable+0xd5/0x360 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  gmc_v10_0_gart_enable+0x14d/0x1c0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  gmc_v10_0_hw_init+0x4c/0xa0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  amdgpu_device_ip_init+0x19c/0x900 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  amdgpu_device_init+0x975/0x1120 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  amdgpu_driver_load_kms+0x1a/0x1c0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  amdgpu_pci_probe+0x175/0x490 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  ? __pfx_amdgpu_init+0x10/0x10 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel:  amdgpu_init+0x69/0xff0 [amdgpu]
Nov 16 22:16:33 anon-ubuntu2 kernel: Modules linked in: snd_hda_codec_hdmi kvm_amd ccp amdgpu(+) snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi kvm snd_hda_codec snd_hda_core snd_hwdep irqbypass crct10dif_pclmul polyval_clmulni polyval_generic snd_pcm ghash_clmulni_intel sha512_ssse3 snd_seq_midi snd_seq_midi_event drm_exec aesni_intel snd_rawmidi crypto_simd amdxcp drm_buddy cryptd gpu_sched drm_suballoc_helper drm_ttm_helper snd_seq ttm drm_display_helper snd_seq_device cec snd_timer i2c_i801 rc_core cirrus i2c_algo_bit snd video drm_shmem_helper 9pnet_virtio lpc_ich i2c_smbus wmi drm_kms_helper soundcore 9pnet joydev input_leds serio_raw mac_hid msr parport_pc ppdev lp drm parport efi_pstore dmi_sysfs qemu_fw_cfg ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj hid_generic usbhid hid virtio_net ahci psmouse libahci net_failover crc32_pclmul failover
Nov 16 22:16:33 anon-ubuntu2 kernel: RIP: 0010:gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
Nov 16 22:16:35 anon-ubuntu2 snapd[617]: daemon.go:247: started snapd/2.60.4+23.10.1 (series 16; classic; devmode) ubuntu/23.10 (amd64) linux/6.6.0-060600rc7-generic.
Nov 16 22:16:55 anon-ubuntu2 sudo[2479]:     anon : TTY=pts/0 ; PWD=/home/anon ; USER=root ; COMMAND=/usr/bin/amdgpu-install
Nov 16 22:23:13 anon-ubuntu2 sudo[6453]:     anon : TTY=pts/0 ; PWD=/home/anon/Downloads ; USER=root ; COMMAND=/usr/bin/dpkg -i linux-modules-6.6.0-060600rc7-generic_6.6.0-060600rc7.202311152249_amd64.deb
Nov 16 22:23:37 anon-ubuntu2 sudo[9701]:     anon : TTY=pts/0 ; PWD=/home/anon/Downloads ; USER=root ; COMMAND=/usr/bin/amdgpu-install
Nov 16 22:25:18 anon-ubuntu2 sudo[10155]:     anon : TTY=pts/0 ; PWD=/home/anon/Downloads ; USER=root ; COMMAND=/usr/bin/dpkg -i linux-headers-6.6.0-060600rc7-generic_6.6.0-060600rc7.202311152249_amd64.deb
Nov 16 22:25:29 anon-ubuntu2 sudo[10168]:     anon : TTY=pts/0 ; PWD=/home/anon/Downloads ; USER=root ; COMMAND=/usr/bin/amdgpu-install

 

Link to comment

Hey, thanks. I created a bootable live usb and generated a vbios file from there. Unfortunately it looks like i'm getting the same output

 

[    0.816294] amd_pstate: the _CPC object is not present in SBIOS or ACPI disabled
[    3.841541] kvm_amd: TSC scaling supported
[    3.841544] kvm_amd: Nested Virtualization enabled
[    3.841544] kvm_amd: Nested Paging enabled
[    3.841547] kvm_amd: Virtual VMLOAD VMSAVE supported
[    3.841548] kvm_amd: Virtual GIF supported
[    3.841548] kvm_amd: LBR virtualization supported
[    4.866619] [drm] amdgpu kernel modesetting enabled.
[    4.866737] amdgpu: Virtual CRAT table created for CPU
[    4.866762] amdgpu: Topology: Add CPU node
[    4.878784] amdgpu 0000:05:00.0: amdgpu: Fetched VBIOS from ROM BAR
[    4.878830] amdgpu: ATOM BIOS: 102-RAPHAEL-008
[    4.908293] amdgpu 0000:05:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)
[    4.908441] amdgpu 0000:05:00.0: amdgpu: VRAM: 512M 0x0000FFFFFF000000 - 0x000100001EFFFFFF (512M used)
[    4.908444] amdgpu 0000:05:00.0: amdgpu: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
[    4.908446] amdgpu 0000:05:00.0: amdgpu: AGP: 17592186028032M 0x0001000400000000 - 0x0000FFFFFFFFFFFF
[    4.909432] [drm] amdgpu: 512M of VRAM memory ready
[    4.909437] [drm] amdgpu: 3971M of GTT memory ready.
[    4.909614] kernel BUG at drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:595!
[    4.909666] RIP: 0010:gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
[    4.910624]  ? gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
[    4.910830]  ? gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
[    4.911018]  ? gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]
[    4.911193]  ? gmc_v10_0_get_vm_pde+0xb2/0xf0 [amdgpu]
[    4.911363]  amdgpu_gmc_get_pde_for_bo+0x80/0xc0 [amdgpu]
[    4.911545]  ? gmc_v10_0_flush_gpu_tlb+0xe7/0x330 [amdgpu]
[    4.911714]  amdgpu_gmc_pd_addr+0x4c/0x80 [amdgpu]
[    4.911890]  gfxhub_v2_1_init_gart_aperture_regs+0x1b/0x2b0 [amdgpu]
[    4.912063]  gfxhub_v2_1_gart_enable+0xd5/0x360 [amdgpu]
[    4.912227]  gmc_v10_0_gart_enable+0x14d/0x1c0 [amdgpu]
[    4.912394]  gmc_v10_0_hw_init+0x4c/0xa0 [amdgpu]
[    4.912562]  amdgpu_device_ip_init+0x19c/0x900 [amdgpu]
[    4.912733]  amdgpu_device_init+0x975/0x1120 [amdgpu]
[    4.912900]  amdgpu_driver_load_kms+0x1a/0x1c0 [amdgpu]
[    4.913059]  amdgpu_pci_probe+0x175/0x490 [amdgpu]
[    4.913291]  ? __pfx_amdgpu_init+0x10/0x10 [amdgpu]
[    4.913453]  amdgpu_init+0x69/0xff0 [amdgpu]
[    4.913771] Modules linked in: intel_rapl_msr intel_rapl_common binfmt_misc amdgpu(+) kvm_amd ccp snd_hda_codec_hdmi snd_hda_intel kvm snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep irqbypass crct10dif_pclmul polyval_clmulni snd_pcm polyval_generic ghash_clmulni_intel snd_seq_midi drm_exec snd_seq_midi_event amdxcp sha512_ssse3 drm_buddy aesni_intel gpu_sched crypto_simd drm_suballoc_helper snd_rawmidi drm_ttm_helper ttm cryptd drm_display_helper snd_seq cec snd_seq_device snd_timer rc_core i2c_i801 i2c_algo_bit lpc_ich i2c_smbus video 9pnet_virtio cirrus snd wmi drm_shmem_helper 9pnet soundcore drm_kms_helper joydev input_leds mac_hid serio_raw msr parport_pc ppdev lp drm parport efi_pstore dmi_sysfs qemu_fw_cfg ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj hid_generic usbhid hid crc32_pclmul virtio_net psmouse ahci net_failover failover libahci
[    4.913969] RIP: 0010:gmc_v10_0_get_vm_pde+0xcc/0xf0 [amdgpu]


I see this line: kernel BUG at drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:595!

Link to comment
  • 2 months later...
On 10/14/2023 at 4:07 AM, Dmytro Piddubnyi said:

I was able to passthrough iGPU on my minisforum um790 pro with Ryzen 7940hs and 780m graphics.
Just follow the instruction https://github.com/isc30/UM773-Lite-Proxmox
To get the VBIOS from your gpu use vbios.c (I just run ubuntu from flash drive with "Try Ubuntu" option. Install GCC and extract the bios)
For passthrough to Windows 10 guest just install it with the "Sea Bios" param from the beginning and add the rom file.
If you want to passthrough to Windows 11 guest you also need to extract AMDGopDriver and use it for audio device. (I extracted it from the official bios bin file with UBU tool and then converted to the rom format with the edk2 -> EfiRom.exe)

Based on the same GitHub repo, I also managed to passthrough the iGPU from my Minisforum UM780 XTX with a Ryzen 7 7840HS and 780M graphics. However, I had severe trouble trying to extract the vBIOS from my 7840HS. Luckily, the 7940HS has the same 780M graphics as my 7840HS, so I could just download the vBIOS from the GitHub repo.

 

Just for the record, these were my steps:

  1. Get the AMD Vendor Reset Plugin (This allows the iGPU to be re-initialized for passthrough)
  2. Reboot Unraid
  3. Then in Tools > System Devices, search for your iGPU and audio device (AMD/ATI) and tick the checkboxes. After, click "Bind selected to VFIO at boot"
  4. Reboot Unraid
  5. Create or edit your VM:
    1. Choose "Q35-7.2" or later for the machine
    2. For the vBIOS, use vbios_7940hs.bin
  6. Once you started your VM and set it up, it's time to install the AMD graphics drivers. However, you need to download the offline installer, otherwise the online installer might complain that the system is not an AMD system and aborts the installation.
  7. Profit
Link to comment
  • 4 weeks later...

Interesting topic! With the current setup, one can only pass the whole iGPU to one VM, correct?

 

With the SR-IOV/GVT-g plugins for Intel on Unraid, one can still use the iGPU for containers (jellyfin etc.) as well as (multiple) VMs. That would not be possible for this AMD setup, correct?

If possible: Could someone with a working setup test this?

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...