[Intel-gfx] [PATCH v4 1/1] i915/drm: Split run_as_guest into x86 and non-x86
Casey Bowman
casey.g.bowman at intel.com
Tue Mar 22 18:42:37 UTC 2022
Splitting 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_drv.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 3c85dc8c1f04..76f0e47e3186 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1366,7 +1366,12 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
static inline bool run_as_guest(void)
{
+#if IS_ENABLED(CONFIG_X86)
return !hypervisor_is_type(X86_HYPER_NATIVE);
+#else
+ /* Not supported yet */
+ return false;
+#endif
}
#define HAS_D12_PLANE_MINIMIZATION(dev_priv) (IS_ROCKETLAKE(dev_priv) || \
--
2.25.1
More information about the Intel-gfx
mailing list