xen: dma-buf support for grant device
Subsystems (2)
Re: [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
In reply to Boris OstrovskyQuoted 7 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2] I let Intel folks (CCed) to defend this patch as it was done primarily for them and I don't use it in any of my use-cases. So, from this POV it can be dropped, at least from this series.
Quoted 3 lines
-boris
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
Quoted 7 lines · Oleksandr Andrushchenko
Quoted 6 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Quoted 8 lines
Quoted 1 line
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2]
I let Intel folks (CCed) to defend this patch as it was done primarily for them
and I don't use it in any of my use-cases. So, from this POV it can be dropped,
at least from this series.
Yes, let's drop this until someone actually needs it.
-boris
Quoted 10 lines
Quoted 3 lines
-boris
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
In reply to Oleksandr AndrushchenkoQuoted 7 lines · Oleksandr Andrushchenko
Quoted 6 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Quoted 8 lines
Quoted 1 line
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2]
I let Intel folks (CCed) to defend this patch as it was done primarily for them
and I don't use it in any of my use-cases. So, from this POV it can be dropped,
at least from this series.
Yes, let's drop this until someone actually needs it.
-boris
Quoted 10 lines
Quoted 3 lines
-boris
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
Quoted 18 lines · Boris Ostrovsky
Quoted 7 lines · Oleksandr Andrushchenko
Quoted 6 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Quoted 8 lines
Quoted 1 line
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2]
I let Intel folks (CCed) to defend this patch as it was done primarily for them
and I don't use it in any of my use-cases. So, from this POV it can be dropped,
at least from this series.
Quoted 3 lines
Yes, let's drop this until someone actually needs it.
-boris
I agree. We are working on re-architecturing hyper_dmabuf. We would use zcopy apis however, not sure if we are going to do it from kernel or from userspace. So please do not expose those for now.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
-boris
Quoted 8 lines
Quoted 7 lines
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [Xen-devel] [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
Quoted 18 lines · Dongwon Kim
Quoted 17 lines · Boris Ostrovsky
Quoted 15 lines · Oleksandr Andrushchenko
Quoted 7 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2]
I let Intel folks (CCed) to defend this patch as it was done primarily for them
and I don't use it in any of my use-cases. So, from this POV it can be dropped,
at least from this series.
Quoted 6 lines
Quoted 3 lines
Yes, let's drop this until someone actually needs it.
-boris
I agree. We are working on re-architecturing
hyper_dmabuf. We would use zcopy apis however, not sure if we are going to do it from kernel or from userspace. So please do not expose those for now.
Ok, as we are all on the same page for that then I'll drop this patch for now
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
-boris
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
In reply to Dongwon KimQuoted 18 lines · Dongwon Kim
Quoted 17 lines · Boris Ostrovsky
Quoted 15 lines · Oleksandr Andrushchenko
Quoted 7 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2]
I let Intel folks (CCed) to defend this patch as it was done primarily for them
and I don't use it in any of my use-cases. So, from this POV it can be dropped,
at least from this series.
Quoted 6 lines
Quoted 3 lines
Yes, let's drop this until someone actually needs it.
-boris
I agree. We are working on re-architecturing
hyper_dmabuf. We would use zcopy apis however, not sure if we are going to do it from kernel or from userspace. So please do not expose those for now.
Ok, as we are all on the same page for that then I'll drop this patch for now
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
-boris
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
In reply to Boris OstrovskyQuoted 18 lines · Boris Ostrovsky
Quoted 7 lines · Oleksandr Andrushchenko
Quoted 6 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Quoted 8 lines
Quoted 1 line
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2]
I let Intel folks (CCed) to defend this patch as it was done primarily for them
and I don't use it in any of my use-cases. So, from this POV it can be dropped,
at least from this series.
Quoted 3 lines
Yes, let's drop this until someone actually needs it.
-boris
I agree. We are working on re-architecturing hyper_dmabuf. We would use zcopy apis however, not sure if we are going to do it from kernel or from userspace. So please do not expose those for now.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
-boris
Quoted 8 lines
Quoted 7 lines
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
In reply to Boris OstrovskyQuoted 7 lines · Boris Ostrovsky
Quoted 5 lines · Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
Can you give an example of who'd be using these interfaces?
There is no use-case at the moment I can think of, but hyper dma-buf [1], [2] I let Intel folks (CCed) to defend this patch as it was done primarily for them and I don't use it in any of my use-cases. So, from this POV it can be dropped, at least from this series.
Quoted 3 lines
-boris
[1] https://patchwork.freedesktop.org/series/38207/
[2] https://patchwork.freedesktop.org/patch/204447/
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 9/9 xen/gntdev: Expose gntdev's dma-buf API for in-kernel use
In reply to Oleksandr AndrushchenkoFrom: Oleksandr Andrushchenko <[email protected]>
Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module.
--- drivers/xen/gntdev-dmabuf.c | 6 +++ drivers/xen/gntdev.c | 92 +++++++++++++++++++++++-------------- include/xen/grant_dev.h | 37 +++++++++++++++ 3 files changed, 101 insertions(+), 34 deletions(-) create mode 100644 include/xen/grant_dev.h
drivers/xen/gntdev-dmabuf.c +6 -0
@@ -196,6 +196,7 @@ int gntdev_dmabuf_exp_wait_released(struct gntdev_dmabuf_priv *priv, int fd,dmabuf_exp_wait_obj_free (priv, obj);return ret; } +EXPORT_SYMBOL_GPL (gntdev_dmabuf_exp_wait_released);/* ------------------------------------------------------------------ */ /* DMA buffer export support. */
@@ -621,6 +622,7 @@ gntdev_dmabuf_imp_to_refs(struct gntdev_dmabuf_priv *priv, struct device *dev,dma_buf_put (dma_buf);return ret; } +EXPORT_SYMBOL_GPL (gntdev_dmabuf_imp_to_refs);u32 *gntdev_dmabuf_imp_get_refs (struct gntdev_dmabuf *gntdev_dmabuf) {
@@ -629,6 +631,7 @@ u32 *gntdev_dmabuf_imp_get_refs(struct gntdev_dmabuf *gntdev_dmabuf)return NULL ; } +EXPORT_SYMBOL_GPL (gntdev_dmabuf_imp_get_refs);/* * Find the hyper dma-buf by its file descriptor and remove
@@ -678,6 +681,7 @@ int gntdev_dmabuf_imp_release(struct gntdev_dmabuf_priv *priv, u32 fd)dmabuf_imp_free_storage (gntdev_dmabuf);return 0 ; } +EXPORT_SYMBOL_GPL (gntdev_dmabuf_imp_release);struct gntdev_dmabuf_priv *gntdev_dmabuf_init (void ) {
@@ -694,8 +698,10 @@ struct gntdev_dmabuf_priv *gntdev_dmabuf_init(void)return priv; } +EXPORT_SYMBOL_GPL (gntdev_dmabuf_init);void gntdev_dmabuf_fini (struct gntdev_dmabuf_priv *priv) {kfree (priv); } +EXPORT_SYMBOL_GPL (gntdev_dmabuf_fini);
drivers/xen/gntdev.c +58 -34
140 lines not on this page · raw message
include/xen/grant_dev.h new file +37 -0
@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +/* +* Grant device kernel API +* +* Copyright (C) 2018 EPAM Systems Inc. +* +* Author: Oleksandr Andrushchenko <[email protected]> +*/ + +#ifndef _GRANT_DEV_H +#define _GRANT_DEV_H + +#include <linux/types.h> + +struct device ; +struct gntdev_priv ; +#ifdef CONFIG_XEN_GNTDEV_DMABUF +struct xen_dmabuf ; +#endif + +struct gntdev_priv *gntdev_alloc_context (struct device *dev); +void gntdev_free_context (struct gntdev_priv *priv); + +#ifdef CONFIG_XEN_GNTDEV_DMABUF +int gntdev_dmabuf_exp_from_refs (struct gntdev_priv *priv,int flags, +int count,u32 domid,u32 *refs,u32 *fd); +int gntdev_dmabuf_exp_wait_released (struct gntdev_priv *priv,int fd, +int wait_to_ms); + +struct xen_dmabuf *gntdev_dmabuf_imp_to_refs (struct gntdev_priv *priv, +int fd,int count,int domid); +u32 *gntdev_dmabuf_imp_get_refs (struct xen_dmabuf *xen_dmabuf); +int gntdev_dmabuf_imp_release (struct gntdev_priv *priv,u32 fd); +#endif + +#endif
Signature · 7 lines
2.17.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel