[Intel-gfx] [PATCH] drm/i915: Disable semaphore on vGPU for now
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 27 09:50:25 UTC 2019
Quoting Zhenyu Wang (2019-03-27 09:06:36)
> This is to disable semaphore usage when on vGPU for now. Unfortunately
> GVT-g hasn't fully enabled semaphore usage yet, so current guest with
> semaphore use would cause vGPU failure.
>
> Although current semaphore failure with vGPU can be simply resolved by
> allowing cmd parser to accept MI_SEMAPHORE_WAIT command with address
> audit, we're checking general usage of semaphore and how we should
> handle it properly for virtualization in consider of function and
> security concern. So we decide to request to disable it for now in
> guest driver. Once GVT could support it, we would add new compat bit
> to turn it on.
>
> Cc: Kevin Tian <kevin.tian at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> ---
> Note this needs to queue for -next otherwise next kernel i915 as guest
> would be broken for GVT.
>
> drivers/gpu/drm/i915/intel_lrc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 66bc3cd4e166..50075e24ae03 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -2315,7 +2315,8 @@ void intel_execlists_set_default_submission(struct intel_engine_cs *engine)
> engine->park = NULL;
> engine->unpark = NULL;
>
> - engine->flags |= I915_ENGINE_HAS_SEMAPHORES;
> + if (!intel_vgpu_active(engine->i915))
> + engine->flags |= I915_ENGINE_HAS_SEMAPHORES;
Fwiw, this will have the desired effect so,
Acked-by: Chris Wilson <chris at chris-wilson.co.uk>
Just the question remains as this is being used by userspace, sweeping
it under the rug might be a bit more difficult.
-Chris
More information about the Intel-gfx
mailing list