[Intel-gfx] [RFC 02/10] drm/i915/gvt: get ready of memory for pvmmio
Chris Wilson
chris at chris-wilson.co.uk
Thu Sep 27 07:17:58 UTC 2018
Quoting Xiaolin Zhang (2018-09-27 17:37:47)
> To enable pvmmio feature, we need to prepare one 4K shared page
> which will be accessed by both guest and backend i915 driver.
>
> guest i915 allocate one page memory and then the guest physical address is
> passed to backend i915 driver through PVINFO register so that backend i915
> driver can access this shared page without hypeviser trap cost for shared
> data exchagne via hyperviser read_gpa functionality.
>
> Signed-off-by: Xiaolin Zhang <xiaolin.zhang at intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 5 +++++
> drivers/gpu/drm/i915/i915_drv.h | 3 +++
> drivers/gpu/drm/i915/i915_pvinfo.h | 25 ++++++++++++++++++++++++-
> drivers/gpu/drm/i915/i915_vgpu.c | 17 +++++++++++++++++
> 4 files changed, 49 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index ade9bca..815a4dd 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -885,6 +885,7 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv)
> return -ENODEV;
>
> spin_lock_init(&dev_priv->irq_lock);
> + spin_lock_init(&dev_priv->shared_page_lock);
No. Do we not have a more appropriate struct for this to find a home in.
No one will ever uess that 'shared_page_lock' refers to vgpu.
-Chris
More information about the Intel-gfx
mailing list