summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gvt/gvt.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2017-01-13 15:31:58 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2017-02-07 17:21:35 +0800
commitd2896e34eb6f10b4f76b42df34b7e075b203c5ff (patch)
treedba8e169fba522f52752cccf96b817c8c557547d /drivers/gpu/drm/i915/gvt/gvt.c
parent26f837e8e1ec9748b55be3af6d7f54b9ad5a43b1 (diff)
drm/i915/gvt: move intel iommu detection to intel_gvt_init()
Prepare to remove detect_host() hook. Move intel iommu detection early in intel_gvt_init(). Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/gvt.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/gvt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
index e6bf5c533fbe..0beb17e92928 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.c
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
@@ -77,6 +77,13 @@ int intel_gvt_init_host(void)
if (xen_domain() && !xen_initial_domain())
return -ENODEV;
+#ifdef CONFIG_INTEL_IOMMU
+ if (intel_iommu_gfx_mapped) {
+ gvt_err("Hardware IOMMU compatibility not yet supported, try to boot with intel_iommu=igfx_off\n");
+ return -ENODEV;
+ }
+#endif
+
/* Try to load MPT modules for hypervisors */
if (xen_initial_domain()) {
/* In Xen dom0 */