GithubHelp home page GithubHelp logo

gnif / vendor-reset Goto Github PK

View Code? Open in Web Editor NEW
721.0 31.0 57.0 10.87 MB

Linux kernel vendor specific hardware reset module for sequences that are too complex/complicated to land in pci_quirks.c

License: GNU General Public License v2.0

Makefile 0.01% C 100.00%

vendor-reset's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vendor-reset's Issues

RX 6800

Does that work for the RX 6800 too?

Reboot of windows 10 fails using 5700

[Sat Mar 13 12:00:32 2021] WARNING: CPU: 3 PID: 27354 at drivers/iommu/amd_iommu.c:1294 __domain_flush_pages+0xff/0x110
[Sat Mar 13 12:00:32 2021] Modules linked in: nf_conntrack_netlink iptable_nat md4 cmac nls_utf8 cifs libarc4 libdes nf_log_ipv6 ip6t_REJECT nf_reject_ipv6 xt_hl ip6t_rt nf_log_ipv4 nf_log_common ipt_REJECT nf_reject_ipv4 xt_LOG nft_limit xt_limit xt_nat xt_tcpudp xt_conntrack xt_MASQUERADE xfrm_user xfrm_algo nft_counter xt_addrtype nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 binfmt_misc nf_tables veth ebtable_filter ebtables ip_set ip6table_raw iptable_raw ip6table_filter ip6_tables rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs iptable_filter lockd grace fscache bpfilter softdog nfnetlink_log nfnetlink snd_hda_codec_hdmi zfs(PO) edac_mce_amd zunicode(PO) snd_hda_codec_realtek ppdev zzstd(O) snd_hda_codec_generic ledtrig_audio zlua(O) zavl(PO) icp(PO) vhost_net kvm_amd vhost tap kvm ib_iser snd_hda_intel rdma_cm snd_intel_dspcfg iw_cm snd_hda_codec crct10dif_pclmul ib_cm crc32_pclmul snd_hda_core ghash_clmulni_intel snd_hwdep aesni_intel ib_core zcommon(PO) snd_pcm iscsi_tcp
[Sat Mar 13 12:00:32 2021]  libiscsi_tcp snd_timer znvpair(PO) crypto_simd ftdi_sio libiscsi ti_usb_3410_5052 snd cryptd scsi_transport_iscsi spl(O) glue_helper input_leds wmi_bmof pcspkr usbserial soundcore k10temp ccp parport_pc parport mac_hid nct6775 hwmon_vid overlay aufs vfio_pci sunrpc vfio_virqfd irqbypass vfio_iommu_type1 vfio ip_tables x_tables autofs4 btrfs xor zstd_compress raid6_pq usbmouse hid_generic usbkbd usbhid hid dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c i2c_piix4 r8169 xhci_pci ahci realtek xhci_hcd libahci wmi gpio_amdpt gpio_generic
[Sat Mar 13 12:00:32 2021] CPU: 3 PID: 27354 Comm: kvm Tainted: P        W  O      5.4.103-1-pve #1
[Sat Mar 13 12:00:32 2021] Hardware name: Micro-Star International Co., Ltd. MS-7A38/B450M PRO-VDH MAX (MS-7A38), BIOS B.A0 11/26/2020
[Sat Mar 13 12:00:32 2021] RIP: 0010:__domain_flush_pages+0xff/0x110
[Sat Mar 13 12:00:32 2021] Code: f8 49 39 c6 75 b6 45 85 ed 75 1f 48 8b 44 24 38 65 48 33 04 25 28 00 00 00 75 13 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <0f> 0b eb dd e8 78 f9 9e ff 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
[Sat Mar 13 12:00:32 2021] RSP: 0018:ffffae1a94597a40 EFLAGS: 00010082
[Sat Mar 13 12:00:32 2021] RAX: ffff8ea1da671a10 RBX: ffff8ea1da671a08 RCX: 0000000000000006
[Sat Mar 13 12:00:32 2021] RDX: 0000000000000000 RSI: 0000000000000816 RDI: 0000000000000816
[Sat Mar 13 12:00:32 2021] RBP: ffffae1a94597aa8 R08: 0000000000004b7d R09: 0720072007200720
[Sat Mar 13 12:00:32 2021] R10: 0720072007200720 R11: 0720072007200720 R12: ffff8ea1db412000
[Sat Mar 13 12:00:32 2021] R13: 00000000fffffffb R14: ffff8ea1da671a10 R15: 7fffffffffffffff
[Sat Mar 13 12:00:32 2021] FS:  00007f35ea031700(0000) GS:ffff8ea1de8c0000(0000) knlGS:0000000000000000
[Sat Mar 13 12:00:32 2021] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Sat Mar 13 12:00:32 2021] CR2: 00007f35f76413fd CR3: 0000000377542000 CR4: 0000000000340ee0
[Sat Mar 13 12:00:32 2021] Call Trace:
[Sat Mar 13 12:00:32 2021]  attach_device+0xed/0x2d0
[Sat Mar 13 12:00:32 2021]  amd_iommu_attach_device+0x6c/0xd0
[Sat Mar 13 12:00:32 2021]  __iommu_attach_device+0x4b/0xc0
[Sat Mar 13 12:00:32 2021]  __iommu_detach_group+0x51/0x140
[Sat Mar 13 12:00:32 2021]  iommu_detach_group+0x2b/0x40
[Sat Mar 13 12:00:32 2021]  vfio_iommu_detach_group.isra.19+0x29/0x30 [vfio_iommu_type1]
[Sat Mar 13 12:00:32 2021]  vfio_iommu_type1_detach_group+0x147/0x460 [vfio_iommu_type1]
[Sat Mar 13 12:00:32 2021]  ? eventfd_free_ctx+0x28/0x30
[Sat Mar 13 12:00:32 2021]  __vfio_group_unset_container+0x50/0x160 [vfio]
[Sat Mar 13 12:00:32 2021]  vfio_group_try_dissolve_container+0x23/0x30 [vfio]
[Sat Mar 13 12:00:32 2021]  vfio_device_fops_release+0x2b/0x40 [vfio]
[Sat Mar 13 12:00:32 2021]  __fput+0xc6/0x260
[Sat Mar 13 12:00:32 2021]  ____fput+0xe/0x10
[Sat Mar 13 12:00:32 2021]  task_work_run+0x9d/0xc0
[Sat Mar 13 12:00:32 2021]  do_exit+0x371/0xb00
[Sat Mar 13 12:00:32 2021]  ? kvm_vm_ioctl+0x5c5/0x980 [kvm]
[Sat Mar 13 12:00:32 2021]  do_group_exit+0x47/0xb0
[Sat Mar 13 12:00:32 2021]  get_signal+0x140/0x850
[Sat Mar 13 12:00:32 2021]  ? vfio_fops_unl_ioctl+0x6a/0x280 [vfio]
[Sat Mar 13 12:00:32 2021]  do_signal+0x34/0x6e0
[Sat Mar 13 12:00:32 2021]  ? do_vfs_ioctl+0xa9/0x640
[Sat Mar 13 12:00:32 2021]  ? handle_mm_fault+0xc9/0x1f0
[Sat Mar 13 12:00:32 2021]  exit_to_usermode_loop+0x90/0x130
[Sat Mar 13 12:00:32 2021]  do_syscall_64+0x160/0x190
[Sat Mar 13 12:00:32 2021]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[Sat Mar 13 12:00:32 2021] RIP: 0033:0x7f35f7641427
[Sat Mar 13 12:00:32 2021] Code: Bad RIP value.
[Sat Mar 13 12:00:32 2021] RSP: 002b:00007f35ea02da18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[Sat Mar 13 12:00:32 2021] RAX: 0000000000000000 RBX: 000055ffe5e194d0 RCX: 00007f35f7641427
[Sat Mar 13 12:00:32 2021] RDX: 00007f35ea02daa0 RSI: 0000000000003b72 RDI: 0000000000000027
[Sat Mar 13 12:00:32 2021] RBP: 0000000000100000 R08: 0000000000000000 R09: 000000007fffffff
[Sat Mar 13 12:00:32 2021] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f35ea02daa0
[Sat Mar 13 12:00:32 2021] R13: 00007f35ea02da90 R14: 000055ffe5e194d0 R15: 000000007fffffff

Black Screen after apply vendor reset

Hi,

i have a working VM with QUEMU/KVM on linux arch based distro (i'm using Garuda).

I have made a passthrough of my RX580. The VM working well, but when i shutdown the host doesn't apper back.

So i have install vendor-reset, follow the instructions. But, after the install the virtual machine doesn't boot anymore, and the screen remains black.

Someone have some tips about that?

Thanks!

Initializing fans

The card I pass through (RX550 Pulse) is rather noisy out of reset. The card is left in that state after every host reboot and resuming from S3 (the GOP/VBIOS does turn it down significantly, but not to the point of being silent, and it doesn't run during resume).
Letting amdgpu bind to the card does allow the fan to quiet down, but it complains very loud (in dmesg) when detaching and booting the VM, and probably causes more harm that isn't detectable at first glance, so I'd rather not do that. This also leaves the card in a non-functional state for Windows when not using vendor-reset.
Booting the VM and then shutting it down leaves the fan in the quiet state, as long as vendor-reset is not loaded. Otherwise the card resets immediately after shutdown, and the fan gets loud again.

Is it possible for vendor-reset to initialize the fan controller? Possibly even enough to get zero-RPM mode working?

Error code 43 with AMD RX570 on Xcp-NG

Since I started using this module, the graphic card (AMD RX570) stopped working inside the VM with the "error code 43".
Prior to this, I was able to use the same card (with the same configuration) inside the VM, except for the well known reset issue.

This is the log from dmesg on the host:

pciback 0000:01:00.0: AMD_POLARIS10: version 1.1
pciback 0000:01:00.0: AMD_POLARIS10: performing pre-reset
pciback 0000:01:00.0: AMD_POLARIS10: performing reset
pciback 0000:01:00.0: AMD_POLARIS10: CLOCK_CNTL: 0x0, PC: 0x2a2c
pciback 0000:01:00.0: AMD_POLARIS10: performing post-reset
pciback 0000:01:00.0: AMD_POLARIS10: reset result = 0

Host details:

  • uefi system
  • Xcp-NG 8.2
  • enabled integrated graphic from bios
  • used xen-pciback.hide to "hide" RX570

VM details:

  • uefi system
  • passed through the graphic card
  • Windows 10 pro (upgraded to 20H2 update)
  • freshly installed
  • tried both AMD official drivers and Windows ones

If I missed something, or you need any further info, just tell me.

Consider upstreaming these quirks

The readme says "while it would be great to have these in the kernel as PCI quirks, some of the reset procedures are very complex and would never be accepted as a quirk." But I don't remember seeing a discussion about adding these to the kernel.

The existing user experience (seeing reset failures, VFIO passthrough issues, etc, then stumbling over this out-of-tree workaround) seems pretty poor. Maybe we should have a conversation about how to improve that? [email protected] would be a good place to start.

Problems on 21.04

This was working for me on popos 20.04, but I've been getting reset issues since upgrading to 21.04. Running a 5700XT fwiw.

Soft restart of guest OS leaves navi 5700 in bad state

I am passing both video and audio devices through to the guest OS.
Doing a soft restart of the guest leads to IO timeouts in the host OS.

[  144.319744] vfio-pci 0000:11:00.0: enabling device (0002 -> 0003)
[  144.319917] vfio-pci 0000:11:00.0: AMD_NAVI10: version 1.1
[  144.319918] vfio-pci 0000:11:00.0: AMD_NAVI10: performing pre-reset
[  144.339800] vfio-pci 0000:11:00.0: AMD_NAVI10: performing reset
[  144.444968] ATOM BIOS: 113-D1820201-101
[  144.444970] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  144.703142] vfio-pci 0000:11:00.0: AMD_NAVI10: bus reset disabled? yes
[  144.703147] vfio-pci 0000:11:00.0: AMD_NAVI10: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  144.703149] vfio-pci 0000:11:00.0: AMD_NAVI10: performing post-reset
[  144.739763] vfio-pci 0000:11:00.0: AMD_NAVI10: reset result = 0
[  144.739926] vfio-pci 0000:11:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
[  144.739938] vfio-pci 0000:11:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
[  144.739942] vfio-pci 0000:11:00.0: vfio_ecap_init: hiding ecap 0x25@0x400
[  144.739944] vfio-pci 0000:11:00.0: vfio_ecap_init: hiding ecap 0x26@0x410
[  144.739946] vfio-pci 0000:11:00.0: vfio_ecap_init: hiding ecap 0x27@0x440
[  144.759555] vfio-pci 0000:11:00.1: enabling device (0000 -> 0002)
[  145.800049] vfio-pci 0000:03:00.0: vfio_ecap_init: hiding ecap 0x19@0x200
[  146.049592] usb 5-6.3: USB disconnect, device number 5
[  148.155701] vfio-pci 0000:11:00.0: AMD_NAVI10: version 1.1
[  148.155703] vfio-pci 0000:11:00.0: AMD_NAVI10: performing pre-reset
[  148.155860] vfio-pci 0000:11:00.0: AMD_NAVI10: performing reset
[  148.261063] ATOM BIOS: 113-D1820201-101
[  148.261065] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  148.522931] vfio-pci 0000:11:00.0: AMD_NAVI10: bus reset disabled? yes
[  148.522936] vfio-pci 0000:11:00.0: AMD_NAVI10: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  148.522939] vfio-pci 0000:11:00.0: AMD_NAVI10: performing post-reset
[  148.559488] vfio-pci 0000:11:00.0: AMD_NAVI10: reset result = 0
[  180.367104] usb 5-6: reset full-speed USB device number 2 using xhci_hcd
[  488.013034] usb 5-6: reset full-speed USB device number 2 using xhci_hcd
[  490.288791] vfio-pci 0000:11:00.0: AMD_NAVI10: version 1.1
[  490.288792] vfio-pci 0000:11:00.0: AMD_NAVI10: performing pre-reset
[  490.288941] vfio-pci 0000:11:00.0: AMD_NAVI10: performing reset
[  490.394872] ATOM BIOS: 113-D1820201-101
[  490.394874] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  490.394877] vfio-pci 0000:11:00.0: AMD_NAVI10: bus reset disabled? yes
[  490.394882] vfio-pci 0000:11:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: cc8d3c5, mp1 intr enabled? yes, bl ready? yes
[  490.394883] vfio-pci 0000:11:00.0: AMD_NAVI10: Clearing scratch regs 6 and 7
[  490.395011] vfio-pci 0000:11:00.0: AMD_NAVI10: begin psp mode 1 reset
[  490.924367] vfio-pci 0000:11:00.0: AMD_NAVI10: mode1 reset succeeded
[  492.868373] vfio-pci 0000:11:00.0: AMD_NAVI10: PSP mode1 reset successful
[  492.868377] vfio-pci 0000:11:00.0: AMD_NAVI10: performing post-reset
[  492.908377] vfio-pci 0000:11:00.0: AMD_NAVI10: reset result = 0
[  493.313834] AMD-Vi: Completion-Wait loop timed out
[  493.697898] AMD-Vi: Completion-Wait loop timed out
[  493.820439] AMD-Vi: Completion-Wait loop timed out
[  493.989660] AMD-Vi: Completion-Wait loop timed out
[  494.112042] AMD-Vi: Completion-Wait loop timed out
[  494.193546] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c17e0]
[  494.316113] AMD-Vi: Completion-Wait loop timed out
[  494.465653] AMD-Vi: Completion-Wait loop timed out
[  494.588560] AMD-Vi: Completion-Wait loop timed out
[  494.711380] AMD-Vi: Completion-Wait loop timed out
[  494.833749] AMD-Vi: Completion-Wait loop timed out
[  495.195690] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c1810]
[  496.197585] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c1840]
[  497.199414] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c1870]
[  498.201329] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c18a0]
[  499.202942] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c18d0]
[  500.204820] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c1900]
[  501.206697] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c1930]
[  502.033036] AMD-Vi: Completion-Wait loop timed out
[  502.160830] AMD-Vi: Completion-Wait loop timed out
[  502.208669] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c1960]
[  502.347346] AMD-Vi: Completion-Wait loop timed out
[  502.470313] AMD-Vi: Completion-Wait loop timed out
[  502.593367] AMD-Vi: Completion-Wait loop timed out
[  502.716691] AMD-Vi: Completion-Wait loop timed out
[  502.840174] AMD-Vi: Completion-Wait loop timed out
[  502.921063] do_IRQ: 9.34 No irq handler for vector
[  502.962893] AMD-Vi: Completion-Wait loop timed out
[  502.984596] do_IRQ: 18.34 No irq handler for vector
[  502.984786] do_IRQ: 9.34 No irq handler for vector
[  502.984791] do_IRQ: 11.34 No irq handler for vector
[  502.984802] do_IRQ: 28.36 No irq handler for vector
[  503.085883] AMD-Vi: Completion-Wait loop timed out
[  503.209101] AMD-Vi: Completion-Wait loop timed out
[  503.210453] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c1990]
[  503.333541] AMD-Vi: Completion-Wait loop timed out
[  503.456831] AMD-Vi: Completion-Wait loop timed out
[  503.580268] AMD-Vi: Completion-Wait loop timed out
[  503.702970] AMD-Vi: Completion-Wait loop timed out
[  503.825977] AMD-Vi: Completion-Wait loop timed out
[  503.949168] AMD-Vi: Completion-Wait loop timed out
[  504.072509] AMD-Vi: Completion-Wait loop timed out
[  504.196137] AMD-Vi: Completion-Wait loop timed out
[  504.212324] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=11:00.0 address=0xff85c19c0]

Unable to load vendor-reset.

I previously compiled the vendor reset and created an /etc/modules-load.d/vendor-reset.conf. Currently I receive Unknown PCI header type '127'again.

[user@computer vendor-reset]$ sudo dkms install .
Error! DKMS tree already contains: vendor-reset-0.1.1
You cannot add the same module/version combo more than once.

[user@computer vendor-reset]$ sudo modprobe vendor-reset
modprobe: FATAL: Module vendor-reset not found in directory /lib/modules/5.10.34-1-MANJARO

passthroughed GPU becomes unusable once forced to shutdown or reboot guest machine

i mean "forced" to shutdown to close the vm right now not to close the OS of guest, or simply use shutdown +0 in guest console, rather than normally shutdown from host virsh. This will cause GPU to be unavailable(rocm-smi shows no GPU while lspci do shows gpu) once booting guest again until rebooting the host machine. Is this normal to generally GPU passthrough, or another reset BUG?

SAPPHIRE Pulse Radeon RX 5500 XT SF 4G reset does not work

Hi,

something is iffy with the 5500 XT - I'm getting a similar behavior as the person in #23.

My setup:

  • Machine: Mac Pro 4.1 (flashed to 5.1), 2x Xeon E5520, 32GB RAM
  • OS Debian Testing, kernel 5.10.0-3-amd64 (both in host and guest)
  • vendor-reset master, commit 225a49a
  • Primary GPU (slot 1): RX 5500 XT - amdgpu blacklisted, vfio-pci stub set up
  • Secondary GPU NVIDIA GF 710 - used for host graphics
  • QEMU-KVM machine Q35 in UEFI mode, OVMF 2020.11-2

Host dmesg after first start of VM:

[  580.162288] vfio-pci 0000:0c:00.0: enabling device (0002 -> 0003)
[  580.162716] vfio-pci 0000:0c:00.0: AMD_NAVI14: version 1.1
[  580.162966] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing pre-reset
[  580.182421] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing reset
[  580.218019] ATOM BIOS: 113-2E4275U-OIM
[  580.218290] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  580.401033] vfio-pci 0000:0c:00.0: AMD_NAVI14: bus reset disabled? yes
[  580.401262] vfio-pci 0000:0c:00.0: AMD_NAVI14: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  580.401824] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing post-reset
[  580.442315] vfio-pci 0000:0c:00.0: AMD_NAVI14: reset result = 0
[  580.442733] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
[  580.443139] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
[  580.443779] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x25@0x400
[  580.444425] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x26@0x410
[  580.445190] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x27@0x440
[  580.898393] vfio-pci 0000:00:1d.7: vfio_cap_init: hiding cap 0xa@0x58
[  581.466363] vfio-pci 0000:0c:00.0: AMD_NAVI14: version 1.1
[  581.466700] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing pre-reset
[  581.486386] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing reset
[  581.522097] ATOM BIOS: 113-2E4275U-OIM
[  581.522430] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  581.705222] vfio-pci 0000:0c:00.0: AMD_NAVI14: bus reset disabled? yes
[  581.705452] vfio-pci 0000:0c:00.0: AMD_NAVI14: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  581.705880] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing post-reset
[  581.746278] vfio-pci 0000:0c:00.0: AMD_NAVI14: reset result = 0

Host dmesg after shutdown triggered in VM:

[  684.065413] vfio-pci 0000:0c:00.0: AMD_NAVI14: version 1.1
[  684.065760] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing pre-reset
[  684.084923] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing reset
[  684.121323] ATOM BIOS: 113-2E4275U-OIM
[  684.121645] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  684.121961] vfio-pci 0000:0c:00.0: AMD_NAVI14: bus reset disabled? yes
[  684.122432] vfio-pci 0000:0c:00.0: AMD_NAVI14: SMU response reg: 1, sol reg: 23976f79, mp1 intr enabled? yes, bl ready? yes
[  684.123055] vfio-pci 0000:0c:00.0: AMD_NAVI14: Clearing scratch regs 6 and 7
[  684.123600] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  684.124158] vfio-pci 0000:0c:00.0: Failed to send message 0x2a: return 0xfd
[  684.124865] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  684.125347] vfio-pci 0000:0c:00.0: AMD_NAVI14: begin psp mode 1 reset
[  684.652771] vfio-pci 0000:0c:00.0: AMD_NAVI14: mode1 reset succeeded
[  684.653184] vfio-pci 0000:0c:00.0: AMD_NAVI14: PSP mode1 reset successful
[  684.653505] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing post-reset
[  684.692830] vfio-pci 0000:0c:00.0: AMD_NAVI14: reset result = 0

Host dmesg after second time starting of VM:

[  754.219816] vfio-pci 0000:0c:00.0: enabling device (0400 -> 0403)
[  754.220256] vfio-pci 0000:0c:00.0: AMD_NAVI14: version 1.1
[  754.220740] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing pre-reset
[  754.239801] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing reset
[  754.276159] ATOM BIOS: 113-2E4275U-OIM
[  754.276405] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  754.276978] vfio-pci 0000:0c:00.0: AMD_NAVI14: bus reset disabled? yes
[  754.277751] vfio-pci 0000:0c:00.0: AMD_NAVI14: SMU response reg: fd, sol reg: 23976f79, mp1 intr enabled? yes, bl ready? yes
[  754.278612] vfio-pci 0000:0c:00.0: AMD_NAVI14: Clearing scratch regs 6 and 7
[  754.279481] vfio-pci 0000:0c:00.0: AMD_NAVI14: MP1 reset
[  754.280261] vfio-pci 0000:0c:00.0: AMD_NAVI14: wait for MP1
[  754.280970] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  754.281690] vfio-pci 0000:0c:00.0: AMD_NAVI14: SMU resp reg: 1
[  754.282623] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  754.283473] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  754.284201] vfio-pci 0000:0c:00.0: AMD_NAVI14: begin psp mode 1 reset
[  754.471102] vfio-pci 0000:0c:00.0: AMD_NAVI14: timed out waiting for PSP to reach valid state, but continuing anyway
[  754.987697] vfio-pci 0000:0c:00.0: AMD_NAVI14: mode1 reset succeeded
[  754.988075] vfio-pci 0000:0c:00.0: AMD_NAVI14: PSP mode1 reset successful
[  754.988495] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing post-reset
[  755.027682] vfio-pci 0000:0c:00.0: AMD_NAVI14: reset result = 0
[  755.028113] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
[  755.028448] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
[  755.029132] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x25@0x400
[  755.029859] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x26@0x410
[  755.030613] vfio-pci 0000:0c:00.0: vfio_ecap_init: hiding ecap 0x27@0x440
[  755.483817] vfio-pci 0000:00:1d.7: vfio_cap_init: hiding cap 0xa@0x58
[  756.047779] vfio-pci 0000:0c:00.0: AMD_NAVI14: version 1.1
[  756.048135] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing pre-reset
[  756.067719] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing reset
[  756.104148] ATOM BIOS: 113-2E4275U-OIM
[  756.104470] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  756.104793] vfio-pci 0000:0c:00.0: AMD_NAVI14: bus reset disabled? yes
[  756.105299] vfio-pci 0000:0c:00.0: AMD_NAVI14: SMU response reg: fd, sol reg: 23976f79, mp1 intr enabled? yes, bl ready? yes
[  756.105944] vfio-pci 0000:0c:00.0: AMD_NAVI14: Clearing scratch regs 6 and 7
[  756.106549] vfio-pci 0000:0c:00.0: AMD_NAVI14: MP1 reset
[  756.107079] vfio-pci 0000:0c:00.0: AMD_NAVI14: wait for MP1
[  756.107634] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  756.108115] vfio-pci 0000:0c:00.0: AMD_NAVI14: SMU resp reg: 1
[  756.108645] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  756.109133] vfio-pci 0000:0c:00.0: SMU error 0xfd
[  756.109654] vfio-pci 0000:0c:00.0: AMD_NAVI14: begin psp mode 1 reset
[  756.296500] vfio-pci 0000:0c:00.0: AMD_NAVI14: timed out waiting for PSP to reach valid state, but continuing anyway
[  756.811812] vfio-pci 0000:0c:00.0: AMD_NAVI14: mode1 reset succeeded
[  756.812142] vfio-pci 0000:0c:00.0: AMD_NAVI14: PSP mode1 reset successful
[  756.812352] vfio-pci 0000:0c:00.0: AMD_NAVI14: performing post-reset
[  756.851727] vfio-pci 0000:0c:00.0: AMD_NAVI14: reset result = 0

The framebuffer console now hangs after switching to it (probably when/as the standard BIOS output routines switch over to framebuffer). Running dmesg in the guest via serial console gave these logs:

root@debian:~# dmesg|grep amdgpu
[    3.356574] [drm] amdgpu kernel modesetting enabled.
[    3.369784] amdgpu: Topology: Add CPU node
[    3.371567] fb0: switching to amdgpudrmfb from EFI VGA
[    3.378024] amdgpu 0000:06:00.0: vgaarb: deactivate vga console
[    3.384973] amdgpu 0000:06:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)
[    3.411232] amdgpu 0000:06:00.0: amdgpu: Fetched VBIOS from VFCT
[    3.415990] amdgpu: ATOM BIOS: 113-2E4275U-OIM
[    3.434085] amdgpu 0000:06:00.0: amdgpu: MODE1 reset
[    3.440418] amdgpu 0000:06:00.0: amdgpu: GPU psp mode1 reset
[    3.630376] amdgpu 0000:06:00.0: amdgpu: GPU mode1 reset failed
[    3.631759] amdgpu 0000:06:00.0: amdgpu: asic reset on init failed
[    3.636467] amdgpu 0000:06:00.0: amdgpu: Fatal error during GPU init
[    3.637761] amdgpu: probe of 0000:06:00.0 failed with error -22

Attempting rmmod amdgpu && modprobe amdgpu yields a different error:

root@debian:~# modprobe amdgpu
[  102.289889] [drm] amdgpu kernel modesetting enabled.
[  102.291800] CRAT table not found
[  102.292302] Virtual CRAT table created for CPU
[  102.292954] amdgpu: Topology: Add CPU node
[  102.337927] amdgpu 0000:06:00.0: vgaarb: deactivate vga console
[  102.339875] [drm] initializing kernel modesetting (NAVI14 0x1002:0x7340 0x1DA2:0x427E 0xC5).
[  102.341716] amdgpu 0000:06:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)
[  102.345179] [drm] register mmio base: 0xC0000000
[  102.346223] [drm] register mmio size: 524288
[  102.347189] [drm] PCIE atomic ops is not supported
[  102.350301] [drm] add ip block number 0 <nv_common>
[  102.351015] [drm] add ip block number 1 <gmc_v10_0>
[  102.351730] [drm] add ip block number 2 <navi10_ih>
[  102.352424] [drm] add ip block number 3 <psp>
[  102.353035] [drm] add ip block number 4 <smu>
[  102.353683] [drm] add ip block number 5 <dm>
[  102.354297] [drm] add ip block number 6 <gfx_v10_0>
[  102.355005] [drm] add ip block number 7 <sdma_v5_0>
[  102.355697] [drm] add ip block number 8 <vcn_v2_0>
[  102.356360] [drm] add ip block number 9 <jpeg_v2_0>
[  102.357946] amdgpu 0000:06:00.0: amdgpu: Fetched VBIOS from VFCT
[  102.359281] amdgpu: ATOM BIOS: 113-2E4275U-OIM
[  102.359926] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:02.2/0000:06:00.0/vbios_version'
[  102.361405] CPU: 0 PID: 511 Comm: modprobe Not tainted 5.10.0-3-amd64 #1 Debian 5.10.13-1
[  102.362633] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
[  102.363726] Call Trace:
[  102.364104]  dump_stack+0x6b/0x83
[  102.364582]  sysfs_warn_dup.cold+0x17/0x24
[  102.365169]  sysfs_add_file_mode_ns+0x161/0x170
[  102.365836]  sysfs_create_file_ns+0x62/0x90
[  102.366589]  amdgpu_atombios_init+0x1b3/0x2e0 [amdgpu]
[  102.367450]  amdgpu_device_init.cold+0x11c7/0x1a4d [amdgpu]
[  102.368227]  ? pci_bus_read_config_word+0x49/0x70
[  102.369016]  amdgpu_driver_load_kms+0x2b/0x1f0 [amdgpu]
[  102.369868]  amdgpu_pci_probe+0x183/0x210 [amdgpu]
[  102.370569]  local_pci_probe+0x42/0x80
[  102.371103]  ? _cond_resched+0x16/0x40
[  102.371641]  pci_device_probe+0xfd/0x1b0
[  102.372193]  really_probe+0xf2/0x440
[  102.372707]  driver_probe_device+0xe1/0x150
[  102.373305]  device_driver_attach+0xa1/0xb0
[  102.373918]  __driver_attach+0x8a/0x150
[  102.374479]  ? device_driver_attach+0xb0/0xb0
[  102.375088]  ? device_driver_attach+0xb0/0xb0
[  102.375703]  bus_for_each_dev+0x78/0xc0
[  102.376238]  bus_add_driver+0x12b/0x1e0
[  102.376774]  driver_register+0x8b/0xe0
[  102.377320]  ? 0xffffffffc066b000
[  102.377795]  do_one_initcall+0x44/0x1d0
[  102.378331]  ? do_init_module+0x23/0x260
[  102.378882]  ? kmem_cache_alloc_trace+0xf5/0x200
[  102.379564]  do_init_module+0x5c/0x260
[  102.380103]  __do_sys_finit_module+0xb1/0x110
[  102.380712]  do_syscall_64+0x33/0x80
[  102.381224]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  102.382042] RIP: 0033:0x7fe80e7249b9
[  102.382568] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a7 54 0c 00 f7 d8 6
[  102.385147] RSP: 002b:00007fff230ece08 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[  102.386254] RAX: ffffffffffffffda RBX: 0000557d574f2c70 RCX: 00007fe80e7249b9
[  102.387255] RDX: 0000000000000000 RSI: 0000557d55782260 RDI: 0000000000000003
[  102.388268] RBP: 0000000000040000 R08: 0000000000000000 R09: 0000557d574f2e30
[  102.389271] R10: 0000000000000003 R11: 0000000000000246 R12: 0000557d55782260
[  102.390271] R13: 0000000000000000 R14: 0000557d574f2d80 R15: 0000557d574f2c70
[  102.391383] [drm:amdgpu_atombios_init [amdgpu]] *ERROR* Failed to create device file for VBIOS version
[  102.392666] amdgpu 0000:06:00.0: amdgpu: amdgpu_atombios_init failed
[  102.397325] amdgpu 0000:06:00.0: amdgpu: Fatal error during GPU init
[  102.398982] amdgpu: probe of 0000:06:00.0 failed with error -17

Audio device fails after first reset

After the first reset, HDMI audio devices usually crash and show up as unrecoverable in the Windows device manager. This has been reported with other OSes as well.

Navi 14 - Radeon Pro W5500 Support ?

Hi,

I see that there is some Navi 14 devices supported, but not the Radeon Pro W5500.
I wonder if it is not listed as "not tested", or is this reset specific for each card, meaning it will not work for sure and you should not bother trying ?

Many thanks in advance !

How to enable these options? Ubuntu 20.04

Requirements
Ensure your kernel has the following options enabled:

CONFIG_FTRACE=y
CONFIG_KPROBES=y
CONFIG_PCI_QUIRKS=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_FUNCTION_TRACER=y

Feature Request: Instructions for kernels with CONFIG_MODULES=n

Hi, thanks for writing this!
I have a GPU affected by this issue, and would like to integrate it into the kernel source tree.
I don't have much experience adding modules, but would like to learn.
I think I would no longer need the hook, patch pci_dev_specific_reset directly, but would still need the IOCTL and userspace util?
This is a feature request, so feel free to close this.

Radeon Pro W5700 not working

Hi,

I use this kernel module in Unraid 6.10.1 system. However, It failed to reboot the macOS 12.4 guest OS.

System info

# uname -a
Linux DellTower 5.15.40-Unraid #1 SMP Mon May 16 10:05:44 PDT 2022 x86_64 Intel(R) Xeon(R) Gold 6151 CPU @ 3.00GHz GenuineIntel GNU/Linux

# virsh version --daemon
Compiled against library: libvirt 8.2.0
Using library: libvirt 8.2.0
Using API: QEMU 8.2.0
Running hypervisor: QEMU 6.2.0
Running against daemon: 8.2.0

# lspci -nnv | grep -A 200 'Navi 10'
b3:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch [1002:1478] (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 25, NUMA node 0, IOMMU group 92
        Memory at fbe00000 (32-bit, non-prefetchable) [size=16K]
        Bus: primary=b3, secondary=b4, subordinate=b5, sec-latency=0
        I/O behind bridge: 0000f000-0000ffff [size=4K]
        Memory behind bridge: fbc00000-fbdfffff [size=2M]
        Prefetchable memory behind bridge: 00003800e0000000-00003800f01fffff [size=258M]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Upstream Port, MSI 00
        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [270] Secondary PCI Express
        Capabilities: [320] Latency Tolerance Reporting
        Capabilities: [400] Data Link Feature <?>
        Capabilities: [410] Physical Layer 16.0 GT/s <?>
        Capabilities: [440] Lane Margining at the Receiver <?>
        Kernel driver in use: pcieport

b4:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch [1002:1479] (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 36, NUMA node 0, IOMMU group 93
        Bus: primary=b4, secondary=b5, subordinate=b5, sec-latency=0
        I/O behind bridge: 0000f000-0000ffff [size=4K]
        Memory behind bridge: fbc00000-fbdfffff [size=2M]
        Prefetchable memory behind bridge: 00003800e0000000-00003800f01fffff [size=258M]
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Downstream Port (Slot-), MSI 00
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [c0] Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch [1002:1479]
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [270] Secondary PCI Express
        Capabilities: [2a0] Access Control Services
        Capabilities: [400] Data Link Feature <?>
        Capabilities: [410] Physical Layer 16.0 GT/s <?>
        Capabilities: [440] Lane Margining at the Receiver <?>
        Kernel driver in use: pcieport

b5:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon Pro W5700] [1002:7312] (prog-if 00 [VGA controller])
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon Pro W5700] [1002:031e]
        Flags: bus master, fast devsel, latency 0, IRQ 230, NUMA node 0, IOMMU group 94
        Memory at 3800e0000000 (64-bit, prefetchable) [size=256M]
        Memory at 3800f0000000 (64-bit, prefetchable) [size=2M]
        I/O ports at f000 [size=256]
        Memory at fbd00000 (32-bit, non-prefetchable) [size=512K]
        Expansion ROM at fbd80000 [disabled] [size=128K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [200] Physical Resizable BAR
        Capabilities: [240] Power Budgeting <?>
        Capabilities: [270] Secondary PCI Express
        Capabilities: [2a0] Access Control Services
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Capabilities: [320] Latency Tolerance Reporting
        Capabilities: [400] Data Link Feature <?>
        Capabilities: [410] Physical Layer 16.0 GT/s <?>
        Capabilities: [440] Lane Margining at the Receiver <?>
        Kernel driver in use: vfio-pci
        Kernel modules: amdgpu

b5:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38]
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38]
        Flags: bus master, fast devsel, latency 0, IRQ 226, NUMA node 0, IOMMU group 95
        Memory at fbda4000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [2a0] Access Control Services
        Kernel driver in use: vfio-pci

b5:00.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:7316] (prog-if 30 [XHCI])
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:7316]
        Flags: bus master, fast devsel, latency 0, IRQ 229, NUMA node 0, IOMMU group 96
        Memory at fbc00000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable+ Count=1/8 Maskable- 64bit+
        Capabilities: [c0] MSI-X: Enable- Count=8 Masked-
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [2a0] Access Control Services
        Kernel driver in use: vfio-pci

b5:00.3 Serial bus controller [0c80]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 USB [1002:7314]
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 USB [1002:0408]
        Flags: bus master, fast devsel, latency 0, IRQ 228, NUMA node 0, IOMMU group 97
        Memory at fbda0000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable- Count=1/2 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [2a0] Access Control Services
        Kernel driver in use: vfio-pci

Logs

[  192.261788] vfio-pci 0000:b5:00.0: enabling device (0140 -> 0143)
[  192.261959] vfio-pci 0000:b5:00.0: AMD_NAVI10: version 1.1
[  192.261964] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing pre-reset
[  192.273790] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing reset
[  192.369467] ATOM BIOS: 113-D1880201-101
[  192.369468] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  192.530505] vfio-pci 0000:b5:00.0: AMD_NAVI10: bus reset disabled? yes
[  192.530509] vfio-pci 0000:b5:00.0: AMD_NAVI10: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  192.530513] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing post-reset
[  192.553773] vfio-pci 0000:b5:00.0: AMD_NAVI10: reset result = 0
[  192.553917] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
[  192.553930] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
[  192.553936] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x25@0x400
[  192.553939] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x26@0x410
[  192.553943] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x27@0x440
[  192.677908] vfio-pci 0000:b5:00.0: AMD_NAVI10: version 1.1
[  192.677917] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing pre-reset
[  192.678130] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing reset
[  192.774548] ATOM BIOS: 113-D1880201-101
[  192.774550] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  192.935669] vfio-pci 0000:b5:00.0: AMD_NAVI10: bus reset disabled? yes
[  192.935673] vfio-pci 0000:b5:00.0: AMD_NAVI10: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  192.935676] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing post-reset
[  192.959785] vfio-pci 0000:b5:00.0: AMD_NAVI10: reset result = 0
[  594.894935] br0: port 2(vnet0) entered disabled state
[  594.895434] device vnet0 left promiscuous mode
[  594.895436] br0: port 2(vnet0) entered disabled state
[  595.087926] vfio-pci 0000:b5:00.0: AMD_NAVI10: version 1.1
[  595.087930] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing pre-reset
[  595.099883] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing reset
[  595.197259] ATOM BIOS: 113-D1880201-101
[  595.197260] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  595.197263] vfio-pci 0000:b5:00.0: AMD_NAVI10: bus reset disabled? yes
[  595.197266] vfio-pci 0000:b5:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: f9c3e8e, mp1 intr enabled? yes, bl ready? yes
[  595.197268] vfio-pci 0000:b5:00.0: AMD_NAVI10: Clearing scratch regs 6 and 7
[  595.197391] vfio-pci 0000:b5:00.0: AMD_NAVI10: begin psp mode 1 reset
[  595.704843] vfio-pci 0000:b5:00.0: AMD_NAVI10: mode1 reset succeeded
[  606.104771] vfio-pci 0000:b5:00.0: AMD_NAVI10: timed out waiting for PSP bootloader to respond after reset
[  606.104786] vfio-pci 0000:b5:00.0: AMD_NAVI10: failed to reset device
[  606.104789] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing post-reset
[  606.116781] vfio-pci 0000:b5:00.1: refused to change power state from D0 to D3hot
[  606.116796] vfio-pci 0000:b5:00.0: AMD_NAVI10: reset result = 0
[  606.128769] vfio-pci 0000:b5:00.0: refused to change power state from D0 to D3hot
[  616.089565] br0: port 2(vnet1) entered blocking state
[  616.089570] br0: port 2(vnet1) entered disabled state
[  616.089608] device vnet1 entered promiscuous mode
[  616.089739] br0: port 2(vnet1) entered blocking state
[  616.089741] br0: port 2(vnet1) entered forwarding state
[  621.995481] vfio-pci 0000:b5:00.0: enabling device (0400 -> 0403)
[  621.995598] vfio-pci 0000:b5:00.0: AMD_NAVI10: version 1.1
[  621.995600] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing pre-reset
[  621.995752] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing reset
[  621.996234] vendor-reset-drm: invalid ip discovery binary signature
[  621.996235] vendor-reset-drm: amdgpu_discovery_init failed
[  621.996235] vfio-pci 0000:b5:00.0: AMD_NAVI10: amdgpu_discovery_reg_base_init failed, using legacy method
[  622.091053] ATOM BIOS: 113-D1880201-101
[  622.091054] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  622.252370] vfio-pci 0000:b5:00.0: AMD_NAVI10: bus reset disabled? yes
[  622.252373] vfio-pci 0000:b5:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: 0, mp1 intr enabled? no, bl ready? no
[  622.252375] vfio-pci 0000:b5:00.0: AMD_NAVI10: Clearing scratch regs 6 and 7
[  622.252376] vfio-pci 0000:b5:00.0: AMD_NAVI10: begin psp mode 1 reset
[  622.413796] vfio-pci 0000:b5:00.0: AMD_NAVI10: timed out waiting for PSP to reach valid state, but continuing anyway
[  623.081794] vfio-pci 0000:b5:00.0: AMD_NAVI10: PSP did not acknowledger reset
[  623.081867] vfio-pci 0000:b5:00.0: AMD_NAVI10: failed to reset device
[  623.081869] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing post-reset
[  623.093768] vfio-pci 0000:b5:00.1: refused to change power state from D0 to D3hot
[  623.093781] vfio-pci 0000:b5:00.0: AMD_NAVI10: reset result = 0
[  623.093923] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
[  623.093935] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
[  623.093941] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x25@0x400
[  623.093944] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x26@0x410
[  623.093947] vfio-pci 0000:b5:00.0: vfio_ecap_init: hiding ecap 0x27@0x440
[  623.108774] vfio-pci 0000:b5:00.2: enabling device (0000 -> 0002)
[  623.121774] vfio-pci 0000:b5:00.3: enabling device (0000 -> 0002)
[  623.170960] vfio-pci 0000:b5:00.0: AMD_NAVI10: version 1.1
[  623.170969] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing pre-reset
[  623.171177] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing reset
[  623.171734] vendor-reset-drm: invalid ip discovery binary signature
[  623.171735] vendor-reset-drm: amdgpu_discovery_init failed
[  623.171736] vfio-pci 0000:b5:00.0: AMD_NAVI10: amdgpu_discovery_reg_base_init failed, using legacy method
[  623.266827] ATOM BIOS: 113-D1880201-101
[  623.266828] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  623.428138] vfio-pci 0000:b5:00.0: AMD_NAVI10: bus reset disabled? yes
[  623.428141] vfio-pci 0000:b5:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: 0, mp1 intr enabled? no, bl ready? no
[  623.428143] vfio-pci 0000:b5:00.0: AMD_NAVI10: Clearing scratch regs 6 and 7
[  623.428144] vfio-pci 0000:b5:00.0: AMD_NAVI10: begin psp mode 1 reset
[  623.589605] vfio-pci 0000:b5:00.0: AMD_NAVI10: timed out waiting for PSP to reach valid state, but continuing anyway
[  624.258545] vfio-pci 0000:b5:00.0: AMD_NAVI10: PSP did not acknowledger reset
[  624.258618] vfio-pci 0000:b5:00.0: AMD_NAVI10: failed to reset device
[  624.258620] vfio-pci 0000:b5:00.0: AMD_NAVI10: performing post-reset
[  624.270761] vfio-pci 0000:b5:00.1: refused to change power state from D0 to D3hot
[  624.270775] vfio-pci 0000:b5:00.0: AMD_NAVI10: reset result = 0

Thanks a lot.

Best regards,
Beikesea

Feature Request: Module Version for modinfo

@gnif ok not a bug but a feature request ... ;-P

In the module the Version number is missing. MODULE_VERSION is not set!
dkms use this information to replace the module if nessesarry. In my case it does not update the vendor-reset.ko 0.0.18 with the new 0.0.19 (audio reset branch).

Originally posted by @netinetwalker in #19 (comment)

xfx pro thicc 3 5600 xt navi and audio

Just discovered this vendor-reset module today. Tried your reset kernel patches in the past with never any luck. Only problem I have with this vendor-reset is that the hdmi audio for the card goes away or doesn't reset properly after one restart, shutdown. I have to restart the host to get it back.

Gentoo. 1900x threadripper, xfx pro thicc 3 5600 xt navi, asrock-x399-phantom-gaming-6.

I'm gonna try disabling acs in the uefi bios and see if that helps.
Appreciate all your hard work.

After I tested again with acs disabled in the bios audio works when I restart windows 10, but after a shutdown I have to completely shutdown the host to get it back.



IOMMU Group 32:
	44:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] [1002:731f] (rev ca)
IOMMU Group 33:
	44:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38]

Maybe cause my audio and vga are in different groups? It works perfect the first time.

[ 4088.164275] vfio-pci 0000:44:00.1: disabling bus mastering
[ 4088.164355] vfio-pci 0000:44:00.1: restoring config space at offset 0x4 (was 0x100400, writing 0x100002)
[ 4088.175538] vfio-pci 0000:44:00.0: disabling bus mastering
[ 4088.175656] vfio-pci 0000:44:00.0: AMD_NAVI10: version 1.1
[ 4088.175657] vfio-pci 0000:44:00.0: AMD_NAVI10: performing pre-reset
[ 4088.175677] vfio-pci 0000:44:00.0: saving config space at offset 0x0 (reading 0x731f1002)
[ 4088.175679] vfio-pci 0000:44:00.0: saving config space at offset 0x4 (reading 0x100400)
[ 4088.175681] vfio-pci 0000:44:00.0: saving config space at offset 0x8 (reading 0x30000ca)
[ 4088.175683] vfio-pci 0000:44:00.0: saving config space at offset 0xc (reading 0x800010)
[ 4088.175685] vfio-pci 0000:44:00.0: saving config space at offset 0x10 (reading 0xc000000c)
[ 4088.175687] vfio-pci 0000:44:00.0: saving config space at offset 0x14 (reading 0x7fc)
[ 4088.175688] vfio-pci 0000:44:00.0: saving config space at offset 0x18 (reading 0xd000000c)
[ 4088.175690] vfio-pci 0000:44:00.0: saving config space at offset 0x1c (reading 0x7fc)
[ 4088.175692] vfio-pci 0000:44:00.0: saving config space at offset 0x20 (reading 0x3001)
[ 4088.175694] vfio-pci 0000:44:00.0: saving config space at offset 0x24 (reading 0x82300000)
[ 4088.175696] vfio-pci 0000:44:00.0: saving config space at offset 0x28 (reading 0x0)
[ 4088.175697] vfio-pci 0000:44:00.0: saving config space at offset 0x2c (reading 0x57101682)
[ 4088.175698] vfio-pci 0000:44:00.0: saving config space at offset 0x30 (reading 0x82380000)
[ 4088.175700] vfio-pci 0000:44:00.0: saving config space at offset 0x34 (reading 0x48)
[ 4088.175701] vfio-pci 0000:44:00.0: saving config space at offset 0x38 (reading 0x0)
[ 4088.175702] vfio-pci 0000:44:00.0: saving config space at offset 0x3c (reading 0x1ff)
[ 4088.175750] vfio-pci 0000:44:00.0: AMD_NAVI10: performing reset
[ 4088.275033] ATOM BIOS: 113-170WBNAVIXLE6GB_MIC_191122_W8
[ 4088.275036] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[ 4088.275039] vfio-pci 0000:44:00.0: AMD_NAVI10: bus reset disabled? yes
[ 4088.275043] vfio-pci 0000:44:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: fda1001, mp1 intr enabled? yes, bl ready? yes
[ 4088.275044] vfio-pci 0000:44:00.0: AMD_NAVI10: Clearing scratch regs 6 and 7
[ 4088.275086] vfio-pci 0000:44:00.0: AMD_NAVI10: begin psp mode 1 reset
[ 4088.275089] vfio-pci 0000:44:00.0: saving config space at offset 0x0 (reading 0x731f1002)
[ 4088.275090] vfio-pci 0000:44:00.0: saving config space at offset 0x4 (reading 0x100402)
[ 4088.275091] vfio-pci 0000:44:00.0: saving config space at offset 0x8 (reading 0x30000ca)
[ 4088.275093] vfio-pci 0000:44:00.0: saving config space at offset 0xc (reading 0x800010)
[ 4088.275094] vfio-pci 0000:44:00.0: saving config space at offset 0x10 (reading 0xc000000c)
[ 4088.275095] vfio-pci 0000:44:00.0: saving config space at offset 0x14 (reading 0x7fc)
[ 4088.275097] vfio-pci 0000:44:00.0: saving config space at offset 0x18 (reading 0xd000000c)
[ 4088.275098] vfio-pci 0000:44:00.0: saving config space at offset 0x1c (reading 0x7fc)
[ 4088.275099] vfio-pci 0000:44:00.0: saving config space at offset 0x20 (reading 0x3001)
[ 4088.275100] vfio-pci 0000:44:00.0: saving config space at offset 0x24 (reading 0x82300000)
[ 4088.275102] vfio-pci 0000:44:00.0: saving config space at offset 0x28 (reading 0x0)
[ 4088.275103] vfio-pci 0000:44:00.0: saving config space at offset 0x2c (reading 0x57101682)
[ 4088.275104] vfio-pci 0000:44:00.0: saving config space at offset 0x30 (reading 0x82380000)
[ 4088.275106] vfio-pci 0000:44:00.0: saving config space at offset 0x34 (reading 0x48)
[ 4088.275107] vfio-pci 0000:44:00.0: saving config space at offset 0x38 (reading 0x0)
[ 4088.275108] vfio-pci 0000:44:00.0: saving config space at offset 0x3c (reading 0x1ff)
[ 4088.779533] vfio-pci 0000:44:00.0: AMD_NAVI10: mode1 reset succeeded
[ 4088.779585] vfio-pci 0000:44:00.0: restoring config space at offset 0x30 (was 0x0, writing 0x82380000)
[ 4088.779589] vfio-pci 0000:44:00.0: restoring config space at offset 0x24 (was 0x0, writing 0x82300000)
[ 4088.779592] vfio-pci 0000:44:00.0: restoring config space at offset 0x20 (was 0x1, writing 0x3001)
[ 4088.779595] vfio-pci 0000:44:00.0: restoring config space at offset 0x1c (was 0x0, writing 0x7fc)
[ 4088.779598] vfio-pci 0000:44:00.0: restoring config space at offset 0x18 (was 0xc, writing 0xd000000c)
[ 4088.779601] vfio-pci 0000:44:00.0: restoring config space at offset 0x14 (was 0x0, writing 0x7fc)
[ 4088.779604] vfio-pci 0000:44:00.0: restoring config space at offset 0x10 (was 0xc, writing 0xc000000c)
[ 4088.779606] vfio-pci 0000:44:00.0: restoring config space at offset 0xc (was 0x800000, writing 0x800010)
[ 4088.779609] vfio-pci 0000:44:00.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100402)
[ 4090.339540] vfio-pci 0000:44:00.0: AMD_NAVI10: PSP mode1 reset successful
[ 4090.339545] vfio-pci 0000:44:00.0: AMD_NAVI10: performing post-reset
[ 4090.339608] vfio-pci 0000:44:00.0: restoring config space at offset 0x1c (was 0x0, writing 0x7fc)
[ 4090.339611] vfio-pci 0000:44:00.0: restoring config space at offset 0x18 (was 0xc, writing 0xd000000c)
[ 4090.339614] vfio-pci 0000:44:00.0: restoring config space at offset 0x14 (was 0x0, writing 0x7fc)
[ 4090.339617] vfio-pci 0000:44:00.0: restoring config space at offset 0x10 (was 0xc, writing 0xc000000c)
[ 4090.339622] vfio-pci 0000:44:00.0: restoring config space at offset 0x4 (was 0x100402, writing 0x100400)
[ 4090.351526] vfio-pci 0000:44:00.0: AMD_NAVI10: reset result = 0
[ 4099.631594] snd_hda_intel 0000:41:00.1: saving config space at offset 0x0 (reading 0xaae01002)
[ 4099.631597] snd_hda_intel 0000:41:00.1: saving config space at offset 0x4 (reading 0x100406)
[ 4099.631600] snd_hda_intel 0000:41:00.1: saving config space at offset 0x8 (reading 0x4030000)
[ 4099.631602] snd_hda_intel 0000:41:00.1: saving config space at offset 0xc (reading 0x800010)
[ 4099.631604] snd_hda_intel 0000:41:00.1: saving config space at offset 0x10 (reading 0x82660004)
[ 4099.631606] snd_hda_intel 0000:41:00.1: saving config space at offset 0x14 (reading 0x0)
[ 4099.631608] snd_hda_intel 0000:41:00.1: saving config space at offset 0x18 (reading 0x0)
[ 4099.631610] snd_hda_intel 0000:41:00.1: saving config space at offset 0x1c (reading 0x0)
[ 4099.631612] snd_hda_intel 0000:41:00.1: saving config space at offset 0x20 (reading 0x0)
[ 4099.631613] snd_hda_intel 0000:41:00.1: saving config space at offset 0x24 (reading 0x0)
[ 4099.631615] snd_hda_intel 0000:41:00.1: saving config space at offset 0x28 (reading 0x0)
[ 4099.631617] snd_hda_intel 0000:41:00.1: saving config space at offset 0x2c (reading 0xaae01682)
[ 4099.631619] snd_hda_intel 0000:41:00.1: saving config space at offset 0x30 (reading 0x0)
[ 4099.631620] snd_hda_intel 0000:41:00.1: saving config space at offset 0x34 (reading 0x48)
[ 4099.631622] snd_hda_intel 0000:41:00.1: saving config space at offset 0x38 (reading 0x0)
[ 4099.631624] snd_hda_intel 0000:41:00.1: saving config space at offset 0x3c (reading 0x2ff)
[ 4201.565765] virbr0: port 1(vnet2) entered blocking state
[ 4201.565767] virbr0: port 1(vnet2) entered disabled state
[ 4201.565805] device vnet2 entered promiscuous mode
[ 4201.566972] virbr0: port 1(vnet2) entered blocking state
[ 4201.566974] virbr0: port 1(vnet2) entered listening state
[ 4201.572552] virbr1: port 1(vnet3) entered blocking state
[ 4201.572555] virbr1: port 1(vnet3) entered disabled state
[ 4201.572598] device vnet3 entered promiscuous mode
[ 4201.572696] virbr1: port 1(vnet3) entered blocking state
[ 4201.572697] virbr1: port 1(vnet3) entered listening state
[ 4203.603500] virbr1: port 1(vnet3) entered learning state
[ 4203.603523] virbr0: port 1(vnet2) entered learning state
[ 4204.590520] vfio-pci 0000:44:00.0: enabling device (0400 -> 0403)
[ 4204.590580] vfio-pci 0000:44:00.0: saving config space at offset 0x0 (reading 0x731f1002)
[ 4204.590581] vfio-pci 0000:44:00.0: saving config space at offset 0x4 (reading 0x100003)
[ 4204.590583] vfio-pci 0000:44:00.0: saving config space at offset 0x8 (reading 0x30000ca)
[ 4204.590584] vfio-pci 0000:44:00.0: saving config space at offset 0xc (reading 0x800010)
[ 4204.590586] vfio-pci 0000:44:00.0: saving config space at offset 0x10 (reading 0xc000000c)
[ 4204.590587] vfio-pci 0000:44:00.0: saving config space at offset 0x14 (reading 0x7fc)
[ 4204.590589] vfio-pci 0000:44:00.0: saving config space at offset 0x18 (reading 0xd000000c)
[ 4204.590590] vfio-pci 0000:44:00.0: saving config space at offset 0x1c (reading 0x7fc)
[ 4204.590591] vfio-pci 0000:44:00.0: saving config space at offset 0x20 (reading 0x3001)
[ 4204.590593] vfio-pci 0000:44:00.0: saving config space at offset 0x24 (reading 0x82300000)
[ 4204.590594] vfio-pci 0000:44:00.0: saving config space at offset 0x28 (reading 0x0)
[ 4204.590595] vfio-pci 0000:44:00.0: saving config space at offset 0x2c (reading 0x57101682)
[ 4204.590597] vfio-pci 0000:44:00.0: saving config space at offset 0x30 (reading 0x82380000)
[ 4204.590598] vfio-pci 0000:44:00.0: saving config space at offset 0x34 (reading 0x48)
[ 4204.590599] vfio-pci 0000:44:00.0: saving config space at offset 0x38 (reading 0x0)
[ 4204.590601] vfio-pci 0000:44:00.0: saving config space at offset 0x3c (reading 0x1ff)
[ 4204.590648] vfio-pci 0000:44:00.0: AMD_NAVI10: version 1.1
[ 4204.590649] vfio-pci 0000:44:00.0: AMD_NAVI10: performing pre-reset
[ 4204.590674] vfio-pci 0000:44:00.0: saving config space at offset 0x0 (reading 0x731f1002)
[ 4204.590675] vfio-pci 0000:44:00.0: saving config space at offset 0x4 (reading 0x100400)
[ 4204.590676] vfio-pci 0000:44:00.0: saving config space at offset 0x8 (reading 0x30000ca)
[ 4204.590678] vfio-pci 0000:44:00.0: saving config space at offset 0xc (reading 0x800010)
[ 4204.590679] vfio-pci 0000:44:00.0: saving config space at offset 0x10 (reading 0xc000000c)
[ 4204.590680] vfio-pci 0000:44:00.0: saving config space at offset 0x14 (reading 0x7fc)
[ 4204.590682] vfio-pci 0000:44:00.0: saving config space at offset 0x18 (reading 0xd000000c)
[ 4204.590683] vfio-pci 0000:44:00.0: saving config space at offset 0x1c (reading 0x7fc)
[ 4204.590684] vfio-pci 0000:44:00.0: saving config space at offset 0x20 (reading 0x3001)
[ 4204.590685] vfio-pci 0000:44:00.0: saving config space at offset 0x24 (reading 0x82300000)
[ 4204.590687] vfio-pci 0000:44:00.0: saving config space at offset 0x28 (reading 0x0)
[ 4204.590688] vfio-pci 0000:44:00.0: saving config space at offset 0x2c (reading 0x57101682)
[ 4204.590689] vfio-pci 0000:44:00.0: saving config space at offset 0x30 (reading 0x82380000)
[ 4204.590691] vfio-pci 0000:44:00.0: saving config space at offset 0x34 (reading 0x48)
[ 4204.590692] vfio-pci 0000:44:00.0: saving config space at offset 0x38 (reading 0x0)
[ 4204.590693] vfio-pci 0000:44:00.0: saving config space at offset 0x3c (reading 0x1ff)
[ 4204.590737] vfio-pci 0000:44:00.0: AMD_NAVI10: performing reset
[ 4204.689276] ATOM BIOS: 113-170WBNAVIXLE6GB_MIC_191122_W8
[ 4204.689277] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[ 4204.904538] vfio-pci 0000:44:00.0: AMD_NAVI10: bus reset disabled? yes
[ 4204.904542] vfio-pci 0000:44:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[ 4204.904545] vfio-pci 0000:44:00.0: AMD_NAVI10: performing post-reset
[ 4204.904600] vfio-pci 0000:44:00.0: restoring config space at offset 0x1c (was 0x0, writing 0x7fc)
[ 4204.904602] vfio-pci 0000:44:00.0: restoring config space at offset 0x18 (was 0xc, writing 0xd000000c)
[ 4204.904605] vfio-pci 0000:44:00.0: restoring config space at offset 0x14 (was 0x0, writing 0x7fc)
[ 4204.904608] vfio-pci 0000:44:00.0: restoring config space at offset 0x10 (was 0xc, writing 0xc000000c)
[ 4204.904612] vfio-pci 0000:44:00.0: restoring config space at offset 0x4 (was 0x100402, writing 0x100400)
[ 4204.916512] vfio-pci 0000:44:00.0: AMD_NAVI10: reset result = 0
[ 4204.916515] vfio-pci 0000:44:00.0: saving config space at offset 0x0 (reading 0x731f1002)
[ 4204.916516] vfio-pci 0000:44:00.0: saving config space at offset 0x4 (reading 0x100400)
[ 4204.916517] vfio-pci 0000:44:00.0: saving config space at offset 0x8 (reading 0x30000ca)
[ 4204.916519] vfio-pci 0000:44:00.0: saving config space at offset 0xc (reading 0x800010)
[ 4204.916520] vfio-pci 0000:44:00.0: saving config space at offset 0x10 (reading 0xc000000c)
[ 4204.916522] vfio-pci 0000:44:00.0: saving config space at offset 0x14 (reading 0x7fc)
[ 4204.916523] vfio-pci 0000:44:00.0: saving config space at offset 0x18 (reading 0xd000000c)
[ 4204.916524] vfio-pci 0000:44:00.0: saving config space at offset 0x1c (reading 0x7fc)
[ 4204.916526] vfio-pci 0000:44:00.0: saving config space at offset 0x20 (reading 0x3001)
[ 4204.916527] vfio-pci 0000:44:00.0: saving config space at offset 0x24 (reading 0x82300000)
[ 4204.916528] vfio-pci 0000:44:00.0: saving config space at offset 0x28 (reading 0x0)
[ 4204.916530] vfio-pci 0000:44:00.0: saving config space at offset 0x2c (reading 0x57101682)
[ 4204.916531] vfio-pci 0000:44:00.0: saving config space at offset 0x30 (reading 0x82380000)
[ 4204.916532] vfio-pci 0000:44:00.0: saving config space at offset 0x34 (reading 0x48)
[ 4204.916534] vfio-pci 0000:44:00.0: saving config space at offset 0x38 (reading 0x0)
[ 4204.916535] vfio-pci 0000:44:00.0: saving config space at offset 0x3c (reading 0x1ff)
[ 4204.916637] vfio-pci 0000:44:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
[ 4204.916645] vfio-pci 0000:44:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
[ 4204.916649] vfio-pci 0000:44:00.0: vfio_ecap_init: hiding ecap 0x25@0x400
[ 4204.916650] vfio-pci 0000:44:00.0: vfio_ecap_init: hiding ecap 0x26@0x410
[ 4204.916651] vfio-pci 0000:44:00.0: vfio_ecap_init: hiding ecap 0x27@0x440
[ 4204.930527] vfio-pci 0000:44:00.1: enabling device (0000 -> 0002)
[ 4204.930574] vfio-pci 0000:44:00.1: saving config space at offset 0x0 (reading 0xab381002)
[ 4204.930576] vfio-pci 0000:44:00.1: saving config space at offset 0x4 (reading 0x100002)
[ 4204.930578] vfio-pci 0000:44:00.1: saving config space at offset 0x8 (reading 0x4030000)
[ 4204.930579] vfio-pci 0000:44:00.1: saving config space at offset 0xc (reading 0x800000)
[ 4204.930581] vfio-pci 0000:44:00.1: saving config space at offset 0x10 (reading 0x0)
[ 4204.930582] vfio-pci 0000:44:00.1: saving config space at offset 0x14 (reading 0x0)
[ 4204.930583] vfio-pci 0000:44:00.1: saving config space at offset 0x18 (reading 0x0)
[ 4204.930585] vfio-pci 0000:44:00.1: saving config space at offset 0x1c (reading 0x0)
[ 4204.930586] vfio-pci 0000:44:00.1: saving config space at offset 0x20 (reading 0x0)
[ 4204.930587] vfio-pci 0000:44:00.1: saving config space at offset 0x24 (reading 0x0)
[ 4204.930588] vfio-pci 0000:44:00.1: saving config space at offset 0x28 (reading 0x0)
[ 4204.930590] vfio-pci 0000:44:00.1: saving config space at offset 0x2c (reading 0xab381002)
[ 4204.930591] vfio-pci 0000:44:00.1: saving config space at offset 0x30 (reading 0x0)
[ 4204.930592] vfio-pci 0000:44:00.1: saving config space at offset 0x34 (reading 0x48)
[ 4204.930594] vfio-pci 0000:44:00.1: saving config space at offset 0x38 (reading 0x0)
[ 4204.930595] vfio-pci 0000:44:00.1: saving config space at offset 0x3c (reading 0x2ff)
[ 4204.971540] vfio-pci 0000:44:00.0: saving config space at offset 0x0 (reading 0x731f1002)
[ 4204.971542] vfio-pci 0000:44:00.0: saving config space at offset 0x4 (reading 0x100000)
[ 4204.971544] vfio-pci 0000:44:00.0: saving config space at offset 0x8 (reading 0x30000ca)
[ 4204.971545] vfio-pci 0000:44:00.0: saving config space at offset 0xc (reading 0x800010)
[ 4204.971547] vfio-pci 0000:44:00.0: saving config space at offset 0x10 (reading 0xc000000c)
[ 4204.971548] vfio-pci 0000:44:00.0: saving config space at offset 0x14 (reading 0x7fc)
[ 4204.971549] vfio-pci 0000:44:00.0: saving config space at offset 0x18 (reading 0xd000000c)
[ 4204.971551] vfio-pci 0000:44:00.0: saving config space at offset 0x1c (reading 0x7fc)
[ 4204.971552] vfio-pci 0000:44:00.0: saving config space at offset 0x20 (reading 0x3001)
[ 4204.971553] vfio-pci 0000:44:00.0: saving config space at offset 0x24 (reading 0x82300000)
[ 4204.971555] vfio-pci 0000:44:00.0: saving config space at offset 0x28 (reading 0x0)
[ 4204.971556] vfio-pci 0000:44:00.0: saving config space at offset 0x2c (reading 0x57101682)
[ 4204.971557] vfio-pci 0000:44:00.0: saving config space at offset 0x30 (reading 0x82380000)
[ 4204.971559] vfio-pci 0000:44:00.0: saving config space at offset 0x34 (reading 0x48)
[ 4204.971560] vfio-pci 0000:44:00.0: saving config space at offset 0x38 (reading 0x0)
[ 4204.971561] vfio-pci 0000:44:00.0: saving config space at offset 0x3c (reading 0x1ff)
[ 4204.971609] vfio-pci 0000:44:00.0: AMD_NAVI10: version 1.1
[ 4204.971610] vfio-pci 0000:44:00.0: AMD_NAVI10: performing pre-reset
[ 4204.971638] vfio-pci 0000:44:00.0: saving config space at offset 0x0 (reading 0x731f1002)
[ 4204.971639] vfio-pci 0000:44:00.0: saving config space at offset 0x4 (reading 0x100400)
[ 4204.971640] vfio-pci 0000:44:00.0: saving config space at offset 0x8 (reading 0x30000ca)
[ 4204.971642] vfio-pci 0000:44:00.0: saving config space at offset 0xc (reading 0x800010)
[ 4204.971643] vfio-pci 0000:44:00.0: saving config space at offset 0x10 (reading 0xc000000c)
[ 4204.971644] vfio-pci 0000:44:00.0: saving config space at offset 0x14 (reading 0x7fc)
[ 4204.971646] vfio-pci 0000:44:00.0: saving config space at offset 0x18 (reading 0xd000000c)
[ 4204.971647] vfio-pci 0000:44:00.0: saving config space at offset 0x1c (reading 0x7fc)
[ 4204.971648] vfio-pci 0000:44:00.0: saving config space at offset 0x20 (reading 0x3001)
[ 4204.971649] vfio-pci 0000:44:00.0: saving config space at offset 0x24 (reading 0x82300000)
[ 4204.971651] vfio-pci 0000:44:00.0: saving config space at offset 0x28 (reading 0x0)
[ 4204.971652] vfio-pci 0000:44:00.0: saving config space at offset 0x2c (reading 0x57101682)
[ 4204.971653] vfio-pci 0000:44:00.0: saving config space at offset 0x30 (reading 0x82380000)
[ 4204.971655] vfio-pci 0000:44:00.0: saving config space at offset 0x34 (reading 0x48)
[ 4204.971656] vfio-pci 0000:44:00.0: saving config space at offset 0x38 (reading 0x0)
[ 4204.971657] vfio-pci 0000:44:00.0: saving config space at offset 0x3c (reading 0x1ff)
[ 4204.971702] vfio-pci 0000:44:00.0: AMD_NAVI10: performing reset
[ 4205.070265] ATOM BIOS: 113-170WBNAVIXLE6GB_MIC_191122_W8
[ 4205.070266] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[ 4205.285843] vfio-pci 0000:44:00.0: AMD_NAVI10: bus reset disabled? yes
[ 4205.285848] vfio-pci 0000:44:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[ 4205.285851] vfio-pci 0000:44:00.0: AMD_NAVI10: performing post-reset
[ 4205.285912] vfio-pci 0000:44:00.0: restoring config space at offset 0x1c (was 0x0, writing 0x7fc)
[ 4205.285915] vfio-pci 0000:44:00.0: restoring config space at offset 0x18 (was 0xc, writing 0xd000000c)
[ 4205.285918] vfio-pci 0000:44:00.0: restoring config space at offset 0x14 (was 0x0, writing 0x7fc)
[ 4205.285921] vfio-pci 0000:44:00.0: restoring config space at offset 0x10 (was 0xc, writing 0xc000000c)
[ 4205.285925] vfio-pci 0000:44:00.0: restoring config space at offset 0x4 (was 0x100402, writing 0x100400)
[ 4205.297527] vfio-pci 0000:44:00.0: AMD_NAVI10: reset result = 0

Navi14 W5500 support

I am trying to have GPU passthrough of a W5500. Passing through works on the first time a Linux guest VM is launched but fails after that VM is shut down an started again. The host is CentOS 8.3 running 4.18.0-240.10.1. I am aware this specific GPU is not in the supported devices list, but what could be done to include it?

First time VM launch

[  116.892875] vfio-pci 0000:86:00.0: enabling device (0142 -> 0143)
[  116.893018] vfio-pci 0000:86:00.0: AMD_NAVI14: version 1.1
[  116.893019] vfio-pci 0000:86:00.0: AMD_NAVI14: performing pre-reset
[  116.905913] vfio-pci 0000:86:00.0: AMD_NAVI14: performing reset
[  116.942304] ATOM BIOS: 113-D3250100-102
[  116.942306] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  117.183237] vfio-pci 0000:86:00.0: AMD_NAVI14: bus reset disabled? yes
[  117.183243] vfio-pci 0000:86:00.0: AMD_NAVI14: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  117.183247] vfio-pci 0000:86:00.0: AMD_NAVI14: performing post-reset
[  117.206872] vfio-pci 0000:86:00.0: AMD_NAVI14: reset result = 0
[  117.207039] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x19@0x270
[  117.207051] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x1b@0x2d0
[  117.207056] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x25@0x400
[  117.207057] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x26@0x410
[  117.207058] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x27@0x440
[  117.241993] vfio-pci 0000:86:00.0: AMD_NAVI14: version 1.1
[  117.241995] vfio-pci 0000:86:00.0: AMD_NAVI14: performing pre-reset
[  117.253918] vfio-pci 0000:86:00.0: AMD_NAVI14: performing reset
[  117.291160] ATOM BIOS: 113-D3250100-102
[  117.291162] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  117.531555] vfio-pci 0000:86:00.0: AMD_NAVI14: bus reset disabled? yes
[  117.531561] vfio-pci 0000:86:00.0: AMD_NAVI14: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  117.531565] vfio-pci 0000:86:00.0: AMD_NAVI14: performing post-reset
[  117.554883] vfio-pci 0000:86:00.0: AMD_NAVI14: reset result = 0

First time VM shutdown:

[  244.026532] vfio-pci 0000:86:00.0: AMD_NAVI14: version 1.1
[  244.026534] vfio-pci 0000:86:00.0: AMD_NAVI14: performing pre-reset
[  244.038373] vfio-pci 0000:86:00.0: AMD_NAVI14: performing reset
[  244.075239] ATOM BIOS: 113-D3250100-102
[  244.075241] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  244.075243] vfio-pci 0000:86:00.0: AMD_NAVI14: bus reset disabled? yes
[  244.075248] vfio-pci 0000:86:00.0: AMD_NAVI14: SMU response reg: 1, sol reg: 55fdd49, mp1 intr enabled? yes, bl ready? yes
[  244.075249] vfio-pci 0000:86:00.0: AMD_NAVI14: Clearing scratch regs 6 and 7
[  244.075277] vfio-pci 0000:86:00.0: AMD_NAVI14: begin psp mode 1 reset
[  244.582343] vfio-pci 0000:86:00.0: AMD_NAVI14: mode1 reset succeeded
[  244.582454] vfio-pci 0000:86:00.0: AMD_NAVI14: PSP mode1 reset successful
[  244.582458] vfio-pci 0000:86:00.0: AMD_NAVI14: performing post-reset
[  244.607340] vfio-pci 0000:86:00.0: AMD_NAVI14: reset result = 0

Start VM again:

[  322.460703] vfio-pci 0000:86:00.0: enabling device (0400 -> 0403)
[  322.460853] vfio-pci 0000:86:00.0: AMD_NAVI14: version 1.1
[  322.460854] vfio-pci 0000:86:00.0: AMD_NAVI14: performing pre-reset
[  322.472755] vfio-pci 0000:86:00.0: AMD_NAVI14: performing reset
[  322.509116] ATOM BIOS: 113-D3250100-102
[  322.509118] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  322.509121] vfio-pci 0000:86:00.0: AMD_NAVI14: bus reset disabled? yes
[  322.509126] vfio-pci 0000:86:00.0: AMD_NAVI14: SMU response reg: 1, sol reg: 55fdd49, mp1 intr enabled? yes, bl ready? yes
[  322.509127] vfio-pci 0000:86:00.0: AMD_NAVI14: Clearing scratch regs 6 and 7
[  322.509155] vfio-pci 0000:86:00.0: AMD_NAVI14: begin psp mode 1 reset
[  322.755198] vfio-pci 0000:86:00.0: AMD_NAVI14: timed out waiting for PSP to reach valid state, but continuing anyway
[  323.263760] vfio-pci 0000:86:00.0: AMD_NAVI14: mode1 reset succeeded
[  323.263870] vfio-pci 0000:86:00.0: AMD_NAVI14: PSP mode1 reset successful
[  323.263875] vfio-pci 0000:86:00.0: AMD_NAVI14: performing post-reset
[  323.287716] vfio-pci 0000:86:00.0: AMD_NAVI14: reset result = 0
[  323.287878] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x19@0x270
[  323.287891] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x1b@0x2d0
[  323.287895] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x25@0x400
[  323.287896] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x26@0x410
[  323.287898] vfio_ecap_init: 0000:86:00.0 hiding ecap 0x27@0x440
[  323.318822] vfio-pci 0000:86:00.0: AMD_NAVI14: version 1.1
[  323.318823] vfio-pci 0000:86:00.0: AMD_NAVI14: performing pre-reset
[  323.330749] vfio-pci 0000:86:00.0: AMD_NAVI14: performing reset
[  323.367851] ATOM BIOS: 113-D3250100-102
[  323.367853] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[  323.367855] vfio-pci 0000:86:00.0: AMD_NAVI14: bus reset disabled? yes
[  323.367860] vfio-pci 0000:86:00.0: AMD_NAVI14: SMU response reg: 1, sol reg: 55fdd49, mp1 intr enabled? yes, bl ready? yes
[  323.367861] vfio-pci 0000:86:00.0: AMD_NAVI14: Clearing scratch regs 6 and 7
[  323.367889] vfio-pci 0000:86:00.0: AMD_NAVI14: begin psp mode 1 reset
[  323.614481] vfio-pci 0000:86:00.0: AMD_NAVI14: timed out waiting for PSP to reach valid state, but continuing anyway
[  324.119785] vfio-pci 0000:86:00.0: AMD_NAVI14: mode1 reset succeeded
[  324.119894] vfio-pci 0000:86:00.0: AMD_NAVI14: PSP mode1 reset successful
[  324.119899] vfio-pci 0000:86:00.0: AMD_NAVI14: performing post-reset
[  324.143751] vfio-pci 0000:86:00.0: AMD_NAVI14: reset result = 0

Problem when switch between Win10 and Ubuntu20

Host: ubuntu 20.04.3
vm ubuntu20 and win10
GPU passed Radeon VII

Vendor-reset worked good when using ubuntu vm. But can not work when I shutdown ubuntu or win to switch to another one.

On vm win, this can not work as well. So I used radeon reset service to disable on shutdown and rescan when start up.

Although it can not work in vm windows, it is still the best solution and helped a lot in vm ubuntu. Thanks so much. No this script no my virtual machine.

AMD Embedded Radeon E9173

Sorry! I didn't know where else to put this!

This also works on: AMD Embedded Radeon E9173
Seen as:

81:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev 81)
81:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]

On:
Dell R630
5.11.22-5-pve

image

Compilation Error

Tried to dkms install . on linux-lqx 5.11.5 (Manjaro), could not compile:

Creating symlink /var/lib/dkms/vendor-reset/0.1.1/source ->
                 /usr/src/vendor-reset-0.1.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.11.5-lqx1-1-lqx KDIR=/usr/lib/modules/5.11.5-lqx1-1-lqx/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.11.5-lqx1-1-lqx (x86_64)
Consult /var/lib/dkms/vendor-reset/0.1.1/build/make.log for more information.

/var/lib/dkms/vendor-reset/0.1.1/build/make.log

DKMS make.log for vendor-reset-0.1.1 for kernel 5.11.5-lqx1-1-lqx (x86_64)
Чт 11 мар 2021 09:20:51 GMT
make -C /usr/lib/modules/5.11.5-lqx1-1-lqx/build M=/var/lib/dkms/vendor-reset/0.1.1/build modules
make[1]: Entering directory '/usr/lib/modules/5.11.5-lqx1-1-lqx/build'
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/module.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/vendor-reset-dev.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/ioctl.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/hook.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/common.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/compat.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/firmware.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/navi10.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/polaris10.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/vega10.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/vega20.o
  CC [M]  /var/lib/dkms/vendor-reset/0.1.1/build/src/amd/amdgpu/amdgpu_device.o
In file included from /var/lib/dkms/vendor-reset/0.1.1/build/src/hook.c:21:
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.h:33:21: error: field ‘ops’ has incomplete type
   33 |   struct ftrace_ops ops;
      |                     ^~~
In file included from /var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:27:
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.h:33:21: error: field ‘ops’ has incomplete type
   33 |   struct ftrace_ops ops;
      |                     ^~~
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:56:110: warning: ‘struct ftrace_regs’ declared inside parameter list will not be visible outside of this definition or declaration
   56 | static void notrace fh_trace_thunk(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *ops, struct ftrace_regs *fregs)
      |                                                                                                              ^~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:279: /var/lib/dkms/vendor-reset/0.1.1/build/src/hook.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c: In function ‘fh_trace_thunk’:
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:59:10: error: implicit declaration of function ‘ftrace_get_regs’ [-Werror=implicit-function-declaration]
   59 |   regs = ftrace_get_regs(fregs);
      |          ^~~~~~~~~~~~~~~
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:59:8: warning: assignment to ‘struct pt_regs *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   59 |   regs = ftrace_get_regs(fregs);
      |        ^
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:61:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   61 |   struct ftrace_hook *hook = to_ftrace_hook(ops);
      |   ^~~~~~
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c: In function ‘fh_install_hook’:
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:76:21: error: ‘FTRACE_OPS_FL_SAVE_REGS’ undeclared (first use in this function)
   76 |   hook->ops.flags = FTRACE_OPS_FL_SAVE_REGS |
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:76:21: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.c:77:21: error: ‘FTRACE_OPS_FL_IPMODIFY’ undeclared (first use in this function)
   77 |                     FTRACE_OPS_FL_IPMODIFY;
      |                     ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:279: /var/lib/dkms/vendor-reset/0.1.1/build/src/ftrace.o] Error 1
make[1]: *** [Makefile:1800: /var/lib/dkms/vendor-reset/0.1.1/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.11.5-lqx1-1-lqx/build'
make: *** [Makefile:8: build] Error 2

6800xt

Hello,

I am newer to Linux and have access to a 6800xt and a 5950x. I didn't see the 6800xt listed as supported and was wondering if I could be of any assistance in adding that device to the supported list. FWIW, I haven't looked far enough into this to even be certain that this piece of silicon still has that issue, but based on AMD's history I'm assuming it is also impacted.

Cheers

Vega 8 ?

Any idea how I can find the information needed to add Vega 8 ?

Something off with VEGA20 reset error handling

[  183.658047] vfio-pci 0000:43:00.0: AMD_VEGA20: version 1.0
[  183.658052] vfio-pci 0000:43:00.0: AMD_VEGA20: performing pre-reset
[  183.658123] vfio-pci 0000:43:00.0: AMD_VEGA20: performing reset
[  184.390719] vfio-pci 0000:43:00.0: AMD_VEGA20: psp mode1 reset failed
[  184.390723] vfio-pci 0000:43:00.0: AMD_VEGA20: falling back to BACO reset
[  184.603368] vfio-pci 0000:43:00.0: SMU error 0x0
[  184.603371] vfio-pci 0000:43:00.0: Failed to send message 0x25: return 0x0
[  184.603374] vfio-pci 0000:43:00.0: AMD_VEGA20: BACO reset successful
[  184.603376] vfio-pci 0000:43:00.0: AMD_VEGA20: performing post-reset
[  184.622683] vfio-pci 0000:43:00.0: Refused to change power state, currently in D0
[  184.622687] vfio-pci 0000:43:00.0: AMD_VEGA20: reset result = 0

Reaches the error here but ends up continuing on to report "BACO reset successful".

pci_err(adev_to_amd_private(adev)->vdev->pdev, "Failed to send message 0x%x: return 0x%x\n", msg, ret);

if (smum_send_msg_to_smc_with_parameter(adev, PPSMC_MSG_EnterBaco, 0, NULL))

Never logs an error here:

vr_warn(dev, "enter BACO failed\n");

Is this still being updated at some point?

I have 2 amd graphics card, one of them is waiting to be used in a vm and i'd love to see this updated for newer kernel versions so i can use my 2nd graphics card for a vm.

WX9100 question

Hi

I would be glad to get an idea upfront, if the WX9100 has been tried before (or is assumed to be working), or known to not work at all.

It's a "Pro" variant and I don't know if they differ from Vega10.
I know there is the long way to find this out myself, please excuse my asking.

Thanks a lot

compile on arm64 server, kernel version linux-4.19

/root/xm/kernel/vendor-reset-master/src/ftrace.c:63:11: 错误:‘struct pt_regs’ has no member named ‘ip’; did you mean ‘sp’?
regs->ip = (unsigned long)hook->function;
^~
sp
then, I changed 'regs->ip' to 'regs->sp', compiled successd.
but when I insmod vendor-reset.ko, dmesg report error:
ftrace_set_filter_ip() failed: -22

Reset of Radeon VII not working on Unraid

I have been trying to get Vendor reset to work on my Unraid system for a long while, in the hopes of being able to cleanly start and stop my VMs, to no avail.

I posted in the Unraid forums where the creator (ich777) of the Unraid plugin that integrates this fix provided me with some direction. However, after still not being able to get a clean reset I was recommended to post an issue here.

I have a 5900X and a Reason VII and I have attached my Unraid diagnostics. I am happy to provide any more details you might require.

modinfo missing version number of module -> DKMS will not update the module?

modinfo missing version number of module -> DKMS will not update the module because of it?

dkms on debian dont replace the module with a new one.

dkms status “WARNING! Diff between built and installed module”

#modinfo vendor-reset

filename:       /lib/modules/5.4.78-2-pve/updates/dkms/vendor-reset.ko
author:         Adam Madsen <[email protected]>
author:         Geoffrey McRae <[email protected]>
license:        GPL v2
srcversion:     533BB7E5866E52F63B9ACCB
depends:        
retpoline:      Y
name:           vendor_reset
vermagic:       5.4.78-2-pve SMP mod_unload modversions 
parm:           install_hook:bool

Request akmod package spec

Since dkms is not supported on rpm-ostree based systems (Fedora Silverblue, Kinoite, CoreOS), it's not very straightforward to use this package at the moment. rpm-ostree is however compatible with akmod, which does pretty much the same but is integrated into the package manager so the end result is much cleaner and most importantly works properly with rpm-ostree.

Please provide an akmod .spec file for this package. For more documentation see here.

Binding and unbinding from amdgpu -> unstable Windows VM until reboot

I have a 640SP version of RX550 (Polaris11-based) and it seems that something is missing from its reset routine to work correctly in a guest Windows 11 VM after using it with Linux/amdgpu driver before that (regardless of whether that happens on a host or in a guest Linux VM).

If the GPU is never bound to amdgpu (vfio-pci.ids=1002:67ff,1002:aae0 kernel param), it works perfectly. I can reboot, reset, shutdown & start the VM again and all is fine (but I think that was the case even without this module).

However, once I actually use the GPU in Linux (whether in a host or guest system doesn't matter), it is 'doomed' for Windows usage until (host) reboot. The VM actually seems to work at first and boots to windows, but after a while in a desktop (or immediately if I e.g. try to start Edge), the driver (21.12.1) crashes, screen blinks many times and after a while, Windows falls back to the basic driver. Reboot / hard reset / shutdown of the VM doesn't help, only reboot of the whole system does.

I am running Arch 5.15.12-arch1. I am aware of #46 and have 'w /sys/bus/pci/devices/0000:05:00.0/reset_method - - - - device_specific' in tmpfiles.d and the module seems to work 'correctly':

systemd[1]: Started Virtual Machine qemu-1-win11.
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: version 1.1
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: performing pre-reset
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: performing reset
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: CLOCK_CNTL: 0x0, PC: 0x20594
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: Performing BACO reset
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: performing post-reset
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: reset result = 0
kernel: vfio-pci 0000:05:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
kernel: vfio-pci 0000:05:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
kernel: vfio-pci 0000:05:00.0: vfio_ecap_init: hiding ecap 0x1e@0x370
kernel: vfio-pci 0000:05:00.1: enabling device (0000 -> 0002)
kernel: vfio-pci 0000:0f:00.3: enabling device (0000 -> 0002)
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: version 1.1
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: performing pre-reset
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: performing reset
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: CLOCK_CNTL: 0x0, PC: 0x2880
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: performing post-reset
kernel: vfio-pci 0000:05:00.0: AMD_POLARIS11: reset result = 0

Maybe the reset routine for Polaris is just incomplete?

Not working with 5700xt Pulse

I'm having an issue with vendor-reset on my current arch machine.

I'm using kernel 5.10.10-115-tkg-bmq.

I am able to detach and re-attach my card a few times, but then I start getting an error in dmesg.

[ 1078.072222] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:03.1/0000:07:00.0/0000:08:00.0/0000:09:00.0/vbios_version'

Any ideas on what is going on?

Exec format error

I am trying to modprobe vendor-reset but when I try to do it, modprobe returns the following error:

modprobe: ERROR: could not insert 'vendor_reset': Exec format error

I installed exactly according to the instructions specified in the README.

I am using Fedora 35.

Possible memory leak?

I've booted my vm several times and now I'm missing about 10GB of memory...

As you can see by non-cache kernel dynamic memory:

$ smem -tw
Area                           Used      Cache   Noncache 
firmware/hardware                 0          0          0 
kernel image                      0          0          0 
kernel dynamic memory      21184348   11002604   10181744 
userspace memory            2385732     535340    1850392 
free memory                 9295972    9295972          0 
----------------------------------------------------------
                           32866052   20833916   12032136 

$ cat /proc/meminfo 
MemTotal:       32866052 kB
MemFree:         9081332 kB
MemAvailable:   20023604 kB
Buffers:            1000 kB
Cached:         11388500 kB
SwapCached:      1106592 kB
Active:          7499800 kB
Inactive:        7028844 kB
Active(anon):     821200 kB
Inactive(anon):  2479164 kB
Active(file):    6678600 kB
Inactive(file):  4549680 kB
Unevictable:          16 kB
Mlocked:              16 kB
SwapTotal:      16777212 kB
SwapFree:       14428156 kB
Dirty:              1132 kB
Writeback:             0 kB
AnonPages:       2050472 kB
Mapped:           536664 kB
Shmem:            173424 kB
KReclaimable:     161464 kB
Slab:            1219148 kB
SReclaimable:     161464 kB
SUnreclaim:      1057684 kB
KernelStack:       21952 kB
PageTables:        34904 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    33210236 kB
Committed_AS:   10727300 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      724204 kB
VmallocChunk:          0 kB
Percpu:            42496 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:    21471120 kB
DirectMap2M:    11997184 kB
DirectMap1G:           0 kB

Not working for 5700XT under 5.8.0

Hi guys, thanks for the work, I know it's super early...

I hope this info is useful. Let me know if there is anything else I can add.

System info

❯ uname -a
Linux kvm-host 5.8.0-28-generic #30 SMP Wed Nov 18 22:03:39 PST 2020 x86_64 x86_64 x86_64 GNU/Linux

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal

❯ lsmod | grep vendor
vendor_reset           90112  0

❯ virsh version --daemon
Compiled against library: libvirt 6.0.0
Using library: libvirt 6.0.0
Using API: QEMU 6.0.0
Running hypervisor: QEMU 4.2.1
Running against daemon: 6.0.0

❯ lspci -nnv | grep -A 10 VGA
0a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] [1002:731f] (rev c1) (prog-if 00 [VGA controller])
	Subsystem: Sapphire Technology Limited Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] [1da2:e411]
	Flags: bus master, fast devsel, latency 0, IRQ 40
	Memory at 7fe0000000 (64-bit, prefetchable) [size=256M]
	Memory at 7ff0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at e000 [size=256]
	Memory at fcd00000 (32-bit, non-prefetchable) [size=512K]
	Expansion ROM at fcd80000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: vfio-pci
	Kernel modules: amdgpu

