Commit c900a670 authored by Casey Bowman's avatar Casey Bowman Committed by Lucas De Marchi

drm/i915: Split i915_run_as_guest into x86 and non-x86

Split i915_run_as_guest() into a more arch-friendly function
as non-x86 builds do not support this functionality.
Signed-off-by: default avatarCasey Bowman <casey.g.bowman@intel.com>
Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220331204343.1256150-2-casey.g.bowman@intel.com
parent 805f04d4
......@@ -32,7 +32,10 @@
#include <linux/types.h>
#include <linux/workqueue.h>
#include <linux/sched/clock.h>
#ifdef CONFIG_X86
#include <asm/hypervisor.h>
#endif
struct drm_i915_private;
struct timer_list;
......@@ -428,7 +431,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment