Lspci appears to cause a display driver crash

So I recently built a new computer:
R5 1600
asrock ab350m pro4
32 gb ram
gtx1070 on cpu lanes (guest)
rx580 on chipset lanes (host)
OS: antergos
I built this computer to use for gpu passthrough. I recently finished going through the arch omvf guide on their wiki and have have a fully operational windows vm with my 1070 passed through. However while setting this up I ran into a strange issue.

After adding the required modules to mkinitcpio.conf and regenerating the initramfs I started getting what I have to assume are display driver crashes(all displays go to sleep with the system still on and dropping to a tty does nothing). They were happening at startup almost every time and seemingly randomly. I soon after discovered that the same thing would happen if I called lspci, and that if I called amd_iommu=off in the kernel params then it would boot cleanly and I could call lspci to my hearts content.

I recently realized that the crash at startup is likely only happening if hardware changes occur that would cause lspci to run to detect the devices. But I’m still completely stumped as to the root cause or how to properly fix this.

You might need a bleeding edge kernel like at least 4.13.16. You could also try to use pci.stub kernel arguments instead of vfio-pci.

I’m on 4.14.3
and it seems odd that I would need to use pci stub when i have blacklisted nouveau and pointed xorg to the correct bus id. but I guess I could try it.

So it appears that all of this boiled down to a very defective R5 1600. strangely this was a week 35 cpu so it should have been outside of the affected range however it definitely had the gcc defect and it appears it may have had something else wrong as well to cause the lockups I was having. with my replacement cpu I’ve had the system running with iommu on and I’m mining on my vm I’ve started and stopped mining several times and called lspci a bunch of times and so far its fine after over 8 hours.