This is amazing, thank you gnif, wendell and everyone else who has contributed.
Anyone with a Ryzen motherboard who gets a Kernel Panic on boot after enabling IOMMU, I may have a solution for you.
Try adding this to your kernel command line “iommu=pt iommu=1”.
I got this error after swapping my GPUs around on an Asrock AB350 Pro4 motherboard. I have an R9 280 and a 1080 Ti.
If this doesn’t fix the issue, try enabling hot-plug in the BIOS for your AHCI storage as my kernel panic was about an SCSI disk. Strangely, if the GPUs were in the opposite positions the kernel panic never happens despite hot-plug being disabled.