[Intel-gfx] [RFC PATCH v5 1/1] Split i915_run_as_guest into x86 and non-x86
Casey Bowman
casey.g.bowman at intel.com
Thu Mar 31 00:09:08 UTC 2022
Splitting i915_run_as_guest into a more arch-friendly function
as non-x86 builds do not support this functionality.
Signed-off-by: Casey Bowman <casey.g.bowman at intel.com>
---
drivers/gpu/drm/i915/i915_utils.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index b2d89c43f24d..a42882e68eea 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -428,7 +428,12 @@ static inline bool timer_expired(const struct timer_list *t)
static inline bool i915_run_as_guest(void)
{
+#if IS_ENABLED(CONFIG_X86)
return !hypervisor_is_type(X86_HYPER_NATIVE);
+#else
+ /* Not supported yet */
+ return false;
+#endif
}
bool i915_vtd_active(struct drm_i915_private *i915);
--
2.25.1
More information about the Intel-gfx
mailing list