1 // SPDX-License-Identifier: MIT 2 /* 3 * Copyright © 2023 Intel Corporation 4 */ 5 6 #include "i915_drv.h" 7 #include "i915_utils.h" 8 9 bool i915_vtd_active(struct drm_i915_private *i915) 10 { 11 if (device_iommu_mapped(i915->drm.dev)) 12 return true; 13 14 /* Running as a guest, we assume the host is enforcing VT'd */ 15 return i915_run_as_guest(); 16 } 17 18 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG) 19 20 /* i915 specific, just put here for shutting it up */ 21 int __i915_inject_probe_error(struct drm_i915_private *i915, int err, 22 const char *func, int line) 23 { 24 return 0; 25 } 26 27 #endif 28