All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
@ 2017-05-24  8:50 changbin.du
  2017-05-24  9:17 ` Zhenyu Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: changbin.du @ 2017-05-24  8:50 UTC (permalink / raw)
  To: daniel.vetter, jani.nikula, chris
  Cc: airlied, intel-gfx, dri-devel, intel-gvt-dev

From: Changbin Du <changbin.du@intel.com>

At least we need one MPT module (currently only have one) selected
to get GVTg functional. When GVTg is enabled while no MPT selected,
the build just includes useless GVTg code. This doesn't make sense.

With this patch, a submenut is created under i915 as below:
  -*- Enable Intel GVT-g graphics virtualization host support
  <M> Enable KVM/VFIO support for Intel GVT-g

If no MPT is selected, GVTg will be disabled automatically.
  < > Enable KVM/VFIO support for Intel GVT-g

Signed-off-by: Changbin Du <changbin.du@intel.com>
---
 drivers/gpu/drm/i915/Kconfig | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index a5cd5da..e380a5d 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -91,12 +91,15 @@ config DRM_I915_USERPTR
 
 	  If in doubt, say "Y".
 
+menu "Intel GVT-g graphics virtualization host support"
+	depends on DRM_I915
+	depends on 64BIT
+
 config DRM_I915_GVT
-        bool "Enable Intel GVT-g graphics virtualization host support"
-        depends on DRM_I915
-        depends on 64BIT
-        default n
-        help
+	bool "Enable Intel GVT-g graphics virtualization host support"
+	default n
+	depends on DRM_I915_GVT_KVMGT
+	help
 	  Choose this option if you want to enable Intel GVT-g graphics
 	  virtualization technology host support with integrated graphics.
 	  With GVT-g, it's possible to have one integrated graphics
@@ -116,13 +119,14 @@ config DRM_I915_GVT
 
 config DRM_I915_GVT_KVMGT
 	tristate "Enable KVM/VFIO support for Intel GVT-g"
-	depends on DRM_I915_GVT
+	select DRM_I915_GVT
 	depends on KVM
 	depends on VFIO_MDEV && VFIO_MDEV_DEVICE
 	default n
 	help
 	  Choose this option if you want to enable KVMGT support for
 	  Intel GVT-g.
+endmenu
 
 menu "drm/i915 Debugging"
 depends on DRM_I915
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-24  8:50 [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected changbin.du
@ 2017-05-24  9:17 ` Zhenyu Wang
  2017-05-24  9:21 ` Chris Wilson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Zhenyu Wang @ 2017-05-24  9:17 UTC (permalink / raw)
  To: changbin.du; +Cc: intel-gfx, dri-devel, daniel.vetter, intel-gvt-dev


[-- Attachment #1.1: Type: text/plain, Size: 2410 bytes --]

On 2017.05.24 16:50:39 +0800, changbin.du@intel.com wrote:
> From: Changbin Du <changbin.du@intel.com>
> 
> At least we need one MPT module (currently only have one) selected
> to get GVTg functional. When GVTg is enabled while no MPT selected,
> the build just includes useless GVTg code. This doesn't make sense.
>

The reason was that we tried to merge gvt device model in upstream
first while finishing KVMGT part later. I'm ok with this now.

> With this patch, a submenut is created under i915 as below:
>   -*- Enable Intel GVT-g graphics virtualization host support
>   <M> Enable KVM/VFIO support for Intel GVT-g
> 
> If no MPT is selected, GVTg will be disabled automatically.
>   < > Enable KVM/VFIO support for Intel GVT-g
> 
> Signed-off-by: Changbin Du <changbin.du@intel.com>
> ---
>  drivers/gpu/drm/i915/Kconfig | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index a5cd5da..e380a5d 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -91,12 +91,15 @@ config DRM_I915_USERPTR
>  
>  	  If in doubt, say "Y".
>  
> +menu "Intel GVT-g graphics virtualization host support"
> +	depends on DRM_I915
> +	depends on 64BIT
> +
>  config DRM_I915_GVT
> -        bool "Enable Intel GVT-g graphics virtualization host support"
> -        depends on DRM_I915
> -        depends on 64BIT
> -        default n
> -        help
> +	bool "Enable Intel GVT-g graphics virtualization host support"
> +	default n
> +	depends on DRM_I915_GVT_KVMGT
> +	help
>  	  Choose this option if you want to enable Intel GVT-g graphics
>  	  virtualization technology host support with integrated graphics.
>  	  With GVT-g, it's possible to have one integrated graphics
> @@ -116,13 +119,14 @@ config DRM_I915_GVT
>  
>  config DRM_I915_GVT_KVMGT
>  	tristate "Enable KVM/VFIO support for Intel GVT-g"
> -	depends on DRM_I915_GVT
> +	select DRM_I915_GVT
>  	depends on KVM
>  	depends on VFIO_MDEV && VFIO_MDEV_DEVICE
>  	default n
>  	help
>  	  Choose this option if you want to enable KVMGT support for
>  	  Intel GVT-g.
> +endmenu
>  
>  menu "drm/i915 Debugging"
>  depends on DRM_I915
> -- 
> 2.7.4
> 

-- 
Open Source Technology Center, Intel ltd.

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-24  8:50 [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected changbin.du
  2017-05-24  9:17 ` Zhenyu Wang
