Chapter 22. NVIDIA Spectre V2 Mitigation

The NVIDIA FreeBSD driver supports the retpoline Spectre V2 mitigation technique as identified by: https://software.intel.com/security-software-guidance/api-app/sites/default/files/Retpoline-A-Branch-Target-Injection-Mitigation.pdf

FreeBSD does not provide a consistent method to determine if the kernel implements Spectre V2 mitigation at driver install time. The NVIDIA FreeBSD driver implements the non-speculative (safe) version of the retpoline thunk which provides Spectre V2 mitigation for the NVIDIA kernel module. When enabled, users may notice a performance degradation.

Some performance may be recovered by setting the NVreg_CheckPCIConfigSpace kernel module parameter to 0. This will disable the NVIDIA driver's sanity checks of GPU PCI config space at various entry points, which were originally required to detect and correct config space manipulation done by X server versions prior to 1.7.

NVreg_CheckPCIConfigSpace=0