Skip to contentSkip to conversation

libxl: add PV display device driver interface

PATCH Superseded Oleksandr Grytsov 2 participants 8 messages May 25, 2017 – Jun 21, 2017

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover libxl: add PV display device driver interface

From: Oleksandr Grytsov <[email protected]>

These patches add PV display device to libxl and xl.

Changes since v1:
* add connector id;
* set connector resolution and id to Xen store;

Oleksandr Grytsov (3):
libxl: add PV display device driver interface
xl: add PV display device commands
docs: add virtual display driver information

 docs/man/xl.cfg.pod.5.in             |  54 +++++
 docs/man/xl.pod.1.in                 |  42 ++++
 tools/libxl/Makefile                 |   2 +-
 tools/libxl/libxl.h                  |  21 ++
 tools/libxl/libxl_create.c           |   3 +
 tools/libxl/libxl_device.c           | 178 ++++++++++++++++-
 tools/libxl/libxl_internal.h         |  24 +++
 tools/libxl/libxl_types.idl          |  40 +++-
 tools/libxl/libxl_types_internal.idl |   1 +
 tools/libxl/libxl_usb.c              |   2 +
 tools/libxl/libxl_utils.h            |   4 +
 tools/libxl/libxl_vdispl.c           | 372 +++++++++++++++++++++++++++++++++++
 tools/xl/Makefile                    |   1 +
 tools/xl/xl.h                        |   3 +
 tools/xl/xl_cmdtable.c               |  19 ++
 tools/xl/xl_parse.c                  |  77 +++++++-
 tools/xl/xl_parse.h                  |   2 +-
 tools/xl/xl_vdispl.c                 | 166 ++++++++++++++++
 18 files changed, 1005 insertions(+), 6 deletions(-)
 create mode 100644 tools/libxl/libxl_vdispl.c
 create mode 100644 tools/xl/xl_vdispl.c
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

PATCH v2 1/3 libxl: add PV display device driver interface

From: Oleksandr Grytsov <[email protected]>

---
 tools/libxl/Makefile                 |   2 +-
 tools/libxl/libxl.h                  |  21 ++
 tools/libxl/libxl_create.c           |   3 +
 tools/libxl/libxl_device.c           | 178 ++++++++++++++++-
 tools/libxl/libxl_internal.h         |  24 +++
 tools/libxl/libxl_types.idl          |  40 +++-
 tools/libxl/libxl_types_internal.idl |   1 +
 tools/libxl/libxl_usb.c              |   2 +
 tools/libxl/libxl_utils.h            |   4 +
 tools/libxl/libxl_vdispl.c           | 372 +++++++++++++++++++++++++++++++++++
 10 files changed, 643 insertions(+), 4 deletions(-)
 create mode 100644 tools/libxl/libxl_vdispl.c
tools/libxl/Makefile +1 -1
index 566b706..3a932e1 100644
@@ -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_domain.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
tools/libxl/libxl.h +21 -0
index 72ec39d..4eff121 100644
@@ -1833,6 +1833,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)
tools/libxl/libxl_create.c +3 -0
index 25389e1..b36383f 100644
@@ -1422,6 +1422,8 @@ out:
 
 #define libxl_device_dtdev_list NULL
 #define libxl_device_dtdev_compare NULL
+#define libxl__device_from_dtdev NULL
+#define libxl__device_dtdev_setdefault NULL
 static DEFINE_DEVICE_TYPE_STRUCT(dtdev);
 
 const struct libxl_device_type *device_type_tbl[] = {
@@ -1432,6 +1434,7 @@ const struct libxl_device_type *device_type_tbl[] = {
     &libxl__usbdev_devtype,
     &libxl__pcidev_devtype,
     &libxl__dtdev_devtype,
+    &libxl__vdispl_devtype,
     NULL
 };
 
tools/libxl/libxl_device.c +177 -1

190 lines not on this page · raw message

tools/libxl/libxl_internal.h +24 -0
index 25cb08a..9e51823 100644
@@ -1204,6 +1204,7 @@ _hidden int libxl__device_exists(libxl__gc *gc, xs_transaction_t t,
                                  libxl__device *device);
 _hidden int libxl__device_generic_add(libxl__gc *gc, xs_transaction_t t,
         libxl__device *device, char **bents, char **fents, char **ro_fents);
+_hidden char *libxl__device_frontend_path(libxl__gc *gc, libxl__device *device);
 _hidden char *libxl__device_backend_path(libxl__gc *gc, libxl__device *device);
 _hidden char *libxl__device_libxl_path(libxl__gc *gc, libxl__device *device);
 _hidden int libxl__parse_backend_path(libxl__gc *gc, const char *path,
@@ -3473,11 +3474,17 @@ struct libxl_device_type {
     void (*add)(libxl__egc *, libxl__ao *, uint32_t, libxl_domain_config *,
                 libxl__multidev *);
     void *(*list)(libxl_ctx *, uint32_t, int *);
+    int (*set_default)(libxl__gc *, uint32_t, void *);
+    int (*to_device)(libxl__gc *, uint32_t, void *, libxl__device *);
+    void (*init)(void *);
+    void (*copy)(libxl_ctx *, void *, void *);
     void (*dispose)(void *);
     int (*compare)(void *, void *);
     void (*merge)(libxl_ctx *, void *, void *);
     int (*dm_needed)(void *, unsigned);
     void (*update_config)(libxl__gc *, void *, void *);
+    int (*from_xenstore)(libxl__gc *, const char *, uint32_t, void *);
+    int (*set_xenstore_config)(libxl__gc *, uint32_t, void *);
 };
 
 #define DEFINE_DEVICE_TYPE_STRUCT_X(name, sname, ...)                          \
@@ -3489,6 +3496,14 @@ struct libxl_device_type {
         .add           = libxl__add_ ## name ## s,                             \
         .list          = (void *(*)(libxl_ctx *, uint32_t, int *))             \
                          libxl_device_ ## sname ## _list,                      \
+        .set_default   = (int (*)(libxl__gc *, uint32_t, void *))              \
+                         libxl__device_ ## sname ## _setdefault,               \
+        .to_device     = (int (*)(libxl__gc *, uint32_t,                       \
+                                  void *, libxl__device *))                    \
+                         libxl__device_from_ ## name,                          \
+        .init          = (void (*)(void *))libxl_device_ ## sname ## _init,    \
+        .copy          = (void (*)(libxl_ctx *, void *, void *))               \
+                         libxl_device_ ## sname ## _copy,                      \
         .dispose       = (void (*)(void *))libxl_device_ ## sname ## _dispose, \
         .compare       = (int (*)(void *, void *))                             \
                          libxl_device_ ## sname ## _compare,                   \
@@ -3523,6 +3538,7 @@ extern const struct libxl_device_type libxl__vtpm_devtype;
 extern const struct libxl_device_type libxl__usbctrl_devtype;
 extern const struct libxl_device_type libxl__usbdev_devtype;
 extern const struct libxl_device_type libxl__pcidev_devtype;
+extern const struct libxl_device_type libxl__vdispl_devtype;
 
 extern const struct libxl_device_type *device_type_tbl[];
 
@@ -4339,6 +4355,14 @@ static inline bool libxl__acpi_defbool_val(const libxl_domain_build_info *b_info
     return libxl_defbool_val(b_info->acpi) &&
            libxl_defbool_val(b_info->u.hvm.acpi);
 }
+
+void libxl__device_add(libxl__egc *egc, uint32_t domid,
+                       const struct libxl_device_type *dt, void *type,
+                       libxl__ao_device *aodev);
+void* libxl__device_list(const struct libxl_device_type *dt,
+                         libxl_ctx *ctx, uint32_t domid, int *num);
+void libxl__device_list_free(const struct libxl_device_type *dt,
+                             void *list, int num);
 #endif
 
 /*
tools/libxl/libxl_types.idl +38 -2
index 2475a4d..d5684a6 100644
@@ -738,7 +738,21 @@ libxl_device_vtpm = Struct("device_vtpm", [
     ("backend_domname",  string),
     ("devid",            libxl_devid),
     ("uuid",             libxl_uuid),
-])
+    ])
+
+libxl_connector_param = Struct("connector_param", [
+    ("id", string),
+    ("width", uint32),
+    ("height", uint32)
+    ])
+
+libxl_device_vdispl = Struct("device_vdispl", [
+    ("backend_domid", libxl_domid),
+    ("backend_domname", string),
+    ("devid", libxl_devid),
+    ("be_alloc", bool),
+    ("connectors", Array(libxl_connector_param, "num_connectors"))
+    ])
 
 libxl_device_channel = Struct("device_channel", [
     ("backend_domid", libxl_domid),
@@ -750,7 +764,7 @@ libxl_device_channel = Struct("device_channel", [
             ("pty", None),
             ("socket", Struct(None, [("path", string)])),
            ])),
-])
+    ])
 
 libxl_domain_config = Struct("domain_config", [
     ("c_info", libxl_domain_create_info),
@@ -764,6 +778,7 @@ libxl_domain_config = Struct("domain_config", [
     ("vfbs", Array(libxl_device_vfb, "num_vfbs")),
     ("vkbs", Array(libxl_device_vkb, "num_vkbs")),
     ("vtpms", Array(libxl_device_vtpm, "num_vtpms")),
+    ("vdispls", Array(libxl_device_vdispl, "num_vdispls")),
     # a channel manifests as a console with a name,
     # see docs/misc/channels.txt
     ("channels", Array(libxl_device_channel, "num_channels")),
@@ -860,6 +875,27 @@ libxl_physinfo = Struct("physinfo", [
     ("cap_hvm_directio", bool),
     ], dir=DIR_OUT)
 
+libxl_connectorinfo = Struct("connectorinfo", [
+    ("id", string),
+    ("width", uint32),
+    ("height", uint32),
+    ("req_evtch", integer),
+    ("req_rref", integer),
+    ("evt_evtch", integer),
+    ("evt_rref", integer),
+    ], dir=DIR_OUT)
+
+libxl_vdisplinfo = Struct("vdisplinfo", [
+    ("backend", string),
+    ("backend_id", uint32),
+    ("frontend", string),
+    ("frontend_id", uint32),
+    ("devid", libxl_devid),
+    ("state", integer),
+    ("be_alloc", bool),
+    ("connectors", Array(libxl_connectorinfo, "num_connectors"))
+    ], dir=DIR_OUT)
+
 # NUMA node characteristics: size and free are how much memory it has, and how
 # much of it is free, respectively. dists is an array of distances from this
 # node to each other node.
tools/libxl/libxl_types_internal.idl +1 -0
index 82e5c07..cdef4d3 100644
@@ -25,6 +25,7 @@ libxl__device_kind = Enumeration("device_kind", [
     (8, "VTPM"),
     (9, "VUSB"),
     (10, "QUSB"),
+    (11, "VDISPL")
     ])
 
 libxl__console_backend = Enumeration("console_backend", [
tools/libxl/libxl_usb.c +2 -0
index d8948d5..d1ec28f 100644
@@ -1968,6 +1968,8 @@ void libxl_device_usbdev_list_free(libxl_device_usbdev *list, int nr)
 DEFINE_DEVICE_TYPE_STRUCT(usbctrl,
     .dm_needed = libxl_device_usbctrl_dm_needed
 );
+
+#define libxl__device_from_usbdev NULL
 DEFINE_DEVICE_TYPE_STRUCT(usbdev);
 
 /*
tools/libxl/libxl_utils.h +4 -0
index 25773d8..9e743dc 100644
@@ -78,6 +78,10 @@ int libxl_devid_to_device_vtpm(libxl_ctx *ctx, uint32_t domid,
                                int devid, libxl_device_vtpm *vtpm);
 int libxl_devid_to_device_usbctrl(libxl_ctx *ctx, uint32_t domid,
                                   int devid, libxl_device_usbctrl *usbctrl);
+
+int libxl_devid_to_device_vdispl(libxl_ctx *ctx, uint32_t domid,
+                                 int devid, libxl_device_vdispl *vdispl);
+
 int libxl_ctrlport_to_device_usbdev(libxl_ctx *ctx, uint32_t domid,
                                     int ctrl, int port,
                                     libxl_device_usbdev *usbdev);
tools/libxl/libxl_vdispl.c new file +372 -0

372 lines not on this page · raw message

Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#2 lore raw
Quoted 2 lines · Oleksandr Grytsov

From: Oleksandr Grytsov <[email protected]>

I'm sorry, patch like this is impossible to review because: 1. there is no commit message 2. it is huge.

I can see it is adding a lot of hooks to the device handling framework. Please explain why they are needed. This sort of changes (refactoring and extending existing code) should also be in separate patches.

Quoted 36 lines
---
 tools/libxl/Makefile                 |   2 +-
 tools/libxl/libxl.h                  |  21 ++
 tools/libxl/libxl_create.c           |   3 +
 tools/libxl/libxl_device.c           | 178 ++++++++++++++++-
 tools/libxl/libxl_internal.h         |  24 +++
 tools/libxl/libxl_types.idl          |  40 +++-
 tools/libxl/libxl_types_internal.idl |   1 +
 tools/libxl/libxl_usb.c              |   2 +
 tools/libxl/libxl_utils.h            |   4 +
 tools/libxl/libxl_vdispl.c           | 372 +++++++++++++++++++++++++++++++++++
 10 files changed, 643 insertions(+), 4 deletions(-)
 create mode 100644 tools/libxl/libxl_vdispl.c

};

tools/libxl/libxl_device.c +4 -1
index 5e96676..2954800 100644
@@ -18,7 +18,7 @@
 
 #include "libxl_internal.h"
 
-static char *libxl__device_frontend_path(libxl__gc *gc, libxl__device *device)
+char *libxl__device_frontend_path(libxl__gc *gc, libxl__device *device)
 {
     char *dom_path = libxl__xs_get_dompath(gc, device->domid);
 
@@ -1776,6 +1776,182 @@ out:
     return AO_CREATE_FAIL(rc);
 }
 
+static int device_add_domain_config(libxl__gc *gc, uint32_t domid,
+                                    const struct libxl_device_type *dt,
+                                    void *type)

[...]

Quoted 4 lines
tools/libxl/libxl_device.c +4 -0
+
+void libxl__device_add(libxl__egc *egc, uint32_t domid,
+                       const struct libxl_device_type *dt, void *type,
+                       libxl__ao_device *aodev)

[...]

Quoted 3 lines
tools/libxl/libxl_device.c +3 -0
+
+void* libxl__device_list(const struct libxl_device_type *dt,
+                         libxl_ctx *ctx, uint32_t domid, int *num)

[...]

tools/libxl/libxl_device.c out: · line 1944

Quoted 4 lines
tools/libxl/libxl_device.c +3 -0
+
+void libxl__device_list_free(const struct libxl_device_type *dt,
+                             void *list, int num)

I think existing code already provides these functionalities, right?

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 3 lines · Wei Liu
Quoted 2 lines · Oleksandr Grytsov

From: Oleksandr Grytsov <[email protected]>

Hi Wei,

Thank you for your reply.

Quoted 2 lines

I'm sorry, patch like this is impossible to review because: 1. there is no commit message 2. it is huge.

I will separate it to small ones and will add commit message.

Quoted 3 lines

I can see it is adding a lot of hooks to the device handling framework. Please explain why they are needed. This sort of changes (refactoring and extending existing code) should also be in separate patches.

Hooks in the device handling framework is needed to avoid code duplication on new PV device adding. There were two possibilities either use macro or extend the device handling framework. See [1] and following conversation for more details. The patches don't refactor existing code they extend hooks to the device handling framework and add new functionality required to add the display device driver.

Almost all libxl__device_xxxx_add functions are the same except Xen store parameters. So, I've moved setting Xen store parameters to set_xenstore_config hook
and have created common function to add device (add hook). Also I've created functions to libxl_device_xxxx_list and libxl_device_xxxx_list_free.
which take device type as parameter.

Quoted 47 lines
Quoted 37 lines
---
 tools/libxl/Makefile                 |   2 +-
 tools/libxl/libxl.h                  |  21 ++
 tools/libxl/libxl_create.c           |   3 +
 tools/libxl/libxl_device.c           | 178 ++++++++++++++++-
 tools/libxl/libxl_internal.h         |  24 +++
 tools/libxl/libxl_types.idl          |  40 +++-
 tools/libxl/libxl_types_internal.idl |   1 +
 tools/libxl/libxl_usb.c              |   2 +
 tools/libxl/libxl_utils.h            |   4 +
 tools/libxl/libxl_vdispl.c           | 372 +++++++++++++++++++++++++++++++++++
 10 files changed, 643 insertions(+), 4 deletions(-)
 create mode 100644 tools/libxl/libxl_vdispl.c

};

tools/libxl/libxl_device.c +4 -1
index 5e96676..2954800 100644
@@ -18,7 +18,7 @@
 
 #include "libxl_internal.h"
 
-static char *libxl__device_frontend_path(libxl__gc *gc, libxl__device *device)
+char *libxl__device_frontend_path(libxl__gc *gc, libxl__device *device)
 {
     char *dom_path = libxl__xs_get_dompath(gc, device->domid);
 
@@ -1776,6 +1776,182 @@ out:
     return AO_CREATE_FAIL(rc);
 }
 
+static int device_add_domain_config(libxl__gc *gc, uint32_t domid,
+                                    const struct libxl_device_type *dt,
+                                    void *type)

[...]

Quoted 4 lines
tools/libxl/libxl_device.c +4 -0
+
+void libxl__device_add(libxl__egc *egc, uint32_t domid,
+                       const struct libxl_device_type *dt, void *type,
+                       libxl__ao_device *aodev)

[...]

Quoted 3 lines
tools/libxl/libxl_device.c +3 -0
+
+void* libxl__device_list(const struct libxl_device_type *dt,
+                         libxl_ctx *ctx, uint32_t domid, int *num)

[...]

Quoted 6 lines

tools/libxl/libxl_device.c out: · line 1944

Quoted 4 lines
tools/libxl/libxl_device.c +3 -0
+
+void libxl__device_list_free(const struct libxl_device_type *dt,
+                             void *list, int num)

I think existing code already provides these functionalities, right?

Right, but as I mentioned before there are almost same functions for each device. These new functions are generic.

[1] http://marc.info/?l=xen-devel&m=149026463411873&w=2

Signature · 7 lines
Best Regards,
Oleksandr Grytsov.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#4 lore raw

PATCH v2 2/3 xl: add PV display device commands

In reply to Oleksandr Grytsov

From: Oleksandr Grytsov <[email protected]>

---
 tools/xl/Makefile      |   1 +
 tools/xl/xl.h          |   3 +
 tools/xl/xl_cmdtable.c |  19 ++++++
 tools/xl/xl_parse.c    |  77 ++++++++++++++++++++++-
 tools/xl/xl_parse.h    |   2 +-
 tools/xl/xl_vdispl.c   | 166 +++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 266 insertions(+), 2 deletions(-)
 create mode 100644 tools/xl/xl_vdispl.c
tools/xl/Makefile +1 -0
index e16f877..5c784b5 100644
@@ -21,6 +21,7 @@ XL_OBJS += xl_vtpm.o xl_block.o xl_nic.o xl_usb.o
 XL_OBJS += xl_sched.o xl_pci.o xl_vcpu.o xl_cdrom.o xl_mem.o
 XL_OBJS += xl_psr.o xl_info.o xl_console.o xl_misc.o
 XL_OBJS += xl_vmcontrol.o xl_saverestore.o xl_migrate.o
+XL_OBJS += xl_vdispl.o
 
 $(XL_OBJS): CFLAGS += $(CFLAGS_libxentoollog)
 $(XL_OBJS): CFLAGS += $(CFLAGS_XL)
tools/xl/xl.h +3 -0
index aa95b77..d361241 100644
@@ -166,6 +166,9 @@ int main_blockdetach(int argc, char **argv);
 int main_vtpmattach(int argc, char **argv);
 int main_vtpmlist(int argc, char **argv);
 int main_vtpmdetach(int argc, char **argv);
+int main_vdisplattach(int argc, char **argv);
+int main_vdispllist(int argc, char **argv);
+int main_vdispldetach(int argc, char **argv);
 int main_usbctrl_attach(int argc, char **argv);
 int main_usbctrl_detach(int argc, char **argv);
 int main_usbdev_attach(int argc, char **argv);
tools/xl/xl_cmdtable.c +19 -0
index 7d97811..9f92663 100644
@@ -372,6 +372,25 @@ struct cmd_spec cmd_table[] = {
       "Destroy a domain's virtual TPM device",
       "<Domain> <DevId|uuid>",
     },
+    { "vdispl-attach",
+      &main_vdisplattach, 1, 1,
+      "Create a new virtual display device",
+      "<Domain> [devId=<Device>] [backend=<BackDomain>] [beAlloc=<BackAlloc>] [connectors='<Connectors>']",
+      "    BackAlloc - set to 1 to allow backend allocated display buffers\n"
+      "    Connectors - list of connector's description in ID:WxH format,\n"
+      "                 where: ID - unique connector ID, W - connector width,\n"
+      "                 H - connector height: connectors='id0:800x600;id1:1024x768'\n"
+    },
+    { "vdispl-list",
+      &main_vdispllist, 0, 0,
+      "List virtual display devices for a domain",
+      "<Domain(s)>",
+    },
+    { "vdispl-detach",
+      &main_vdispldetach, 0, 1,
+      "Destroy a domain's virtual display device",
+      "<Domain> <DevId>",
+    },
     { "uptime",
       &main_uptime, 0, 0,
       "Print uptime for all/some domains",
tools/xl/xl_parse.c +76 -1

95 lines not on this page · raw message

tools/xl/xl_parse.h +1 -1
index db8bc3f..cc459fb 100644
@@ -33,7 +33,7 @@ int parse_usbctrl_config(libxl_device_usbctrl *usbctrl, char *token);
 int parse_usbdev_config(libxl_device_usbdev *usbdev, char *token);
 int parse_cpurange(const char *cpu, libxl_bitmap *cpumap);
 int parse_nic_config(libxl_device_nic *nic, XLU_Config **config, char *token);
-
+int parse_vdispl_config(libxl_device_vdispl *vdispl, char *token);
 
 int match_option_size(const char *prefix, size_t len,
                       char *arg, char **argopt);
tools/xl/xl_vdispl.c new file +166 -0

166 lines not on this page · raw message

Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#5 lore raw

PATCH v2 3/3 docs: add virtual display driver information

In reply to Oleksandr Grytsov
---
 docs/man/xl.cfg.pod.5.in | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
 docs/man/xl.pod.1.in     | 42 +++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)
docs/man/xl.cfg.pod.5.in +54 -0
index 52802d5..8c5a593 100644
@@ -1064,6 +1064,60 @@ FIFO-based event channel ABI support up to 131,071 event channels.
 Other guests are limited to 4095 (64-bit x86 and ARM) or 1023 (32-bit
 x86).
 
+=item B<vdispl=[ "VDISPL_SPEC_STRING", "VDISPL_SPEC_STRING", ...]>
+
+Specifies the virtual display devices to be provided to the guest.
+
+Each B<VDISPL_SPEC_STRING> is a comma-separated list of C<KEY=VALUE>
+settings, from the following list:
+
+=over 4
+
+=item C<backend=DOMAIN>
+
+Specifies the backend domain name or id. If not specified Domain-0 is used.
+
+=item C<devId=device-id>
+
+Specified virtual display device ID. If not specified will be assigned
+automatically.
+
+=item C<beAlloc=BOOLEAN>
+
+Indicates if backend can be a buffer provider/allocator for this domain. See
+display protocol for details.
+
+=item C<connectors=CONNECTORS>
+
+Specifies virtual connectors for the device in following format
+<id>:<W>x<H>;<id>:<W>x<H>... where:
+
+=over 4
+
+=item C<id>
+
+String connector ID. Space, comma symbols are not allowed.
+
+=item C<W>
+
+Connector width in pixels.
+
+=item C<H>
+
+Connector height in pixels.
+
+=back
+
+B<EXAMPLE>
+
+=over 4
+
+connectors=id0:1920x1080;id1:800x600;id2:640x480
+
+=back
+
+=back
+
 =back
 
 =head2 Paravirtualised (PV) Guest Specific Options
docs/man/xl.pod.1.in +42 -0

48 lines not on this page · raw message

Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#6 lore raw
In reply to Oleksandr Grytsov
Quoted 35 lines · Oleksandr Grytsov

From: Oleksandr Grytsov <[email protected]>

These patches add PV display device to libxl and xl.

Changes since v1:
* add connector id;
* set connector resolution and id to Xen store;

Oleksandr Grytsov (3):
libxl: add PV display device driver interface
xl: add PV display device commands
docs: add virtual display driver information

 docs/man/xl.cfg.pod.5.in             |  54 +++++
 docs/man/xl.pod.1.in                 |  42 ++++
 tools/libxl/Makefile                 |   2 +-
 tools/libxl/libxl.h                  |  21 ++
 tools/libxl/libxl_create.c           |   3 +
 tools/libxl/libxl_device.c           | 178 ++++++++++++++++-
 tools/libxl/libxl_internal.h         |  24 +++
 tools/libxl/libxl_types.idl          |  40 +++-
 tools/libxl/libxl_types_internal.idl |   1 +
 tools/libxl/libxl_usb.c              |   2 +
 tools/libxl/libxl_utils.h            |   4 +
 tools/libxl/libxl_vdispl.c           | 372 +++++++++++++++++++++++++++++++++++
 tools/xl/Makefile                    |   1 +
 tools/xl/xl.h                        |   3 +
 tools/xl/xl_cmdtable.c               |  19 ++
 tools/xl/xl_parse.c                  |  77 +++++++-
 tools/xl/xl_parse.h                  |   2 +-
 tools/xl/xl_vdispl.c                 | 166 ++++++++++++++++
 18 files changed, 1005 insertions(+), 6 deletions(-)
 create mode 100644 tools/libxl/libxl_vdispl.c
 create mode 100644 tools/xl/xl_vdispl.c
Quoted 3 lines

--
2.7.4

Adding maintainers to CC.

Signature · 7 lines
Best Regards,
Oleksandr Grytsov.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#7 lore raw
Quoted 40 lines · Oleksandr Grytsov
Quoted 35 lines · Oleksandr Grytsov

From: Oleksandr Grytsov <[email protected]>

These patches add PV display device to libxl and xl.

Changes since v1:
* add connector id;
* set connector resolution and id to Xen store;

Oleksandr Grytsov (3):
libxl: add PV display device driver interface
xl: add PV display device commands
docs: add virtual display driver information

 docs/man/xl.cfg.pod.5.in             |  54 +++++
 docs/man/xl.pod.1.in                 |  42 ++++
 tools/libxl/Makefile                 |   2 +-
 tools/libxl/libxl.h                  |  21 ++
 tools/libxl/libxl_create.c           |   3 +
 tools/libxl/libxl_device.c           | 178 ++++++++++++++++-
 tools/libxl/libxl_internal.h         |  24 +++
 tools/libxl/libxl_types.idl          |  40 +++-
 tools/libxl/libxl_types_internal.idl |   1 +
 tools/libxl/libxl_usb.c              |   2 +
 tools/libxl/libxl_utils.h            |   4 +
 tools/libxl/libxl_vdispl.c           | 372 +++++++++++++++++++++++++++++++++++
 tools/xl/Makefile                    |   1 +
 tools/xl/xl.h                        |   3 +
 tools/xl/xl_cmdtable.c               |  19 ++
 tools/xl/xl_parse.c                  |  77 +++++++-
 tools/xl/xl_parse.h                  |   2 +-
 tools/xl/xl_vdispl.c                 | 166 ++++++++++++++++
 18 files changed, 1005 insertions(+), 6 deletions(-)
 create mode 100644 tools/libxl/libxl_vdispl.c
 create mode 100644 tools/xl/xl_vdispl.c
Quoted 3 lines

--
2.7.4

Quoted 5 lines

Adding maintainers to CC.

--
Best Regards,
Oleksandr Grytsov.

Ping.

Signature · 7 lines
Best Regards,
Oleksandr Grytsov.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel