All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: igvt-g-dev@lists.01.org
Subject: [PATCH 2/5] drm/i915/gvt: move intel iommu detection to intel_gvt_init()
Date: Tue, 10 Jan 2017 14:52:49 +0800	[thread overview]
Message-ID: <20170110065252.1730-3-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <20170110065252.1730-1-zhenyuw@linux.intel.com>

Prepare to remove detect_host() hook. Move intel iommu detection early
in intel_gvt_init().

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/gvt/gvt.c   | 7 +++++++
 drivers/gpu/drm/i915/gvt/kvmgt.c | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
index 35264a991776..7a7886644acf 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.c
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
@@ -73,6 +73,13 @@ int intel_gvt_init_host(void)
 	if (intel_gvt_host.initialized)
 		return 0;
 
+#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 IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
 	/* Try KVMGT */
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index 0c9234a87a20..f29d2a27ccb1 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -1276,12 +1276,6 @@ static bool kvmgt_check_guest(void)
  */
 static int kvmgt_detect_host(void)
 {
-#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
 	return kvmgt_check_guest() ? -ENODEV : 0;
 }
 
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-01-10  6:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10  6:52 [PATCH 0/5] Fix issues caused by gvt init timing Zhenyu Wang
2017-01-10  6:52 ` [PATCH 1/5] drm/i915: make intel_gvt_init() later instead of too early Zhenyu Wang
2017-01-11  3:13   ` Jike Song
2017-01-11  3:29     ` Zhenyu Wang
2017-01-10  6:52 ` Zhenyu Wang [this message]
2017-01-11  2:18   ` [PATCH 2/5] drm/i915/gvt: move intel iommu detection to intel_gvt_init() Jike Song
2017-01-11  2:40     ` Zhenyu Wang
2017-01-11  3:01       ` Jike Song
2017-01-10  6:52 ` [PATCH 3/5] drm/i915/gvt: remove detect_host() MPT hook Zhenyu Wang
2017-01-10  6:52 ` [PATCH 4/5] drm/i915/gvt: use normal mmio read function for firmware exposure Zhenyu Wang
2017-01-10  6:52 ` [PATCH 5/5] drm/i915/gvt: fix vgpu type size init Zhenyu Wang
2017-01-10  7:23 ` ✓ Fi.CI.BAT: success for Fix issues caused by gvt init timing Patchwork
2017-01-10 15:41 ` [PATCH 0/5] " Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170110065252.1730-3-zhenyuw@linux.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=igvt-g-dev@lists.01.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.