This guide is originally a PDF I made over the time I have used VFIO and wrote down all my settings, tips and performance tweaks to make VFIO run as smooth as possible.
Read the full documentation in online format at https://github.com/HikariKnight/vfio-setup-docs/wiki the PDF version and document version are no longer updated, please use the github wiki page instead!