nvidia-merged/nvidia-iommu-api-fix.patch

23 lines
707 B
Diff
Raw Normal View History

diff --git a/usr/src/nvidia-535.129.03-orig/nvidia/nv-pci.c b/kernel/nvidia/nv-pci.c
index 326833e..74ac5c7 100644
--- a/usr/src/nvidia-535.129.03-orig/nvidia/nv-pci.c
+++ b/kernel/nvidia/nv-pci.c
@@ -31,6 +31,7 @@
#if defined(NV_VGPU_KVM_BUILD)
#include "nv-vgpu-vfio-interface.h"
+#include <linux/iommu.h> /** iommu_present */
#endif
#if defined(NV_SEQ_READ_ITER_PRESENT)
@@ -212,7 +213,8 @@ nv_pci_probe
goto failed;
}
- if (pci_dev->dev.bus->iommu_ops == NULL)
+ //if (pci_dev->dev.bus->iommu_ops == NULL)
+ if(!iommu_present(pci_dev->dev.bus))
{
nv = NV_STATE_PTR(nvl);
if (rm_is_iommu_needed_for_sriov(sp, nv))