<domain type='kvm'>
...
<os>
...
<loader type='pflash'>/var/lib/libvirt/images/VM1-OVMF.fd</loader>
</os>
</domain>
Since the OVMF image we're using is a "unified" image, it contains both the UEFI code itself as well as variable storage space, so the above adds it as writable by the VM. There are also ways to have a split image so you can maintain the UEFI code separate from the variables, but I'll wait for builds from Gerd that support that before I attempt to document it.
With support for both the kvm=off cpu option and OVMF in libvirt, we're now able to run completely native libvirt VMs with GeForce and Radeon GPU assignment. Support is already underway for virt-manager and virt-install of OVMF.
Also, a VM CPU selection tip, since we don't care about migration with an assigned GPU, there are few reasons left not to want to use the -cpu host option for QEMU. To enable that through libvirt, change the CPU definition in the XML to this:
<domain type='kvm'>
...
<cpu mode='host-passthrough'/>
...
</domain>
Automatic vCPU pinning is also available:
<domain type='kvm'>
...
<cputune>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
</cputune>
...
</domain>
And yes, hugepage support is also available, see libvirt documentation for details. Enjoy.