AMD RX Vega 64 Pci passthrough BAR 0: can't reserve [mem 0x70000000-0x7fffffff 64bit pref]

ye4241

New Member
Feb 22, 2023
1
0
1
Try a lots search for this error, still not solved. In Windows guest, with GPU-Z it can found the PCI, however it cannot use it as GPU. In macOS guest, once add the PCI to vm, it will stuck for long time then in the system, it cannot display GPU details.

Configuration: https://pve.proxmox.com/wiki/Pci_passthrough

/etc/default/grub
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction video=efifb:off"

/etc/modules
Code:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
coretemp
vendor-reset

update-initramfs -u
Code:
update-initramfs: Generating /boot/initrd.img-5.15.85-1-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.

/etc/modprobe.d/blacklist.conf
Code:
blacklist amdgpu
blacklist radeon
blacklist nouveau
blacklist nvidia
blacklist snd_hda_intel
blacklist snd_hda_codec_hdmi
blacklist i915

/etc/modprobe.d/iommu_unsafe_interrupts.conf
Code:
options vfio_iommu_type1 allow_unsafe_interrupts=1

/etc/modprobe.d/vfio.conf
Code:
options vfio-pci ids=1002:687f,1002:aaf8 disable_vga=1

lspci -nn | grep 03:00
Code:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] [1002:687f] (rev c1)
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64] [1002:aaf8]

dmesg | grep '03:00'
Code:
[    0.907573] pci 0000:03:00.0: [1002:687f] type 00 class 0x030000
[    0.907583] pci 0000:03:00.0: reg 0x10: [mem 0x70000000-0x7fffffff 64bit pref]
[    0.907590] pci 0000:03:00.0: reg 0x18: [mem 0x80000000-0x801fffff 64bit pref]
[    0.907595] pci 0000:03:00.0: reg 0x20: [io  0x4000-0x40ff]
[    0.907599] pci 0000:03:00.0: reg 0x24: [mem 0x9aa00000-0x9aa7ffff]
[    0.907604] pci 0000:03:00.0: reg 0x30: [mem 0x9aa80000-0x9aa9ffff pref]
[    0.907620] pci 0000:03:00.0: BAR 0: assigned to efifb
[    0.907624] pci 0000:03:00.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    0.907659] pci 0000:03:00.0: PME# supported from D1 D2 D3hot D3cold
[    0.907721] pci 0000:03:00.1: [1002:aaf8] type 00 class 0x040300
[    0.907729] pci 0000:03:00.1: reg 0x10: [mem 0x9aaa0000-0x9aaa3fff]
[    0.907789] pci 0000:03:00.1: PME# supported from D1 D2 D3hot D3cold
[    0.914844] pci 0000:03:00.0: vgaarb: setting as boot VGA device
[    0.914844] pci 0000:03:00.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    0.914844] pci 0000:03:00.0: vgaarb: bridge control possible
[    1.014514] pci 0000:03:00.1: D0 power state depends on 0000:03:00.0
[    1.014734] pci 0000:03:00.0: Adding to iommu group 16
[    1.014746] pci 0000:03:00.1: Adding to iommu group 17
[    5.793902] vfio-pci 0000:03:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[   14.245483] vfio-pci 0000:03:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
[   14.245491] vfio-pci 0000:03:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
[   14.246073] vfio-pci 0000:03:00.0: BAR 0: can't reserve [mem 0x70000000-0x7fffffff 64bit pref]
[   16.315676] vfio-pci 0000:03:00.0: No more image in the PCI ROM
[   16.315696] vfio-pci 0000:03:00.0: No more image in the PCI ROM

~/rom-parser/rom-parser /tmp/image.rom
Code:
Valid ROM signature found @0h, PCIR offset 2a4h
        PCIR: type 0 (x86 PC-AT), vendor: 1002, device: 687f, class: 030000
        PCIR: revision 0, vendor revision: 1001
Error, ran off the end

I have already tried vendor-reset https://www.nicksherlock.com/2020/11/working-around-the-amd-gpu-reset-bug-on-proxmox/
There is no vendor information in dmseg, and with reset-test

./reset-test 0000:03:00.0
Code:
============================================================================

AMD Vega 10/12 Reset Application (Version: 1.0)
Copyright (c) 2019 Geoffrey McRae <geoff@hostfission.com>

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

This tool is intended as an interim workaround while I port this into the
kernel driver. If you like my work and want to support it you can contribute
using the following methods:

* Ko-Fi   - https://ko-fi.com/lookingglass
* Patreon - https://www.patreon.com/gnif
* BTC     - 14ZFcYjsKPiVreHqcaekvHGL846u3ZuT13

============================================================================

Attempting Vega 10 reset
CMD_READMODIFYWRITE  0x00000e1c
CMD_WRITE            0x00000e1f
CMD_READMODIFYWRITE  0x00000e2b
CMD_READMODIFYWRITE  0x00000e2b
CMD_WAITFOR          0x0001667c
Wait for timed out.
Failed to enter BACO, has the GPU already been reset?

Could anyone help me out with this error to make my gpu works.
 

Attachments

  • CleanShot 2023-02-22 at 12.36.13@2x.png
    CleanShot 2023-02-22 at 12.36.13@2x.png
    118.3 KB · Views: 4
Last edited: