[PATCH] drm/i915/gvt: Add the support of HUC_STATUS2 reg emulation for Guest VGPU

Zhenyu Wang zhenyuw at linux.intel.com
Tue Mar 27 07:27:41 UTC 2018


On 2018.03.27 14:03:39 +0800, Zhao, Yakui wrote:
> > > > > diff --git a/drivers/gpu/drm/i915/gvt/mmio.c b/drivers/gpu/drm/i915/gvt/mmio.c
> > > > > index 11b71b3..7cf972d 100644
> > > > > --- a/drivers/gpu/drm/i915/gvt/mmio.c
> > > > > +++ b/drivers/gpu/drm/i915/gvt/mmio.c
> > > > > @@ -235,6 +235,7 @@ void intel_vgpu_reset_mmio(struct intel_vgpu *vgpu, bool dmlr)
> > > > >    	struct intel_gvt *gvt = vgpu->gvt;
> > > > >    	const struct intel_gvt_device_info *info = &gvt->device_info;
> > > > >    	void  *mmio = gvt->firmware.mmio;
> > > > > +	struct drm_i915_private *dev_priv = gvt->dev_priv;
> > > > >    	if (dmlr) {
> > > > >    		memcpy(vgpu->mmio.vreg, mmio, info->mmio_size);
> > > > > @@ -256,6 +257,11 @@ void intel_vgpu_reset_mmio(struct intel_vgpu *vgpu, bool dmlr)
> > > > >    		memcpy(vgpu->mmio.sreg, mmio, GVT_GEN8_MMIO_RESET_OFFSET);
> > > > >    	}
> > > > > +	if (HAS_HUC_UCODE(dev_priv)) {
> > 
> > maybe use USES_HUC()? so only read hw value when huc is loaded, otherwise can just skip.
> 
> The status of Huc loading only depends on the value of HUC_STATUS2 reg. (The
> dev_priv->huc_fw.load_status can't reflect the status of Huc as it needs the
> Guc authentication).
> 
> So it is checked on the platforms that supports the Guc/Huc.
> How do you think?
> 

I think USES_HUC() just check if huc fw is available for load, which
should be the state that we want to check huc fw status. And looks
HAS_HUC_UCODE() has no user within i915 code at all? I'm not clear
on that history maybe we should not use it anymore.

-- 
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/20180327/7d26606d/attachment.sig>


More information about the intel-gvt-dev mailing list