[Intel-gfx] [PATCH 2/5] drm/i915/gvt: move intel iommu detection to intel_gvt_init()

Zhenyu Wang zhenyuw at linux.intel.com
Wed Jan 11 02:40:12 UTC 2017


On 2017.01.11 10:18:30 +0800, Jike Song wrote:
> On 01/10/2017 02:52 PM, Zhenyu Wang wrote:
> > Prepare to remove detect_host() hook. Move intel iommu detection early
> > in intel_gvt_init().
> > 
> > Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/gvt/gvt.c   | 7 +++++++
> >  drivers/gpu/drm/i915/gvt/kvmgt.c | 6 ------
> >  2 files changed, 7 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
> > index 35264a991776..7a7886644acf 100644
> > --- a/drivers/gpu/drm/i915/gvt/gvt.c
> > +++ b/drivers/gpu/drm/i915/gvt/gvt.c
> > @@ -73,6 +73,13 @@ int intel_gvt_init_host(void)
> >  	if (intel_gvt_host.initialized)
> >  		return 0;
> >  
> > +#ifdef CONFIG_INTEL_IOMMU
> > +	if (intel_iommu_gfx_mapped) {
> > +		gvt_err("Hardware IOMMU compatibility not yet supported, try to boot with intel_iommu=igfx_off\n");
> > +		return -ENODEV;
> > +	}
> > +#endif
> > +
> 
> Hi Zhenyu,
> 
> Per my understanding, the "intel_iommu=" parameter acts only on native (think about XenGT),
> so it's better to keep it somewhere in kvmgt.c, maybe kvmgt_init()?
> 

hmm, I think it's just a limit for current gvt device model but not related to hypervisor,
and it would bail out to disable gvt only. Anyway we'll fix it soon so not worry much for that.

-- 
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: 163 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20170111/a97339a3/attachment.sig>


More information about the Intel-gfx mailing list