[Intel-gfx] [RFC 02/10] drm/i915/gvt: get ready of memory for pvmmio

Zhang, Xiaolin xiaolin.zhang at intel.com
Fri Sep 28 07:31:28 UTC 2018


On 09/27/2018 03:18 PM, Chris Wilson wrote:
> 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
thanks your comment. I just find another place "struct i915_virtual_gpu"
and guess it is better than this, do you think it is right place for them?

BRs, Xiaolin
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
>



More information about the Intel-gfx mailing list