Logs

First 2 successful resets are upon initial successful boot of win10 vm. Third unsuccessful reset (screen stays black) is when attempting a win10 soft restart.

❯ sudo dmesg | grep NAVI
[  316.161395] vfio-pci 0000:0a:00.0: AMD_NAVI10: version 1.1
[  316.161395] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing pre-reset
[  316.161483] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing reset
[  316.493688] vfio-pci 0000:0a:00.0: AMD_NAVI10: bus reset disabled? yes
[  316.493693] vfio-pci 0000:0a:00.0: AMD_NAVI10: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  316.493695] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing post-reset
[  316.513247] vfio-pci 0000:0a:00.0: AMD_NAVI10: reset result = 0
[  316.825275] vfio-pci 0000:0a:00.0: AMD_NAVI10: version 1.1
[  316.825277] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing pre-reset
[  316.825378] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing reset
[  317.183124] vfio-pci 0000:0a:00.0: AMD_NAVI10: bus reset disabled? yes
[  317.183129] vfio-pci 0000:0a:00.0: AMD_NAVI10: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[  317.183132] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing post-reset
[  317.205125] vfio-pci 0000:0a:00.0: AMD_NAVI10: reset result = 0
[  570.655331] vfio-pci 0000:0a:00.0: AMD_NAVI10: version 1.1
[  570.655332] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing pre-reset
[  570.655420] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing reset
[  570.759720] vfio-pci 0000:0a:00.0: AMD_NAVI10: bus reset disabled? yes
[  570.759725] vfio-pci 0000:0a:00.0: AMD_NAVI10: SMU response reg: 1, sol reg: 1e77c78a, mp1 intr enabled? yes, bl ready? no
[  570.759725] vfio-pci 0000:0a:00.0: AMD_NAVI10: Clearing scratch regs 6 and 7
[  570.759850] vfio-pci 0000:0a:00.0: AMD_NAVI10: begin psp mode 1 reset
[  571.269270] vfio-pci 0000:0a:00.0: AMD_NAVI10: mode1 reset succeeded
[  582.072867] vfio-pci 0000:0a:00.0: AMD_NAVI10: timed out waiting for PSP bootloader to respond after reset
[  582.072874] vfio-pci 0000:0a:00.0: AMD_NAVI10: failed to reset device
[  582.072875] vfio-pci 0000:0a:00.0: AMD_NAVI10: performing post-reset
[  582.072992] vfio-pci 0000:0a:00.0: AMD_NAVI10: reset result = 0

FWIW, resetting works fine under 5.8.0 with the prior v2 reset patch:

❯ sudo dmesg | grep -B 3 -A 3 -m 1 Navi
[  844.986707] br0: port 2(vnet0) entered disabled state
[  845.237468] usb 1-6: reset full-speed USB device number 2 using xhci_hcd
[  845.520840] hid-generic 0003:1B1C:0C20.000E: hiddev0,hidraw0: USB HID v1.11 Device [Corsair Inc. H100iRGBPROXT] on usb-0000:02:00.0-6/input0
[  845.632757] vfio-pci 0000:0a:00.0: Navi10: performing BACO reset
[  847.157571] audit: type=1400 audit(1605774819.673:59): apparmor="STATUS" operation="profile_remove" profile="unconfined" name="libvirt-9d1baedf-170f-4646-b760-4e485f2ec1fb" pid=3687 comm="apparmor_parser"
[  847.188645] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC1220: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[  847.188648] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)

After returning to host login screen, blackscreen when loggin in.

So after having installed vendor reset I can say that it did work to get me back to the gnome login screen. However when I try to actually login, the screen flickers a few times and I'm stuck at a black screen and the desktop never comes back. To be clear, this doesn't happen after a full reboot. Only after I shutdown my VM.

Here's a concise series of events:

  • Boot host machine and login as normal with a working desktop.
  • Run my win10 VM with gpu passthrough
  • Shutdown VM
  • Back at host login screen now
  • Try to login
  • Blackscreen... :(

I have a Sapphire RX5700xt if that helps
This happens with or without the audio component being passed through

What's the simplest way to remove Polaris 11 from vendor-reset (RX560 issue)

I run two graphics cards in my Proxmox setup (a 5700XT and RX560) and pass them among my Win/Mac/Linux VMs. Up until now it's been a real pain having to reset bare metal every time I reassigned the 5700XT (RX560 didn't have reset bug), so I thank you greatly for your work!

The only issue that I think I'm having now is the vendor-reset is messing with the RX560 and I can't reset VM's with it. I'm still diagnosing but I was wondering if there is something in the code I could snip out so Polaris 11 isn't affected.

thanks!

vendor-reset stopped working with kernel 5.15 and is also present with 5.16 (affected are definitely Debian, Arch and Gentoo)

Since kernel 5.15 I can't start the VM again after it has been shutdown. They output stays black until I reboot my host. Which indicates, that the vendor-reset module is not working properly anymore. I booted up 5.14 and I could boot the VM as often as I wanted without the need of a host reboot.

I am running Debian testing and the module gets loaded (with kernel 5.15):
"dmesg | grep vendor" shows "... vendor_reset_hook: installed"

Has anyone else experienced issues with this kernel or could it be a Debian only problem?
Thanks in advance.

Consider using git tags and releases

First of all, a massive thanks for providing this software. Fixing passthrough reset woes has never been easier.

In order to prevent manual installation and system pollution by using untracked packages, I am in the process of repackaging this as a DKMS module package for Arch Linux. However, this repository currently contains no tags or releases. Yet dkms.conf mentions a version 0.0.17. Please consider using git tags for versioning and creating appropriate releases. This would make repackaging easier and offer more clarity for end-users.

Additionally, consider starting at version 0.1.0. While the semver specification does not specifically forbid otherwise, this would adhere more to a common convention of how to version software in its early beginnings.

Compile error: implicit declaration of function ‘copy_from_user’

I made sure the kernel options mentioned in the readme are set, kernel headers are installed as well as build-essential.

sudo dkms install . results in

$ cat /var/lib/dkms/vendor-reset/0.0.18/build/make.log
DKMS make.log for vendor-reset-0.0.18 for kernel 4.19.0-13-amd64 (x86_64)
Mon 14 Dec 2020 06:34:05 AM CET
make -C /lib/modules/4.19.0-13-amd64/build M=/var/lib/dkms/vendor-reset/0.0.18/build modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.0-13-amd64'
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/module.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/vendor-reset-dev.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/ioctl.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/ftrace.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/hook.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/common.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/compat.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/firmware.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/navi10.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/polaris10.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/vega10.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/vega20.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/amdgpu_device.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/amdgpu_discovery.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/amdgpu_bios.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/amdgpu_atomfirmware.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/atom.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/common_baco.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/navi10_reg_init.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/navi12_reg_init.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/navi14_reg_init.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/polaris_baco.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/smu7_baco.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/vega10_reg_init.o
  CC [M]  /var/lib/dkms/vendor-reset/0.0.18/build/src/amd/amdgpu/vega20_reg_init.o
/var/lib/dkms/vendor-reset/0.0.18/build/src/ioctl.c: In function ‘vendor_reset_ioctl_reset’:
/var/lib/dkms/vendor-reset/0.0.18/build/src/ioctl.c:34:7: error: implicit declaration of function ‘copy_from_user’; did you mean ‘sg_copy_from_buffer’? [-Werror=implicit-function-declaration]
   if (copy_from_user(&iodev, (void __user *)arg, sizeof(iodev)))
       ^~~~~~~~~~~~~~
       sg_copy_from_buffer
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.19.0-13-common/scripts/Makefile.build:308: /var/lib/dkms/vendor-reset/0.0.18/build/src/ioctl.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/usr/src/linux-headers-4.19.0-13-common/Makefile:1565: _module_/var/lib/dkms/vendor-reset/0.0.18/build] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-13-amd64'
make: *** [Makefile:8: build] Error 2

I also tried make which brings up the same error.

I retried sudo dkms install . and now I receive:

$ sudo dkms install .
Error! DKMS tree already contains: vendor-reset-0.0.18
You cannot add the same module/version combo more than once.

So either something worked or there's now a dirty state I'll have to reset somehow.

Are there any prerequisites missing to build the module? Might be due to I'm using LMDE rather than the more common Linux Mint.

Some context:

$ uname -a
Linux workstation 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	LMDE 4 (debbie)
Release:	4
Codename:	debbie

Audio Reset AGAIN?

In master as of 24c9fc5

Originally posted by @ajmadsen in #16 (comment)

If Master now includes audio reset, well I have a problem with my Powercolor RX5700 Red Dragon. The audio is stopping resets on unRAID 6.9.2 with a docker that builds the kernel with reset patch for me.

2021-04-15T18:13:00.747206Z qemu-system-x86_64: vfio: Cannot reset device 0000:10:00.1, no available reset mechanism.

Does same with Windows & Linux, hair being removed at rapid rate! :-( On fresh boot of server, Linux or Windows VM works. Reboot the VM OR shutdown/restart from VM manager and the VM won't restart

Does it work on 6600XT ?

Hey,

I tried to make and make install it on Proxmox 7 with 6600XT.

Still no luck.

Do i have to enable something on the kernal ? or does the script supports 6600XT or 6000 Series by any chance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.