diff mbox series

[hmm,08/15] xen/gntdev: Use select for DMA_SHARED_BUFFER

Message ID 20191015181242.8343-9-jgg@ziepe.ca (mailing list archive)
State New, archived
Headers show
Series Consolidate the mmu notifier interval_tree and locking | expand

Commit Message

Jason Gunthorpe Oct. 15, 2019, 6:12 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

DMA_SHARED_BUFFER can not be enabled by the user (it represents a library
set in the kernel). The kconfig convention is to use select for such
symbols so they are turned on implicitly when the user enables a kconfig
that needs them.

Otherwise the XEN_GNTDEV_DMABUF kconfig is overly difficult to enable.

Fixes: 932d6562179e ("xen/gntdev: Add initial support for dma-buf UAPI")
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 drivers/xen/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Oleksandr Andrushchenko Oct. 16, 2019, 6:35 a.m. UTC | #1
On 10/16/19 8:11 AM, Jürgen Groß wrote:
> On 15.10.19 20:12, Jason Gunthorpe wrote:
>> From: Jason Gunthorpe <jgg@mellanox.com>
>>
>> DMA_SHARED_BUFFER can not be enabled by the user (it represents a 
>> library
>> set in the kernel). The kconfig convention is to use select for such
>> symbols so they are turned on implicitly when the user enables a kconfig
>> that needs them.
>>
>> Otherwise the XEN_GNTDEV_DMABUF kconfig is overly difficult to enable.
>>
>> Fixes: 932d6562179e ("xen/gntdev: Add initial support for dma-buf UAPI")
>> Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Cc: xen-devel@lists.xenproject.org
>> Cc: Juergen Gross <jgross@suse.com>
>> Cc: Stefano Stabellini <sstabellini@kernel.org>
>> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
>
> Reviewed-by: Juergen Gross <jgross@suse.com>
>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>
> Juergen
Jason Gunthorpe Oct. 21, 2019, 7:12 p.m. UTC | #2
On Wed, Oct 16, 2019 at 06:35:15AM +0000, Oleksandr Andrushchenko wrote:
> On 10/16/19 8:11 AM, Jürgen Groß wrote:
> > On 15.10.19 20:12, Jason Gunthorpe wrote:
> >> From: Jason Gunthorpe <jgg@mellanox.com>
> >>
> >> DMA_SHARED_BUFFER can not be enabled by the user (it represents a 
> >> library
> >> set in the kernel). The kconfig convention is to use select for such
> >> symbols so they are turned on implicitly when the user enables a kconfig
> >> that needs them.
> >>
> >> Otherwise the XEN_GNTDEV_DMABUF kconfig is overly difficult to enable.
> >>
> >> Fixes: 932d6562179e ("xen/gntdev: Add initial support for dma-buf UAPI")
> >> Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> >> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> >> Cc: xen-devel@lists.xenproject.org
> >> Cc: Juergen Gross <jgross@suse.com>
> >> Cc: Stefano Stabellini <sstabellini@kernel.org>
> >> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> >
> > Reviewed-by: Juergen Gross <jgross@suse.com>
> >
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

Thanks Oleksandr and Juergen, can you also give me some advice on how
to progress the more complex patch:

https://patchwork.kernel.org/patch/11191369/

Is this gntdev stuff still in-use? I struggled a bit to understand
what it is doing, but I think I made a reasonable guess?

Jason
Oleksandr Andrushchenko Oct. 28, 2019, 6:25 a.m. UTC | #3
On 10/21/19 10:12 PM, Jason Gunthorpe wrote:
> On Wed, Oct 16, 2019 at 06:35:15AM +0000, Oleksandr Andrushchenko wrote:
>> On 10/16/19 8:11 AM, Jürgen Groß wrote:
>>> On 15.10.19 20:12, Jason Gunthorpe wrote:
>>>> From: Jason Gunthorpe <jgg@mellanox.com>
>>>>
>>>> DMA_SHARED_BUFFER can not be enabled by the user (it represents a
>>>> library
>>>> set in the kernel). The kconfig convention is to use select for such
>>>> symbols so they are turned on implicitly when the user enables a kconfig
>>>> that needs them.
>>>>
>>>> Otherwise the XEN_GNTDEV_DMABUF kconfig is overly difficult to enable.
>>>>
>>>> Fixes: 932d6562179e ("xen/gntdev: Add initial support for dma-buf UAPI")
>>>> Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>>> Cc: xen-devel@lists.xenproject.org
>>>> Cc: Juergen Gross <jgross@suse.com>
>>>> Cc: Stefano Stabellini <sstabellini@kernel.org>
>>>> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
>>> Reviewed-by: Juergen Gross <jgross@suse.com>
>>>
>> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> Thanks Oleksandr and Juergen, can you also give me some advice on how
> to progress the more complex patch:
>
> https://patchwork.kernel.org/patch/11191369/
>
> Is this gntdev stuff still in-use? I struggled a bit to understand
> what it is doing, but I think I made a reasonable guess?
I think Jurgen and Boris could help here
> Jason
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
diff mbox series

Patch

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 79cc75096f4232..a50dadd0109336 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -141,7 +141,8 @@  config XEN_GNTDEV
 
 config XEN_GNTDEV_DMABUF
 	bool "Add support for dma-buf grant access device driver extension"
-	depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC && DMA_SHARED_BUFFER
+	depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC
+	select DMA_SHARED_BUFFER
 	help
 	  Allows userspace processes and kernel modules to use Xen backed
 	  dma-buf implementation. With this extension grant references to