@ 2017-05-24  9:21 ` Chris Wilson
  2017-05-24  9:36   ` Du, Changbin
  2017-05-24  9:57 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-05-24 11:35 ` [PATCH] " Jani Nikula
  3 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2017-05-24  9:21 UTC (permalink / raw)
  To: changbin.du; +Cc: airlied, intel-gfx, dri-devel, daniel.vetter, intel-gvt-dev

On Wed, May 24, 2017 at 04:50:39PM +0800, changbin.du@intel.com wrote:
> From: Changbin Du <changbin.du@intel.com>
> 
> At least we need one MPT module (currently only have one) selected
> to get GVTg functional. When GVTg is enabled while no MPT selected,
> the build just includes useless GVTg code. This doesn't make sense.

See the Kconfig "choice" directive.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-24  9:21 ` Chris Wilson
@ 2017-05-24  9:36   ` Du, Changbin
  0 siblings, 0 replies; 9+ messages in thread
From: Du, Changbin @ 2017-05-24  9:36 UTC (permalink / raw)
  To: Chris Wilson, changbin.du, daniel.vetter, jani.nikula, airlied,
	intel-gfx, dri-devel, intel-gvt-dev, zhenyuw


[-- Attachment #1.1: Type: text/plain, Size: 1022 bytes --]

On Wed, May 24, 2017 at 10:21:31AM +0100, Chris Wilson wrote:
> On Wed, May 24, 2017 at 04:50:39PM +0800, changbin.du@intel.com wrote:
> > From: Changbin Du <changbin.du@intel.com>
> > 
> > At least we need one MPT module (currently only have one) selected
> > to get GVTg functional. When GVTg is enabled while no MPT selected,
> > the build just includes useless GVTg code. This doesn't make sense.
> 
> See the Kconfig "choice" directive.
> -Chris
> 
I was thought about "choice" as in mind firstly and that is good. But I think
this is better since it make it totaly impossible that GVT is enabled while no
MPT. With "choice", if we forget disable GVT after unselect all MPTs, we still
compile GVT in but will never not use it.

> -- 
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Thanks,
Changbin Du

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-24  8:50 [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected changbin.du
  2017-05-24  9:17 ` Zhenyu Wang
  2017-05-24  9:21 ` Chris Wilson
@ 2017-05-24  9:57 ` Patchwork
  2017-05-24 11:35 ` [PATCH] " Jani Nikula
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-05-24  9:57 UTC (permalink / raw)
  To: changbin.du; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: prevent generating unusable gvt build which no mpt module is selected
URL   : https://patchwork.freedesktop.org/series/24866/
State : success

== Summary ==

Series 24866v1 drm/i915: prevent generating unusable gvt build which no mpt module is selected
https://patchwork.freedesktop.org/api/1.0/series/24866/revisions/1/mbox/

Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-uc:
                pass       -> FAIL       (fi-snb-2600) fdo#100007
Test gem_exec_suspend:
        Subgroup basic-s4-devices:
                dmesg-warn -> PASS       (fi-snb-2600) fdo#100125

fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:438s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time:433s
fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:574s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:508s
fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:490s
fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:479s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:414s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:412s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:421s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:494s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:460s
fi-kbl-7500u     total:278  pass:255  dwarn:5   dfail:0   fail:0   skip:18  time:461s
fi-kbl-7560u     total:278  pass:263  dwarn:5   dfail:0   fail:0   skip:10  time:569s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:462s
fi-skl-6700hq    total:278  pass:239  dwarn:0   dfail:1   fail:17  skip:21  time:429s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:471s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:505s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:436s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:530s
fi-snb-2600      total:278  pass:248  dwarn:0   dfail:0   fail:1   skip:29  time:409s

c8f2238b9cbfef358e61596cd49b1f648c85811e drm-tip: 2017y-05m-24d-08h-04m-41s UTC integration manifest
532fa01 drm/i915: prevent generating unusable gvt build which no mpt module is selected

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4798/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-24  8:50 [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected changbin.du
                   ` (2 preceding siblings ...)
  2017-05-24  9:57 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-05-24 11:35 ` Jani Nikula
  2017-05-25  6:09   ` Du, Changbin
  3 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2017-05-24 11:35 UTC (permalink / raw)
  To: changbin.du, daniel.vetter, chris
  Cc: airlied, intel-gfx, dri-devel, intel-gvt-dev

