[PATCH v1 3/5] drm/i915/gvt: GVTg support context submission pvmmio optimization

Zhenyu Wang zhenyuw at linux.intel.com
Tue Nov 6 06:14:45 UTC 2018


On 2018.11.06 05:42:02 +0000, Zhang, Xiaolin wrote:
> >> @@ -1674,6 +1676,16 @@ static int elsp_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
> >>  
> >>  	execlist = &vgpu->submission.execlist[ring_id];
> >>  
> >> +	if (VGPU_PVMMIO(vgpu) & PVMMIO_ELSP_SUBMIT) {
> >> +		elsp_data_off = offsetof(struct gvt_shared_page, elsp_data);
> >> +		intel_gvt_read_shared_page(vgpu, elsp_data_off, &elsp_data, 16);
> >> +		execlist->elsp_dwords.data[3] = elsp_data[0];
> >> +		execlist->elsp_dwords.data[2] = elsp_data[1];
> >> +		execlist->elsp_dwords.data[1] = elsp_data[2];
> >> +		execlist->elsp_dwords.data[0] = data;
> >> +		return intel_vgpu_submit_execlist(vgpu, ring_id);
> >> +	}
> > I think we still need to do more check, e.g if ctx address is in valid vgpu range, etc?
> I think your concern to check input data eslp_datt[4], but elsp_data[4]
> store the context descriptor, not ctx address.  so I am not sure is
> there any mechanism to validate context descriptor.

Looks intel_vgpu_submit_execlist() does have checks on elsp state and
validate guest ctx address in final submit_context(), was considering
to validate that earlier.

> >> +
> >>  	execlist->elsp_dwords.data[3 - execlist->elsp_dwords.index] = data;
> >>  	if (execlist->elsp_dwords.index == 3) {
> >>  		ret = intel_vgpu_submit_execlist(vgpu, ring_id);
> >> -- 
> >> 2.7.4
> >>
> 

-- 
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: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20181106/7a438291/attachment.sig>


More information about the intel-gvt-dev mailing list