[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen staging] libs/gnttab: add missing FreeBSD functions
From: patchbot () xen ! org
Date: 2019-02-20 11:33:04
Message-ID: E1gwQ7c-0007zB-Eq () xenbits ! xenproject ! org
[Download RAW message or body]
commit 1e12872d29cc36c61894e347dd3409d7d206699d
Author: Roger Pau Monne <roger.pau@citrix.com>
AuthorDate: Tue Feb 19 16:26:08 2019 +0100
Commit: Wei Liu <wei.liu2@citrix.com>
CommitDate: Wed Feb 20 11:27:48 2019 +0000
libs/gnttab: add missing FreeBSD functions
The FreeBSD implementation is missing the following functions:
osdep_gnttab_dmabuf_exp_from_refs
osdep_gnttab_dmabuf_exp_wait_released
osdep_gnttab_dmabuf_imp_to_refs
osdep_gnttab_dmabuf_imp_release
Which all deal with dmabufs, that only exists on Linux. Implement them
using abort, since such functions should never be called on FreeBSD.
FTR, I realized those functions where missing when attempting to use
pygrub:
Traceback (most recent call last):
File "/usr/local/lib/xen/bin/pygrub", line 19, in <module>
import xen.lowlevel.xc
ImportError: /usr/local/lib/libxengnttab.so.1: Undefined symbol "osdep_gnttab_dmabuf_exp_from_refs"
Fixes: ee8105 ("libgnttab: Add support for Linux dma-buf")
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
tools/libs/gnttab/freebsd.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/tools/libs/gnttab/freebsd.c b/tools/libs/gnttab/freebsd.c
index 5c12fe9b0b..886b588303 100644
--- a/tools/libs/gnttab/freebsd.c
+++ b/tools/libs/gnttab/freebsd.c
@@ -308,6 +308,35 @@ int osdep_gntshr_unshare(xengntshr_handle *xgs,
}
/*
+ * The functions below are Linux-isms that will likely never be implemented
+ * on FreeBSD unless FreeBSD also implements something akin to Linux dmabuf.
+ */
+int osdep_gnttab_dmabuf_exp_from_refs(xengnttab_handle *xgt, uint32_t domid,
+ uint32_t flags, uint32_t count,
+ const uint32_t *refs,
+ uint32_t *dmabuf_fd)
+{
+ abort();
+}
+
+int osdep_gnttab_dmabuf_exp_wait_released(xengnttab_handle *xgt,
+ uint32_t fd, uint32_t wait_to_ms)
+{
+ abort();
+}
+
+int osdep_gnttab_dmabuf_imp_to_refs(xengnttab_handle *xgt, uint32_t domid,
+ uint32_t fd, uint32_t count, uint32_t *refs)
+{
+ abort();
+}
+
+int osdep_gnttab_dmabuf_imp_release(xengnttab_handle *xgt, uint32_t fd)
+{
+ abort();
+}
+
+/*
* Local variables:
* mode: C
* c-file-style: "BSD"
--
generated by git-patchbot for /home/xen/git/xen.git#staging
[Attachment #3 (text/plain)]
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xenproject.org
https://lists.xenproject.org/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic