From: Oleksandr Grytsov <al1img@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com,
Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Subject: [PATCH v3 02/11] libxl: add API for PV display device driver
Date: Tue, 27 Jun 2017 13:03:18 +0300 [thread overview]
Message-ID: <1498557807-10810-3-git-send-email-al1img@gmail.com> (raw)
In-Reply-To: <1498557807-10810-1-git-send-email-al1img@gmail.com>
From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
add libxl_vdispl.c with API for display device driver
add libxl_vdispl.o to Makefile
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
---
tools/libxl/Makefile | 2 +-
tools/libxl/libxl.h | 21 +++++++++++++
tools/libxl/libxl_vdispl.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 99 insertions(+), 1 deletion(-)
create mode 100644 tools/libxl/libxl_vdispl.c
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 1bf6b8c..6f57e65 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -138,7 +138,7 @@ LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \
libxl_dom_suspend.o libxl_dom_save.o libxl_usb.o \
libxl_vtpm.o libxl_nic.o libxl_disk.o libxl_console.o \
libxl_cpupool.o libxl_mem.o libxl_sched.o libxl_tmem.o \
- libxl_9pfs.o libxl_domain.o \
+ libxl_9pfs.o libxl_domain.o libxl_vdispl.o \
$(LIBXL_OBJS-y)
LIBXL_OBJS += libxl_genid.o
LIBXL_OBJS += _libxl_types.o libxl_flask.o _libxl_types_internal.o
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index cf8687a..af8d9ce 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -1851,6 +1851,27 @@ libxl_device_vtpm *libxl_device_vtpm_list(libxl_ctx *ctx, uint32_t domid, int *n
int libxl_device_vtpm_getinfo(libxl_ctx *ctx, uint32_t domid,
libxl_device_vtpm *vtpm, libxl_vtpminfo *vtpminfo);
+/* Virtual displays */
+int libxl_device_vdispl_add(libxl_ctx *ctx, uint32_t domid,
+ libxl_device_vdispl *displ,
+ const libxl_asyncop_how *ao_how)
+ LIBXL_EXTERNAL_CALLERS_ONLY;
+int libxl_device_vdispl_remove(libxl_ctx *ctx, uint32_t domid,
+ libxl_device_vdispl *vdispl,
+ const libxl_asyncop_how *ao_how)
+ LIBXL_EXTERNAL_CALLERS_ONLY;
+int libxl_device_vdispl_destroy(libxl_ctx *ctx, uint32_t domid,
+ libxl_device_vdispl *vdispl,
+ const libxl_asyncop_how *ao_how)
+ LIBXL_EXTERNAL_CALLERS_ONLY;
+
+libxl_device_vdispl *libxl_device_vdispl_list(libxl_ctx *ctx, uint32_t domid,
+ int *num);
+void libxl_device_vdispl_list_free(libxl_device_vdispl* list, int num);
+int libxl_device_vdispl_getinfo(libxl_ctx *ctx, uint32_t domid,
+ libxl_device_vdispl *vdispl,
+ libxl_vdisplinfo *vdisplinfo);
+
/* Keyboard */
int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb,
const libxl_asyncop_how *ao_how)
diff --git a/tools/libxl/libxl_vdispl.c b/tools/libxl/libxl_vdispl.c
new file mode 100644
index 0000000..2658e25
--- /dev/null
+++ b/tools/libxl/libxl_vdispl.c
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2016 EPAM Systems Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ */
+
+#include "libxl_internal.h"
+
+static int libxl__device_from_vdispl(libxl__gc *gc, uint32_t domid,
+ libxl_device_vdispl *vdispl,
+ libxl__device *device)
+{
+ return 0;
+}
+
+static void libxl__update_config_vdispl(libxl__gc *gc,
+ libxl_device_vdispl *dst,
+ libxl_device_vdispl *src)
+{
+
+}
+
+static int libxl_device_vdispl_compare(libxl_device_vdispl *d1,
+ libxl_device_vdispl *d2)
+{
+ return COMPARE_DEVID(d1, d2);
+}
+
+static void libxl__device_vdispl_add(libxl__egc *egc, uint32_t domid,
+ libxl_device_vdispl *vdispl,
+ libxl__ao_device *aodev)
+{
+
+}
+
+libxl_device_vdispl *libxl_device_vdispl_list(libxl_ctx *ctx, uint32_t domid,
+ int *num)
+{
+ return NULL;
+}
+
+void libxl_device_vdispl_list_free(libxl_device_vdispl* list, int num)
+{
+
+}
+
+int libxl_device_vdispl_getinfo(libxl_ctx *ctx, uint32_t domid,
+ libxl_device_vdispl *vdispl,
+ libxl_vdisplinfo *info)
+{
+ return 0;
+}
+
+LIBXL_DEFINE_DEVICE_ADD(vdispl)
+static LIBXL_DEFINE_DEVICES_ADD(vdispl)
+LIBXL_DEFINE_DEVICE_REMOVE(vdispl)
+
+DEFINE_DEVICE_TYPE_STRUCT(vdispl,
+ .update_config = (void (*)(libxl__gc *, void *, void *))
+ libxl__update_config_vdispl
+);
+
+/*
+ * Local variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-06-27 10:03 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 10:03 [PATCH v3 00/11] libxl: add PV display device driver interface Oleksandr Grytsov
2017-06-27 10:03 ` [PATCH v3 01/11] libxl: add vdispl structures to idl Oleksandr Grytsov
2017-06-29 17:36 ` Wei Liu
2017-06-30 10:36 ` Oleksandr Grytsov
2017-06-30 14:15 ` Wei Liu
2017-06-27 10:03 ` Oleksandr Grytsov [this message]
2017-06-27 10:03 ` [PATCH v3 03/11] libxl: add generic function to get and free device list Oleksandr Grytsov
2017-06-29 17:36 ` Wei Liu
2017-06-30 13:24 ` Oleksandr Grytsov
2017-07-06 15:29 ` Wei Liu
2017-07-10 12:22 ` Oleksandr Grytsov
2017-07-10 12:26 ` Oleksandr Grytsov
2017-07-12 9:51 ` Wei Liu
2017-07-12 13:43 ` Oleksandr Grytsov
2017-07-12 14:06 ` Wei Liu
2017-07-12 9:50 ` Wei Liu
2017-06-27 10:03 ` [PATCH v3 04/11] libxl: add generic function to add device Oleksandr Grytsov
2017-06-29 17:36 ` Wei Liu
2017-06-30 13:24 ` Oleksandr Grytsov
2017-06-30 14:16 ` Wei Liu
2017-06-30 14:18 ` Wei Liu
2017-07-03 12:53 ` Oleksandr Grytsov
2017-07-03 12:57 ` Wei Liu
2017-07-04 9:41 ` Oleksandr Grytsov
2017-07-12 16:13 ` Oleksandr Grytsov
2017-07-18 13:35 ` Wei Liu
2017-07-06 15:51 ` Wei Liu
2017-07-07 9:49 ` Oleksandr Grytsov
2017-07-07 10:29 ` Oleksandr Grytsov
2017-07-07 10:32 ` Wei Liu
2017-07-07 10:56 ` Oleksandr Grytsov
2017-07-10 12:41 ` Oleksandr Grytsov
2017-07-12 10:12 ` Wei Liu
2017-06-27 10:03 ` [PATCH v3 05/11] libxl: add vdispl setting xen store configuration Oleksandr Grytsov
2017-06-27 10:03 ` [PATCH v3 06/11] libxl: implement vdispl get info function Oleksandr Grytsov
2017-06-27 10:03 ` [PATCH v3 07/11] libxl: implement device_from_vdispl and update_config_vdispl Oleksandr Grytsov
2017-06-27 10:03 ` [PATCH v3 08/11] libxl: add libxl__vdispl_devtype to device_type_tbl Oleksandr Grytsov
2017-06-27 10:03 ` [PATCH v3 09/11] libxl: add libxl_devid_to_device_vdispl interface function Oleksandr Grytsov
2017-06-27 10:03 ` [PATCH v3 10/11] xl: add PV display device commands Oleksandr Grytsov
2017-06-27 10:03 ` [PATCH v3 11/11] docs: add PV display driver information Oleksandr Grytsov
2017-06-29 17:36 ` Wei Liu
2017-06-30 10:43 ` Oleksandr Grytsov
2017-06-29 17:38 ` [PATCH v3 00/11] libxl: add PV display device driver interface Wei Liu
2017-06-30 10:45 ` Oleksandr Grytsov
2017-06-30 14:20 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498557807-10810-3-git-send-email-al1img@gmail.com \
--to=al1img@gmail.com \
--cc=ian.jackson@eu.citrix.com \
--cc=oleksandr_grytsov@epam.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).