[PATCH v3] drm/i915/gvt: enter failsafe mode when guest requires more resources
Zhenyu Wang
zhenyuw at linux.intel.com
Fri Feb 17 09:03:49 UTC 2017
On 2017.02.17 16:42:38 +0800, Min He wrote:
> Windows guest will notitfy GVT-g to request more resources through g2v
> interface, when its resources are not enough.
> This patch is to handle this case and let vgpu enter failsafe mode to
> avoid too many error messages.
>
> Signed-off-by: Min He <min.he at intel.com>
> Signed-off-by: Pei Zhang <pei.zhang at intel.com>
> ---
applied, thanks!
> drivers/gpu/drm/i915/gvt/gvt.h | 1 +
> drivers/gpu/drm/i915/gvt/handlers.c | 5 +++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
> index 778f396..ce67430 100644
> --- a/drivers/gpu/drm/i915/gvt/gvt.h
> +++ b/drivers/gpu/drm/i915/gvt/gvt.h
> @@ -453,6 +453,7 @@ struct intel_gvt_ops {
>
> enum {
> GVT_FAILSAFE_UNSUPPORTED_GUEST,
> + GVT_FAILSAFE_INSUFFICIENT_RESOURCE,
> };
>
> #include "mpt.h"
> diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
> index 6f098bb..9fce572 100644
> --- a/drivers/gpu/drm/i915/gvt/handlers.c
> +++ b/drivers/gpu/drm/i915/gvt/handlers.c
> @@ -157,6 +157,8 @@ static void enter_failsafe_mode(struct intel_vgpu *vgpu, int reason)
> case GVT_FAILSAFE_UNSUPPORTED_GUEST:
> pr_err("Detected your guest driver doesn't support GVT-g.\n");
> break;
> + case GVT_FAILSAFE_INSUFFICIENT_RESOURCE:
> + pr_err("Graphics resource is not enough for the guest\n");
> default:
> break;
> }
> @@ -1103,6 +1105,9 @@ static int pvinfo_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
> case _vgtif_reg(execlist_context_descriptor_lo):
> case _vgtif_reg(execlist_context_descriptor_hi):
> break;
> + case _vgtif_reg(rsv5[0])..._vgtif_reg(rsv5[3]):
> + enter_failsafe_mode(vgpu, GVT_FAILSAFE_INSUFFICIENT_RESOURCE);
> + break;
> default:
> gvt_err("invalid pvinfo write offset %x bytes %x data %x\n",
> offset, bytes, data);
> --
> 1.9.1
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170217/69075f95/attachment.sig>
More information about the intel-gvt-dev
mailing list