Enable basic pass-through or direct assignment of devices to guest on AMD with bhyve.
By default it is disabled unless enabled by setting hw.vmm.amdvi_enable=1
Continuation of https://reviews.freebsd.org/D9921
Enable basic pass-through or direct assignment of devices to guest on AMD with bhyve.
By default it is disabled unless enabled by setting hw.vmm.amdvi_enable=1
Continuation of https://reviews.freebsd.org/D9921
Tested on very Phenom with IOMMU h/w ver1.
Also tested by Rod on various h/w.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
Tested fine on a Ryzen 1700 + Asus X370 mobo, with a dual-port Intel 82571 card. Both ports passed through to a FreeBSD 12-CURRENT amd64 4 vCPU guest, with iperf3/netperf stress tests run.
The most recent spec (Rev 3.00—December 2016, http://support.amd.com/TechDocs/48882_IOMMU.pdf) seems to indicate that v1 is the base features, and new features are described as options, so not sure how to determine if it's v2. The IVRS table does have a v1/v2 format discriminator, though that isn't printed out in the current code.
v2 extended feature is in "MMIO Offset 0030h IOMMU Extended Feature Register".