On Wed, 24 May 2017, changbin.du@intel.com wrote:
> From: Changbin Du <changbin.du@intel.com>
>
> At least we need one MPT module (currently only have one) selected
> to get GVTg functional. When GVTg is enabled while no MPT selected,
> the build just includes useless GVTg code. This doesn't make sense.
>
> With this patch, a submenut is created under i915 as below:
>   -*- Enable Intel GVT-g graphics virtualization host support
>   <M> Enable KVM/VFIO support for Intel GVT-g
>
> If no MPT is selected, GVTg will be disabled automatically.
>   < > Enable KVM/VFIO support for Intel GVT-g
>
> Signed-off-by: Changbin Du <changbin.du@intel.com>
> ---
>  drivers/gpu/drm/i915/Kconfig | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index a5cd5da..e380a5d 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -91,12 +91,15 @@ config DRM_I915_USERPTR
>  
>  	  If in doubt, say "Y".
>  
> +menu "Intel GVT-g graphics virtualization host support"
> +	depends on DRM_I915
> +	depends on 64BIT
> +
>  config DRM_I915_GVT
> -        bool "Enable Intel GVT-g graphics virtualization host support"
> -        depends on DRM_I915
> -        depends on 64BIT
> -        default n
> -        help
> +	bool "Enable Intel GVT-g graphics virtualization host support"
> +	default n
> +	depends on DRM_I915_GVT_KVMGT
> +	help

With this change, you can't actually change this config option. It's
purely subject to CONFIG_DRM_I915_GVT_KVMGT. You need to enable KVMGT to
even see this option, but enabling it will enable this one too. You
can't disable this before you disable KVMGT, but then disabling KVMGT
will disable this one too. This config option becomes pointless as a
visible option. Which isn't all that bad, considering
Documentation/kbuild/kconfig-language.txt:

  Note:
	select should be used with care. select will force
	a symbol to a value without visiting the dependencies.
	By abusing select you are able to select a symbol FOO even
	if FOO depends on BAR that is not set.
	In general use select only for non-visible symbols
	(no prompts anywhere) and for symbols with no dependencies.
	That will limit the usefulness but on the other hand avoid
	the illegal configurations all over.

BR,
Jani.

>  	  Choose this option if you want to enable Intel GVT-g graphics
>  	  virtualization technology host support with integrated graphics.
>  	  With GVT-g, it's possible to have one integrated graphics
> @@ -116,13 +119,14 @@ config DRM_I915_GVT
>  
>  config DRM_I915_GVT_KVMGT
>  	tristate "Enable KVM/VFIO support for Intel GVT-g"
> -	depends on DRM_I915_GVT
> +	select DRM_I915_GVT
>  	depends on KVM
>  	depends on VFIO_MDEV && VFIO_MDEV_DEVICE
>  	default n
>  	help
>  	  Choose this option if you want to enable KVMGT support for
>  	  Intel GVT-g.
> +endmenu
>  
>  menu "drm/i915 Debugging"
>  depends on DRM_I915

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-24 11:35 ` [PATCH] " Jani Nikula
@ 2017-05-25  6:09   ` Du, Changbin
  2017-05-26  9:58     ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Du, Changbin @ 2017-05-25  6:09 UTC (permalink / raw)
  To: Jani Nikula; +Cc: airlied, intel-gfx, dri-devel, daniel.vetter, intel-gvt-dev


[-- Attachment #1.1: Type: text/plain, Size: 3002 bytes --]

Hi, Jani, just relized you are in i915 team. :)

> > +menu "Intel GVT-g graphics virtualization host support"
> > +	depends on DRM_I915
> > +	depends on 64BIT
> > +
> >  config DRM_I915_GVT
> > -        bool "Enable Intel GVT-g graphics virtualization host support"
> > -        depends on DRM_I915
> > -        depends on 64BIT
> > -        default n
> > -        help
> > +	bool "Enable Intel GVT-g graphics virtualization host support"
> > +	default n
> > +	depends on DRM_I915_GVT_KVMGT
> > +	help
> 
> With this change, you can't actually change this config option. It's
> purely subject to CONFIG_DRM_I915_GVT_KVMGT. You need to enable KVMGT to
> even see this option, but enabling it will enable this one too. You
> can't disable this before you disable KVMGT, but then disabling KVMGT
> will disable this one too. This config option becomes pointless as a
> visible option. Which isn't all that bad, considering
> Documentation/kbuild/kconfig-language.txt:
>
Jani, this is by design in this patch. We will add another xengt hypervisor glue
layer to support XenGT. After that, enable DRM_I915_GVT only if at least one of
KVMGT or XENGT enabled or both. Also it doesn't make sense that we only build
KVMGT/XenGT module without DRM_I915_GVT.

Such mechanism is not as straigforward as two simple 'choice', so I agree with
'choice' if you prefer it. As you said, it is not a big problem.

>   Note:
> 	select should be used with care. select will force
> 	a symbol to a value without visiting the dependencies.
> 	By abusing select you are able to select a symbol FOO even
> 	if FOO depends on BAR that is not set.
> 	In general use select only for non-visible symbols
> 	(no prompts anywhere) and for symbols with no dependencies.
> 	That will limit the usefulness but on the other hand avoid
> 	the illegal configurations all over.
> 
Yes, we should always be carefull with 'select' and should not use it if
possible. So here I must create a 'menu' to ensure its safety.

> BR,
> Jani.
> 
> >  	  Choose this option if you want to enable Intel GVT-g graphics
> >  	  virtualization technology host support with integrated graphics.
> >  	  With GVT-g, it's possible to have one integrated graphics
> > @@ -116,13 +119,14 @@ config DRM_I915_GVT
> >  
> >  config DRM_I915_GVT_KVMGT
> >  	tristate "Enable KVM/VFIO support for Intel GVT-g"
> > -	depends on DRM_I915_GVT
> > +	select DRM_I915_GVT
> >  	depends on KVM
> >  	depends on VFIO_MDEV && VFIO_MDEV_DEVICE
> >  	default n
> >  	help
> >  	  Choose this option if you want to enable KVMGT support for
> >  	  Intel GVT-g.
> > +endmenu
> >  
> >  menu "drm/i915 Debugging"
> >  depends on DRM_I915
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Thanks,
Changbin Du

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-25  6:09   ` Du, Changbin
@ 2017-05-26  9:58     ` Jani Nikula
  2017-05-26 10:27       ` Du, Changbin
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2017-05-26  9:58 UTC (permalink / raw)
  To: Du, Changbin; +Cc: airlied, intel-gfx, dri-devel, daniel.vetter, intel-gvt-dev

On Thu, 25 May 2017, "Du, Changbin" <changbin.du@intel.com> wrote:
> Hi, Jani, just relized you are in i915 team. :)
>
>> > +menu "Intel GVT-g graphics virtualization host support"
>> > +	depends on DRM_I915
>> > +	depends on 64BIT
>> > +
>> >  config DRM_I915_GVT
>> > -        bool "Enable Intel GVT-g graphics virtualization host support"
>> > -        depends on DRM_I915
>> > -        depends on 64BIT
>> > -        default n
>> > -        help
>> > +	bool "Enable Intel GVT-g graphics virtualization host support"
>> > +	default n
>> > +	depends on DRM_I915_GVT_KVMGT
>> > +	help
>> 
>> With this change, you can't actually change this config option. It's
>> purely subject to CONFIG_DRM_I915_GVT_KVMGT. You need to enable KVMGT to
>> even see this option, but enabling it will enable this one too. You
>> can't disable this before you disable KVMGT, but then disabling KVMGT
>> will disable this one too. This config option becomes pointless as a
>> visible option. Which isn't all that bad, considering
>> Documentation/kbuild/kconfig-language.txt:
>>
> Jani, this is by design in this patch. We will add another xengt hypervisor glue
> layer to support XenGT. After that, enable DRM_I915_GVT only if at least one of
> KVMGT or XENGT enabled or both. Also it doesn't make sense that we only build
> KVMGT/XenGT module without DRM_I915_GVT.
>
> Such mechanism is not as straigforward as two simple 'choice', so I agree with
> 'choice' if you prefer it. As you said, it is not a big problem.
>
>>   Note:
>> 	select should be used with care. select will force
>> 	a symbol to a value without visiting the dependencies.
>> 	By abusing select you are able to select a symbol FOO even
>> 	if FOO depends on BAR that is not set.
>> 	In general use select only for non-visible symbols
>> 	(no prompts anywhere) and for symbols with no dependencies.
>> 	That will limit the usefulness but on the other hand avoid
>> 	the illegal configurations all over.
>> 
> Yes, we should always be carefull with 'select' and should not use it if
> possible. So here I must create a 'menu' to ensure its safety.

I'm trying to say, why do you make DRM_I915_GVT visible in menuconfig at
all when you can't actually change it in menuconfig?

BR,
Jani.



>
>> BR,
>> Jani.
>> 
>> >  	  Choose this option if you want to enable Intel GVT-g graphics
>> >  	  virtualization technology host support with integrated graphics.
>> >  	  With GVT-g, it's possible to have one integrated graphics
>> > @@ -116,13 +119,14 @@ config DRM_I915_GVT
>> >  
>> >  config DRM_I915_GVT_KVMGT
>> >  	tristate "Enable KVM/VFIO support for Intel GVT-g"
>> > -	depends on DRM_I915_GVT
>> > +	select DRM_I915_GVT
>> >  	depends on KVM
>> >  	depends on VFIO_MDEV && VFIO_MDEV_DEVICE
>> >  	default n
>> >  	help
>> >  	  Choose this option if you want to enable KVMGT support for
>> >  	  Intel GVT-g.
>> > +endmenu
>> >  
>> >  menu "drm/i915 Debugging"
>> >  depends on DRM_I915
>> 
>> -- 
>> Jani Nikula, Intel Open Source Technology Center
>> _______________________________________________
>> intel-gvt-dev mailing list
>> intel-gvt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected
  2017-05-26  9:58     ` Jani Nikula
@ 2017-05-26 10:27       ` Du, Changbin
  0 siblings, 0 replies; 9+ messages in thread
From: Du, Changbin @ 2017-05-26 10:27 UTC (permalink / raw)
  To: Jani Nikula; +Cc: airlied, intel-gfx, dri-devel, daniel.vetter, intel-gvt-dev


[-- Attachment #1.1: Type: text/plain, Size: 2247 bytes --]

On Fri, May 26, 2017 at 12:58:55PM +0300, Jani Nikula wrote:
> On Thu, 25 May 2017, "Du, Changbin" <changbin.du@intel.com> wrote:
> >>   Note:
> >> 	select should be used with care. select will force
> >> 	a symbol to a value without visiting the dependencies.
> >> 	By abusing select you are able to select a symbol FOO even
> >> 	if FOO depends on BAR that is not set.
> >> 	In general use select only for non-visible symbols
> >> 	(no prompts anywhere) and for symbols with no dependencies.
> >> 	That will limit the usefulness but on the other hand avoid
> >> 	the illegal configurations all over.
> >> 
> > Yes, we should always be carefull with 'select' and should not use it if
> > possible. So here I must create a 'menu' to ensure its safety.
> 
> I'm trying to say, why do you make DRM_I915_GVT visible in menuconfig at
> all when you can't actually change it in menuconfig?
> 
ok, that is to info the user that GVT is enabled, since DRM_I915_GVT apply to
seperated i915 module. I saw similar behaviour in some driver, but cannot recall
its name now...

> BR,
> Jani.
> 
> 
> 
> >
> >> BR,
> >> Jani.
> >> 
> >> >  	  Choose this option if you want to enable Intel GVT-g graphics
> >> >  	  virtualization technology host support with integrated graphics.
> >> >  	  With GVT-g, it's possible to have one integrated graphics
> >> > @@ -116,13 +119,14 @@ config DRM_I915_GVT
> >> >  
> >> >  config DRM_I915_GVT_KVMGT
> >> >  	tristate "Enable KVM/VFIO support for Intel GVT-g"
> >> > -	depends on DRM_I915_GVT
> >> > +	select DRM_I915_GVT
> >> >  	depends on KVM
> >> >  	depends on VFIO_MDEV && VFIO_MDEV_DEVICE
> >> >  	default n
> >> >  	help
> >> >  	  Choose this option if you want to enable KVMGT support for
> >> >  	  Intel GVT-g.
> >> > +endmenu
> >> >  
> >> >  menu "drm/i915 Debugging"
> >> >  depends on DRM_I915
> >> 
> >> -- 
> >> Jani Nikula, Intel Open Source Technology Center
> >> _______________________________________________
> >> intel-gvt-dev mailing list
> >> intel-gvt-dev@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center

-- 
Thanks,
Changbin Du

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-05-26 10:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24  8:50 [PATCH] drm/i915: prevent generating unusable gvt build which no mpt module is selected changbin.du
2017-05-24  9:17 ` Zhenyu Wang
2017-05-24  9:21 ` Chris Wilson
2017-05-24  9:36   ` Du, Changbin
2017-05-24  9:57 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-05-24 11:35 ` [PATCH] " Jani Nikula
2017-05-25  6:09   ` Du, Changbin
2017-05-26  9:58     ` Jani Nikula
2017-05-26 10:27       ` Du, Changbin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.