[Intel-gfx] [RFC 01/10] drm/i915/gvt: add module parameter enable_pvmmio

Chris Wilson chris at chris-wilson.co.uk
Thu Sep 27 07:16:47 UTC 2018


Quoting Xiaolin Zhang (2018-09-27 17:37:46)
> This int type module parameter is used to control the different
> level pvmmio feature for MMIO emulation in GVT.
> 
> This parameter is default zero, no pvmmio feature enabled.
> 
> Its permission type is 0400 which means user could only change its
> value through the cmdline, this is to prevent the dynamic modification
> during runtime which would break the pvmmio internal logic.
> 
> Signed-off-by: Xiaolin Zhang <xiaolin.zhang at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h    |  3 +++
>  drivers/gpu/drm/i915/i915_params.c |  4 ++++
>  drivers/gpu/drm/i915/i915_params.h |  3 ++-
>  drivers/gpu/drm/i915/i915_pvinfo.h | 16 +++++++++++++++-
>  drivers/gpu/drm/i915/i915_vgpu.c   | 12 +++++++++++-
>  5 files changed, 35 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 8624b4b..174d618 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -3871,4 +3871,7 @@ static inline int intel_hws_csb_write_index(struct drm_i915_private *i915)
>                 return I915_HWS_CSB_WRITE_INDEX;
>  }
>  
> +#define PVMMIO_LEVEL_ENABLE(dev_priv, level)   \
> +       (intel_vgpu_active(dev_priv) && i915_modparams.enable_pvmmio & level)
> +
>  #endif
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index 295e981..5ee236ec 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -174,6 +174,10 @@ struct i915_params i915_modparams __read_mostly = {
>  i915_param_named(enable_gvt, bool, 0400,
>         "Enable support for Intel GVT-g graphics virtualization host support(default:false)");
>  
> +i915_param_named(enable_pvmmio, int, 0400,
> +       "Enable pv mmio feature, default TRUE. This parameter "
> +       "could only set from host, guest value is set through vgt_if");

We were placing gvt specific module parameters under gvt/
-Chris


More information about the Intel-gfx mailing list