Re: [PATCH v9 2/3] drm/i915: Enable guest i915 full ppgtt functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017.08.11 12:46:48 +0300, Joonas Lahtinen wrote:
> 
> > @@ -141,14 +141,19 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv,
> >  
> >  	has_aliasing_ppgtt = dev_priv->info.has_aliasing_ppgtt;
> >  	has_full_ppgtt = dev_priv->info.has_full_ppgtt;
> > -	has_full_48bit_ppgtt = dev_priv->info.has_full_48bit_ppgtt;
> 
> 	Leave above line.
> 
> >  
> >  	if (intel_vgpu_active(dev_priv)) {
> > -		/* emulation is too hard */
> > -		has_full_ppgtt = false;
> > -		has_full_48bit_ppgtt = false;
> 
> 		has_full_ppgtt = false;
> 		has_full_48bit_ppgtt =
> 			intel_vgpu_has_full_48bit_ppgtt(dev_priv);
> 
> > +		has_full_ppgtt = intel_vgpu_has_full_ppgtt(dev_priv);
> > +		/* GVT-g has no support for 32bit ppgtt */
> > +		if (enable_ppgtt == 2 && has_full_ppgtt) {
> > +			DRM_DEBUG_DRIVER("Force 48bit ppgtt for vGPU\n");
> > +			enable_ppgtt = 3;
> 
> Lets not do an upgrade for the user if they explicitly requested lower
> level. I'd just leave the option to be and it'll get downgraded to
> aliasing ppgtt.
>

If user specified enable_ppgtt=2, it will get enable_ppgtt=2 instead of
aliasing ppgtt, so we try to guard against that for current 48bit ppgtt
support on vgpu. Well either upgrade to full 48bit or downgrade to aliasing.

> > +		}
> >  	}
> >  
> > +	has_full_48bit_ppgtt = has_full_ppgtt &&
> > +		dev_priv->info.has_full_48bit_ppgtt;
> > +
> 
> This can then be dropped too.
> 
> I'll send a patch to disconnect the has_full_ppgtt and
> has_full_48bit_ppgtt flags.
>

That'll be good. As we have validated this full ppgtt on vgpu for
quite some time now and plan to push for 4.14. Are you able to
align with that? So I might send first 4.14 pull without this series,
then add them later for dinf.


> 
> >  	if (!has_aliasing_ppgtt)
> >  		return 0;
> >  
> > @@ -49,12 +49,18 @@ enum vgt_g2v_type {
> > >  	VGT_G2V_MAX,
> >  };
> >  
> > +/*
> > + * VGT capabilities type
> > + */
> > +#define VGT_CAPS_FULL_PPGTT_48BIT	BIT(2)
> 
> VGT_CAPS_FULL_48BIT_PPGTT for consistency
> 
> > @@ -75,10 +75,17 @@ void i915_check_vgpu(struct drm_i915_private *dev_priv)
> >  		return;
> >  	}
> >  
> > +	dev_priv->vgpu.caps = __raw_i915_read32(dev_priv, vgtif_reg(vgt_caps));
> > +
> >  	dev_priv->vgpu.active = true;
> >  	DRM_INFO("Virtual GPU for Intel GVT-g detected.\n");
> >  }
> >  
> > +bool intel_vgpu_has_full_ppgtt(struct drm_i915_private *dev_priv)
> 
> This should really be has_full_48bit_ppgtt() too.
> 
> Regards, Joonas
> -- 
> Joonas Lahtinen
> Open Source Technology Center
> Intel Corporation

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux