diff mbox series

[1/4] vfio-mdev: allow building the samples into the kernel

Message ID 20230110091009.474427-2-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/4] vfio-mdev: allow building the samples into the kernel | expand

Commit Message

Christoph Hellwig Jan. 10, 2023, 9:10 a.m. UTC
There is nothing in the vfio-mdev sample drivers that requires building
them as modules, so remove that restriction.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 samples/Kconfig | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Anthony Krowiak Jan. 10, 2023, 2:54 p.m. UTC | #1
On 1/10/23 4:10 AM, Christoph Hellwig wrote:
> There is nothing in the vfio-mdev sample drivers that requires building
> them as modules, so remove that restriction.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   samples/Kconfig | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/samples/Kconfig b/samples/Kconfig
> index 0d81c00289ee36..f1b8d4ff123036 100644
> --- a/samples/Kconfig
> +++ b/samples/Kconfig
> @@ -184,23 +184,23 @@ config SAMPLE_UHID
>   	  Build UHID sample program.
>   
>   config SAMPLE_VFIO_MDEV_MTTY
> -	tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
> -	depends on VFIO_MDEV && m
> +	tristate "Build VFIO mtty example mediated device sample code"
> +	depends on VFIO_MDEV


Admittedly, I'm not very fluent with Kconfig, but in patch 2 you stated, 
"VFIO_MDEV is just a library with helpers for the drivers. Stop making 
it a user choice and just select it by the drivers that use the 
helpers". Why are you not selecting it here?


>   	help
>   	  Build a virtual tty sample driver for use as a VFIO
>   	  mediated device
>   
>   config SAMPLE_VFIO_MDEV_MDPY
> -	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
> -	depends on VFIO_MDEV && m
> +	tristate "Build VFIO mdpy example mediated device sample code"
> +	depends on VFIO_MDEV
>   	help
>   	  Build a virtual display sample driver for use as a VFIO
>   	  mediated device.  It is a simple framebuffer and supports
>   	  the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
>   
>   config SAMPLE_VFIO_MDEV_MDPY_FB
> -	tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
> -	depends on FB && m
> +	tristate "Build VFIO mdpy example guest fbdev driver"
> +	depends on FB
>   	select FB_CFB_FILLRECT
>   	select FB_CFB_COPYAREA
>   	select FB_CFB_IMAGEBLIT
> @@ -208,8 +208,8 @@ config SAMPLE_VFIO_MDEV_MDPY_FB
>   	  Guest fbdev driver for the virtual display sample driver.
>   
>   config SAMPLE_VFIO_MDEV_MBOCHS
> -	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
> -	depends on VFIO_MDEV && m
> +	tristate "Build VFIO mdpy example mediated device sample code"
> +	depends on VFIO_MDEV
>   	select DMA_SHARED_BUFFER
>   	help
>   	  Build a virtual display sample driver for use as a VFIO
Christoph Hellwig Jan. 10, 2023, 3:27 p.m. UTC | #2
On Tue, Jan 10, 2023 at 09:54:51AM -0500, Anthony Krowiak wrote:
>> +	tristate "Build VFIO mtty example mediated device sample code"
>> +	depends on VFIO_MDEV
>
>
> Admittedly, I'm not very fluent with Kconfig, but in patch 2 you stated, 
> "VFIO_MDEV is just a library with helpers for the drivers. Stop making it a 
> user choice and just select it by the drivers that use the helpers". Why 
> are you not selecting it here?

Because this changes one thing at a time.  Patch 2 then switches this
depends to a select.
Anthony Krowiak Jan. 10, 2023, 3:32 p.m. UTC | #3
On 1/10/23 10:27 AM, Christoph Hellwig wrote:
> On Tue, Jan 10, 2023 at 09:54:51AM -0500, Anthony Krowiak wrote:
>>> +	tristate "Build VFIO mtty example mediated device sample code"
>>> +	depends on VFIO_MDEV
>>
>> Admittedly, I'm not very fluent with Kconfig, but in patch 2 you stated,
>> "VFIO_MDEV is just a library with helpers for the drivers. Stop making it a
>> user choice and just select it by the drivers that use the helpers". Why
>> are you not selecting it here?
> Because this changes one thing at a time.  Patch 2 then switches this
> depends to a select.


My bad, I missed it.

Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
diff mbox series

Patch

diff --git a/samples/Kconfig b/samples/Kconfig
index 0d81c00289ee36..f1b8d4ff123036 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -184,23 +184,23 @@  config SAMPLE_UHID
 	  Build UHID sample program.
 
 config SAMPLE_VFIO_MDEV_MTTY
-	tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
-	depends on VFIO_MDEV && m
+	tristate "Build VFIO mtty example mediated device sample code"
+	depends on VFIO_MDEV
 	help
 	  Build a virtual tty sample driver for use as a VFIO
 	  mediated device
 
 config SAMPLE_VFIO_MDEV_MDPY
-	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
-	depends on VFIO_MDEV && m
+	tristate "Build VFIO mdpy example mediated device sample code"
+	depends on VFIO_MDEV
 	help
 	  Build a virtual display sample driver for use as a VFIO
 	  mediated device.  It is a simple framebuffer and supports
 	  the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
 
 config SAMPLE_VFIO_MDEV_MDPY_FB
-	tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
-	depends on FB && m
+	tristate "Build VFIO mdpy example guest fbdev driver"
+	depends on FB
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -208,8 +208,8 @@  config SAMPLE_VFIO_MDEV_MDPY_FB
 	  Guest fbdev driver for the virtual display sample driver.
 
 config SAMPLE_VFIO_MDEV_MBOCHS
-	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
-	depends on VFIO_MDEV && m
+	tristate "Build VFIO mdpy example mediated device sample code"
+	depends on VFIO_MDEV
 	select DMA_SHARED_BUFFER
 	help
 	  Build a virtual display sample driver for use as a VFIO