* [PATCH v3] libxl: Spice image compression setting support for upstream qemu
@ 2015-01-20 10:26 Fabio Fantoni
2015-01-27 10:58 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Fantoni @ 2015-01-20 10:26 UTC (permalink / raw)
To: xen-devel
Cc: wei.liu2, Ian.Campbell, Stefano.Stabellini, Ian.Jackson,
Fabio Fantoni, anthony.perard
Usage:
spice_image_compression=[auto_glz|auto_lz|quic|glz|lz|off]
Specifies what image compression is to be used by spice (if given),
otherwise the qemu default will be used.
Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
---
Changes in v3:
- improved description in xl.cfg.pod.5
- libxl_dm.c, cutted long line for coding style limit
Changes in v2:
- refresh
---
docs/man/xl.cfg.pod.5 | 6 ++++++
tools/libxl/libxl.h | 11 +++++++++++
tools/libxl/libxl_dm.c | 4 ++++
tools/libxl/libxl_types.idl | 1 +
tools/libxl/xl_cmdimpl.c | 2 ++
5 files changed, 24 insertions(+)
diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index e2f91fc..0c2cbac 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -1427,6 +1427,12 @@ for redirection of up to 4 usb devices from spice client to domU's qemu.
It requires an usb controller and if not defined it will automatically adds
an usb2 controller. The default is disabled (0).
+=item B<spice_image_compression=[auto_glz|auto_lz|quic|glz|lz|off]>
+
+Specifies what image compression is to be used by spice (if given), otherwise
+the qemu default will be used. Please see documentations of your current qemu
+version for details.
+
=back
=head3 Miscellaneous Emulated Hardware
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 0a123f1..b8e0b67 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -528,6 +528,17 @@ typedef struct libxl__ctx libxl_ctx;
#define LIBXL_HAVE_SPICE_USBREDIREDIRECTION 1
/*
+ * LIBXL_HAVE_SPICE_IMAGECOMPRESSION
+ *
+ * If defined, then the libxl_spice_info structure will contain a string type
+ * field: image_compression. This value defines what Spice image compression
+ * is used.
+ *
+ * If this is not defined, the Spice image compression setting support is ignored.
+ */
+#define LIBXL_HAVE_SPICE_IMAGECOMPRESSION 1
+
+/*
* LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS 1
*
* If this is defined, libxl_domain_create_restore()'s API has changed to
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index c2b0487..40c8649 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -398,6 +398,10 @@ static char *dm_spice_options(libxl__gc *gc,
if (!libxl_defbool_val(spice->clipboard_sharing))
opt = libxl__sprintf(gc, "%s,disable-copy-paste", opt);
+ if (spice->image_compression)
+ opt = libxl__sprintf(gc, "%s,image-compression=%s", opt,
+ spice->image_compression);
+
return opt;
}
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 1214d2e..052ded9 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -241,6 +241,7 @@ libxl_spice_info = Struct("spice_info", [
("vdagent", libxl_defbool),
("clipboard_sharing", libxl_defbool),
("usbredirection", integer),
+ ("image_compression", string),
])
libxl_sdl_info = Struct("sdl_info", [
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 0b02a6c..00aa69d 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1948,6 +1948,8 @@ skip_vfb:
&b_info->u.hvm.spice.clipboard_sharing, 0);
if (!xlu_cfg_get_long (config, "spiceusbredirection", &l, 0))
b_info->u.hvm.spice.usbredirection = l;
+ xlu_cfg_replace_string (config, "spice_image_compression",
+ &b_info->u.hvm.spice.image_compression, 0);
xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, 0);
xlu_cfg_get_defbool(config, "gfx_passthru",
&b_info->u.hvm.gfx_passthru, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] libxl: Spice image compression setting support for upstream qemu
2015-01-20 10:26 [PATCH v3] libxl: Spice image compression setting support for upstream qemu Fabio Fantoni
@ 2015-01-27 10:58 ` Wei Liu
2015-01-27 17:20 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2015-01-27 10:58 UTC (permalink / raw)
To: Fabio Fantoni
Cc: xen-devel, wei.liu2, Ian.Campbell, Stefano.Stabellini,
Ian.Jackson, anthony.perard
On Tue, Jan 20, 2015 at 11:26:30AM +0100, Fabio Fantoni wrote:
> Usage:
> spice_image_compression=[auto_glz|auto_lz|quic|glz|lz|off]
>
> Specifies what image compression is to be used by spice (if given),
> otherwise the qemu default will be used.
>
> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Sorry for the late reply.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] libxl: Spice image compression setting support for upstream qemu
2015-01-27 10:58 ` Wei Liu
@ 2015-01-27 17:20 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2015-01-27 17:20 UTC (permalink / raw)
To: Wei Liu
Cc: anthony.perard, Fabio Fantoni, Ian.Jackson, xen-devel,
Stefano.Stabellini
On Tue, 2015-01-27 at 10:58 +0000, Wei Liu wrote:
> On Tue, Jan 20, 2015 at 11:26:30AM +0100, Fabio Fantoni wrote:
> > Usage:
> > spice_image_compression=[auto_glz|auto_lz|quic|glz|lz|off]
> >
> > Specifies what image compression is to be used by spice (if given),
> > otherwise the qemu default will be used.
> >
> > Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
> >
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
APplied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-27 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 10:26 [PATCH v3] libxl: Spice image compression setting support for upstream qemu Fabio Fantoni
2015-01-27 10:58 ` Wei Liu
2015-01-27 17:20 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.