isc30/ryzen-7000-series-proxmox

Questions related to AMD Reset Bug, GMKTEC M5 PRO, iommu groups

Opened this issue · 1 comments

Hi first of all great turotial and great job. I finally manage to shared the igpu to my vm, but I got some questions to ge cleared out. Before that here is my setup details

Host

Hardware: GMKTEC M5 PRO
CPU: AMD Ryzen 7 5700U with Radeon Graphics
GPU: Radeon Graphics iGPU
RAM: 64GB DDR4 3200Mhz
OS: Proxmox VE

Guest

Processors: 4 (1 sockets, 4 cores) [host]
Machine: q35
BIOS: OVMF (UEFI)
DISPLAY: Default
PCI Device (hostpci0): 0000:05:00.1,pcie=1,romfile=vbios_5700U.bin
PCI Device (hostpci1): 0000:05:00.0,pcie=1,romfile=AMDGopDriver_5700U.rom
OS: Debian 12

From the VM i can see that the iGPU is passed and Debian got it with the drivers (sudo apt install firmware-amd-graphics). Now I got some questions to be clarified.

abraham@HomeServer:~$ lspci | grep -i vga
00:01.0 VGA compatible controller: Device 1234:1111 (rev 02)
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne (rev c1)
abraham@HomeServer:~$ lsmod | grep amdgpu
amdgpu               9609216  0
gpu_sched              53248  1 amdgpu
drm_buddy              20480  1 amdgpu
video                  65536  1 amdgpu
drm_display_helper    184320  1 amdgpu
i2c_algo_bit           16384  1 amdgpu
drm_kms_helper        208896  6 bochs,drm_vram_helper,drm_display_helper,amdgpu
drm_ttm_helper         16384  3 bochs,drm_vram_helper,amdgpu
ttm                    94208  3 drm_vram_helper,amdgpu,drm_ttm_helper
drm                   614400  10 gpu_sched,drm_kms_helper,bochs,drm_vram_helper,drm_display_helper,drm_buddy,amdgpu,drm_ttm_helper,ttm
abraham@HomeServer:~$ sudo dmesg | grep -i amdgpu
[sudo] password for abraham:
[    4.262244] [drm] amdgpu kernel modesetting enabled.
[    4.262342] amdgpu: CRAT table not found
[    4.262344] amdgpu: Virtual CRAT table created for CPU
[    4.262355] amdgpu: Topology: Add CPU node
[    4.286116] amdgpu 0000:02:00.0: amdgpu: Unable to locate a BIOS ROM
[    4.286157] amdgpu 0000:02:00.0: amdgpu: Fatal error during GPU init
[    4.288695] amdgpu 0000:02:00.0: amdgpu: amdgpu: finishing device.
[    4.290800] amdgpu: probe of 0000:02:00.0 failed with error -22
[    4.290847] Modules linked in: nls_ascii nls_cp437 vfat squashfs fat intel_rapl_msr intel_rapl_common amdgpu(+) kvm_amd ccp kvm irqbypass snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg ghash_clmulni_intel snd_intel_sdw_acpi snd_hda_codec sha512_ssse3 gpu_sched sha512_generic drm_buddy video snd_hda_core sha256_ssse3 wmi sha1_ssse3 snd_hwdep drm_display_helper snd_pcm snd_timer aesni_intel cec iTCO_wdt snd intel_pmc_bxt rc_core crypto_simd iTCO_vendor_support cryptd i2c_algo_bit pcspkr watchdog virtio_balloon soundcore button joydev evdev sg serio_raw fuse dm_mod loop efi_pstore configfs efivarfs qemu_fw_cfg ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic hid_generic usbhid hid sd_mod t10_pi sr_mod crc64_rocksoft crc64 crc_t10dif cdrom crct10dif_generic bochs virtio_net virtio_scsi drm_vram_helper net_failover failover drm_kms_helper ahci libahci drm_ttm_helper crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel ttm libata virtio_pci psmouse i2c_i801 uhci_hcd
[    4.290997]  amdgpu_device_fini_sw+0x261/0x500 [amdgpu]
[    4.291310]  amdgpu_driver_release_kms+0x12/0x30 [amdgpu]
[    4.327790] Modules linked in: libcrc32c nfnetlink nls_ascii nls_cp437 vfat squashfs fat intel_rapl_msr intel_rapl_common amdgpu kvm_amd ccp kvm irqbypass snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg ghash_clmulni_intel snd_intel_sdw_acpi snd_hda_codec sha512_ssse3 gpu_sched sha512_generic drm_buddy video snd_hda_core sha256_ssse3 wmi sha1_ssse3 snd_hwdep drm_display_helper snd_pcm snd_timer aesni_intel cec iTCO_wdt snd intel_pmc_bxt rc_core crypto_simd iTCO_vendor_support cryptd i2c_algo_bit pcspkr watchdog virtio_balloon soundcore button joydev evdev sg serio_raw fuse dm_mod loop efi_pstore configfs efivarfs qemu_fw_cfg ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic hid_generic usbhid hid sd_mod t10_pi sr_mod crc64_rocksoft crc64 crc_t10dif cdrom crct10dif_generic bochs virtio_net virtio_scsi drm_vram_helper net_failover failover drm_kms_helper ahci libahci drm_ttm_helper crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel ttm libata virtio_pci psmouse

Questions

  1. Do i need to install AMD Reset Bug Fix for Linux too? I think not
  2. If i am not wrong the iGPU is a full passthrough which means the host will have no display output after boot right? I think yes
  3. For the Guest VM getting the iGPU should i keep the DISPLAY: Default as it is or something else? This i have no idea
  4. Is it necessary to to passthrough the Audio device too? I see that the iGPU and Audio are two different iommu groups.
root@smarthome:~# for iommu_group in /sys/kernel/iommu_groups/*; do
>     echo "IOMMU Group $(basename "$iommu_group"):"
>     for device in "$iommu_group"/devices/*; do
>         echo -e "\t$(lspci -nns "$(basename "$device")")"
>     done
> done
IOMMU Group 0:
        00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
IOMMU Group 1:
        00:01.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge [1022:1634]
IOMMU Group 10:
        01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)
IOMMU Group 11:
        02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)
IOMMU Group 12:
        03:00.0 Network controller [0280]: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter [14c3:0616]
IOMMU Group 13:
        04:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller 980 [144d:a809]
IOMMU Group 14:
        05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne [1002:164c] (rev c1)
IOMMU Group 15:
        05:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
IOMMU Group 16:
        05:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
IOMMU Group 17:
        05:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639]
IOMMU Group 18:
        05:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639]
IOMMU Group 19:
        05:00.5 Multimedia controller [0480]: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor [1022:15e2] (rev 01)
IOMMU Group 2:
        00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
IOMMU Group 20:
        05:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller [1022:15e3]
IOMMU Group 3:
        00:02.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge [1022:1634]
IOMMU Group 4:
        00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge [1022:1634]
IOMMU Group 5:
        00:02.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge [1022:1634]
IOMMU Group 6:
        00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
IOMMU Group 7:
        00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635]
IOMMU Group 8:
        00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 51)
        00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
IOMMU Group 9:
        00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0 [1022:1448]
        00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1 [1022:1449]
        00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2 [1022:144a]
        00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3 [1022:144b]
        00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4 [1022:144c]
        00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5 [1022:144d]
        00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6 [1022:144e]
        00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7 [1022:144f]

Questions

  1. Do i need to install AMD Reset Bug Fix for Linux too? I think not
  2. If i am not wrong the iGPU is a full passthrough which means the host will have no display output after boot right? I think yes
  3. For the Guest VM getting the iGPU should i keep the DISPLAY: Default as it is or something else? This i have no idea
  4. Is it necessary to to passthrough the Audio device too? I see that the iGPU and Audio are two different iommu groups.
  1. No
  2. Correct
  3. Doesn't matter
  4. For Windows yes, not sure for Linux.