A script for building the system from Testing SMM with QEMU, KVM and libvirt based on the guide from the Tiano Core EDK2 wiki "https://github.com/tianocore/tianocore.github.io/wiki/Testing-SMM-with-QEMU,-KVM-and-libvirt" and can be seen below.
This script is for a Fedora based host.
NOTE: The original script is in the master branch, but there are separate branches for Fedora 26 and Fedora 25.