[Spice-devel] Why does spice server keep sending streaming data while video is not being played?
Hi, My spice server is 0.14.1 and gtk is master in the repository. I was testing video stream. I set video-streaming to "filter" and played a .mp4 file. The CPU usage of the gtk is about 180%. When I pause the video, theoretically the stream should be destroyed and no data sould be sent, but the server still sending streaming data, and the gtk CPU usage was still 180%. I added log to spice server and found video_stream_maintenance was always called to attach drawable to stream, then sent to the client. Is that a bug? Souuldn't the server destroy the stream when the video is paused so there is no data to be sent? BR, Don___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [spice-html5][PATCH 00/12] Prepare for npmjs publication
Hi Cédric, Thank you for this! This is very useful work, and I appreciate you taking the time to work on it. I've been through all of the patches, and I think everything looks great. However, your 02 patch in this sequence has a lot of trailing white space; could you eliminate that? Also, I think in honoring my request to remove the es5 compatibility, you introduced what is probably a trivial bug. I haven't had time to explore it, but I get a ReferenceError: SpiceHtml5 is not defined error when I try to start a session. Hopefully that is also an easy fix. I look forward to getting this sequence into Spice. Cheers, Jeremy On 2/11/19 11:47 AM, Cédric Bosdonnat wrote: Hi Jeremy, all, Here is the series that moves everything into a module and avoid cluttering the global namespace. This also includes some fixes for bugs I found while integrating in a third party website. Cédric Bosdonnat (12): CSS: don't force the background color or inputs Introduce ES6 modules Remove duplicated enums Expose all needed pieces in main.js Prepare publishing on npmjs Move sources into their own folder Fix disconnect() code Prompt password in spice_auto.html Document onsuccess callback resize_helper, no message box case resize_helper: round sizes down More reliable mouse position reporting TODO | 3 - atKeynames.js | 183 - enums.js | 377 - package.json |21 + spice.css | 1 - spice.html|67 +- spice_auto.html |79 +- src/atKeynames.js | 189 + bitmap.js => src/bitmap.js|15 +- cursor.js => src/cursor.js|35 +- display.js => src/display.js | 282 +- src/enums.js | 372 + filexfer.js => src/filexfer.js| 6 + inputs.js => src/inputs.js| 128 +- lz.js => src/lz.js|28 +- main.js => src/main.js| 152 +- playback.js => src/playback.js|95 +- png.js => src/png.js | 6 + port.js => src/port.js|15 +- quic.js => src/quic.js|51 +- resize.js => src/resize.js|34 +- simulatecursor.js => src/simulatecursor.js| 6 + .../spicearraybuffer.js | 0 spiceconn.js => src/spiceconn.js | 107 +- spicedataview.js => src/spicedataview.js | 4 + spicemsg.js => src/spicemsg.js| 113 +- spicetype.js => src/spicetype.js |46 +- .../browser-es-module-loader/.npmignore | 0 .../browser-es-module-loader/README.md|15 + .../dist/babel-worker.js | 55799 .../dist/browser-es-module-loader.js | 1486 + .../dist/browser-es-module-loader.js.map | 1 + .../browser-es-module-loader/rollup.config.js |16 + .../src/babel-worker.js |25 + .../src/browser-es-module-loader.js | 280 + {thirdparty => src/thirdparty}/jsbn.js| 4 + {thirdparty => src/thirdparty}/prng4.js | 5 + {thirdparty => src/thirdparty}/rng.js | 5 + {thirdparty => src/thirdparty}/rsa.js | 7 + {thirdparty => src/thirdparty}/sha1.js| 5 + ticket.js => src/ticket.js|10 + utils.js => src/utils.js | 199 +- webm.js => src/webm.js|38 +- wire.js => src/wire.js| 8 + 44 files changed, 59140 insertions(+), 1178 deletions(-) delete mode 100644 atKeynames.js delete mode 100644 enums.js create mode 100644 package.json create mode 100644 src/atKeynames.js rename bitmap.js => src/bitmap.js (84%) rename cursor.js => src/cursor.js (79%) rename display.js => src/display.js (81%) create mode 100644 src/enums.js rename filexfer.js => src/filexfer.js (97%) rename inputs.js => src/inputs.js (62%) rename lz.js => src/lz.js (85%) rename main.js => src/main.js (69%) rename playback.js => src/playback.js (76%) rename png.js => src/png.js (98%) rename port.js => src/port.js (88%) rename quic.js => src/quic.js (97%) rename resize.js => src/resize.js (77%) rename simulatecursor.js => src/simulatecursor.js (98%) rename spicearraybuffer.js => src/spicearraybuffer.js (100%) rename spiceconn.js => src/spiceconn.js (82%) rename spicedataview.js => src/spicedataview.js (99%) rename spicemsg.js => src/spicemsg.js (92%) rename spicetype.js => src/spicetype.js (91%) create mode 100644 src/thirdparty
Re: [Spice-devel] [PATCH spice-gtk 07/12] keycodemapdb: update submodule
> > From: Marc-André Lureau > > Daniel P. Berrange (24): > Add named constants for QKeyCode values > Add ability to generate enums > Build tests with warnings enabled > Add Sun/Sparc keyboard keycodes > Add some missing mappings for USB HID > Add line for QKeyCode asterisk > Add line for QKeyCode print > Fix AT Set2 scancode for F7 > Fix AT set3 mapping for backslash > Misc fixes in AT set 3 scancodes > Add Apple Desktop Bus scancodes > Add many missing Sun scancodes > Add missing Help key entry for OS-X key codes > Add support for array upper bounds with enums > Handle maps where 0x0 is a valid key > Fix ANSI_KeypadClear mapping for OSX > Remove ??? from some keynames > Fix USB menu key mapping > Allow customizing the map length data type > Rename 'rfb' to 'qnum' > Add local argparse for compat with python 2.6 > Add hack for mapping qnum 0xb7 to sysrq > Fix mistake in Pause/SysRq mapping for SUN scancode > Fix compat with py3 dict keys/values data types > > Miika S (1): > Add missing QKeyCode values for JIS keyboards > > Olaf Hering (1): > remove buildtime from generated files > > Paolo Bonzini (3): > move CLanguageGenerator closer to CLanguageGenerator itself > c++: add extern declaration to the generated file > add header file generators > > Peter Korsgaard (1): > keymap-gen: add support for generating output for C++ > > Pierre Ossman (16): > Correct lookup of name in comment > Merge XT columns > Fix AT set 2 table > Rename X11 keycode header to keysym > Add README for data columns > Add basic tests > Add tests for code-table > Add tests for name-map > Add tests for name-table > Add mapping for HTML key codes > Add mapping for XKEYBOARD key names > Fix some keys on macOS > Handle string based codes > Add support for JavaScript output > Provide array size constant for C output > Use STL types for C++ output > > Signed-off-by: Marc-André Lureau > --- > subprojects/keycodemapdb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/subprojects/keycodemapdb b/subprojects/keycodemapdb > index 7bf5710..16e5b07 16 > --- a/subprojects/keycodemapdb > +++ b/subprojects/keycodemapdb > @@ -1 +1 @@ > -Subproject commit 7bf5710b22aa8d58b7eeaaf3dc6960c26cade4f0 > +Subproject commit 16e5b0787687d8904dad2c026107409eb9bfcb95 Acked-by: Frediano Ziglio Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-gtk 12/12] gtk-doc: fix api-index warnings
> From: Marc-André Lureau > > Fix gtk-doc warnings such as: > html/SpiceChannel.html:538: warning: no link for: "api-index-0.20" -> (0.20). > > Unfortunately, the generated file is still missing. > > Signed-off-by: Marc-André Lureau Acked-by: Frediano Ziglio > --- > doc/reference/spice-gtk-docs.xml | 102 +-- > 1 file changed, 96 insertions(+), 6 deletions(-) > > diff --git a/doc/reference/spice-gtk-docs.xml > b/doc/reference/spice-gtk-docs.xml > index 696c375..143602e 100644 > --- a/doc/reference/spice-gtk-docs.xml > +++ b/doc/reference/spice-gtk-docs.xml > @@ -69,12 +69,102 @@ > API Index > > > - > + > + Index of new symbols in 0.6 > + > + > + > + Index of new symbols in 0.7 > + > + > + > + Index of new symbols in 0.8 > + > + > + > + Index of new symbols in 0.9 > + > + > + > + Index of new symbols in 0.10 > + > + > + > + Index of new symbols in 0.11 > + > + > + > + Index of new symbols in 0.13 > + > + > + > + Index of new symbols in 0.14 > + > + > + > + Index of new symbols in 0.15 > + > + > + > + Index of new symbols in 0.17 > + > + > + > + Index of new symbols in 0.20 > + > + > + > + Index of new symbols in 0.21 > + > + > + > + Index of new symbols in 0.22 > + > + > + > + Index of new symbols in 0.24 > + > + > + > + Index of new symbols in 0.27 > + > + > + > + Index of new symbols in 0.28 > + > + > + > + Index of new symbols in 0.29 > + > + > + > + Index of new symbols in 0.30 > + > + > + > + Index of new symbols in 0.31 > + > + > + > + Index of new symbols in 0.32 > + > + > + > + Index of new symbols in 0.33 > + > + > + > + Index of new symbols in 0.34 > + > + > + > + Index of new symbols in 0.35 > + > + > + > + Index of new symbols in 0.36 > + > + > > Index of deprecated symbols >/> Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-gtk 11/12] gtk-doc: fix a few warnings, improve output
> > From: Marc-André Lureau > > Escape special characters with \, fixes: > html/SpiceUsbDeviceManager.html:741: warning: no link for: "1" -> ( class="literal">1). > html/SpiceUsbDeviceManager.html:742: warning: no link for: "2" -> ( class="literal">2). > html/SpiceUsbDeviceManager.html:743: warning: no link for: "3" -> ( class="literal">3). > html/SpiceUsbDeviceManager.html:744: warning: no link for: "4" -> ( class="literal">4). > html/SpiceUsbDeviceManager.html:745: warning: no link for: "5" -> ( class="literal">5). > html/SpiceUsbDeviceManager.html:747: warning: no link for: "s" -> ( class="literal">s). > html/SpiceUsbDeviceManager.html:747: warning: no link for: "d" -> ( class="literal">d). > html/SpiceInputsChannel.html:697: warning: no link for: "0xe0" -> ( class="literal">0xe0). > html/SpiceInputsChannel.html:698: warning: no link for: "0x100" -> ( class="literal">0x100). > > Signed-off-by: Marc-André Lureau Acked-by: Frediano Ziglio > --- > src/channel-inputs.c | 8 > src/usb-device-manager.c | 12 ++-- > 2 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/src/channel-inputs.c b/src/channel-inputs.c > index 1e8f956..f8a04aa 100644 > --- a/src/channel-inputs.c > +++ b/src/channel-inputs.c > @@ -509,8 +509,8 @@ void > spice_inputs_channel_button_release(SpiceInputsChannel *channel, gint butto > /** > * spice_inputs_key_press: > * @channel: a #SpiceInputsChannel > - * @scancode: a PC XT (set 1) key scancode. For scancodes with an %0xe0 > - *prefix, drop the prefix and OR the scancode with %0x100. > + * @scancode: a PC XT (set 1) key scancode. For scancodes with an \%0xe0 > + *prefix, drop the prefix and OR the scancode with \%0x100. > * > * Press a key. > * > @@ -524,8 +524,8 @@ void spice_inputs_key_press(SpiceInputsChannel *channel, > guint scancode) > /** > * spice_inputs_channel_key_press: > * @channel: a #SpiceInputsChannel > - * @scancode: a PC XT (set 1) key scancode. For scancodes with an %0xe0 > - *prefix, drop the prefix and OR the scancode with %0x100. > + * @scancode: a PC XT (set 1) key scancode. For scancodes with an \%0xe0 > + *prefix, drop the prefix and OR the scancode with \%0x100. > * > * Press a key. > * > diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c > index 55b672b..2578350 100644 > --- a/src/usb-device-manager.c > +++ b/src/usb-device-manager.c > @@ -1786,13 +1786,13 @@ > spice_usb_device_manager_can_redirect_device(SpiceUsbDeviceManager *self, > * g_free() when no longer needed. > * > * The @format positional parameters are the following: > - * - '%%1$s' manufacturer > - * - '%%2$s' product > - * - '%%3$s' descriptor (a [vendor_id:product_id] string) > - * - '%%4$d' bus > - * - '%%5$d' address > + * 1. \%s manufacturer > + * 2. \%s product > + * 3. \%s descriptor (a [vendor_id:product_id] string) > + * 4. \%d bus > + * 5. \%d address > * > - * (the default format string is "%%s %%s %%s at %%d-%%d") > + * (the default format string is "\%s \%s \%s at \%d-\%d") > * > * Returns: a newly-allocated string holding the description, or %NULL if > failed > */ Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-server v2 1/3] meson: Use gnu_symbol_visibility keyword introduced in meson 0.48
> > Signed-off-by: Eduardo Lima (Etrunko) For the series: Acked-by: Frediano Ziglio > --- > meson.build| 5 ++--- > server/meson.build | 3 ++- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/meson.build b/meson.build > index 811099c6..459409f6 100644 > --- a/meson.build > +++ b/meson.build > @@ -4,7 +4,7 @@ > project('spice', 'c', > version : run_command('build-aux/git-version-gen', > '${MESON_SOURCE_ROOT}/.tarball-version', check : > true).stdout().strip(), > license : 'LGPLv2.1', > -meson_version : '>= 0.47.2') > +meson_version : '>= 0.48') > > message('Updating submodules') > run_command('build-aux/meson/check-spice-common', check : true) > @@ -36,8 +36,7 @@ spice_server_so_version = > '@0@.@1@.@2@'.format(spice_server_current - spice_serv > message('libspice.so version: ' + spice_server_so_version) > > # some global vars > -spice_server_global_cflags = ['-fvisibility=hidden', > - '-DSPICE_SERVER_INTERNAL', > +spice_server_global_cflags = ['-DSPICE_SERVER_INTERNAL', >'-DG_LOG_DOMAIN="Spice"', >'-DHAVE_CONFIG_H', >#'-Werror', > diff --git a/server/meson.build b/server/meson.build > index 2c024120..63191d79 100644 > --- a/server/meson.build > +++ b/server/meson.build > @@ -179,7 +179,8 @@ spice_server_libs = both_libraries('spice-server', > spice_server_sources, > include_directories : > spice_server_include, > link_args : > > compiler.get_supported_link_arguments(spice_server_link_args), > link_depends : spice_server_syms, > - dependencies : spice_server_deps) > + dependencies : spice_server_deps, > + gnu_symbol_visibility : 'hidden') > > spice_server_shared_lib = spice_server_libs.get_shared_lib() > spice_server_static_lib = spice_server_libs.get_static_lib() ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH spice-server v2 3/3] meson: switch smartcard option to auto feature
Make it compatible with spice-common. Signed-off-by: Eduardo Lima (Etrunko) --- meson.build | 14 ++ meson_options.txt| 3 +-- subprojects/spice-common | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index f822cc12..1b07f30d 100644 --- a/meson.build +++ b/meson.build @@ -167,14 +167,12 @@ endif # smartcard check spice_server_has_smartcard = false -if get_option('smartcard') - smartcard_dep = dependency('libcacard', required : false, version : '>= 2.5.1') - if smartcard_dep.found() -spice_server_deps += smartcard_dep -spice_server_config_data.set('USE_SMARTCARD', '1') -spice_server_has_smartcard = true -spice_server_requires += 'libcacard >= 2.5.1 ' - endif +smartcard_dep = dependency('libcacard', required : get_option('smartcard'), version : '>= 2.5.1') +if smartcard_dep.found() + spice_server_deps += smartcard_dep + spice_server_config_data.set('USE_SMARTCARD', '1') + spice_server_has_smartcard = true + spice_server_requires += 'libcacard >= 2.5.1 ' endif # diff --git a/meson_options.txt b/meson_options.txt index 49f59cc4..d19cacb2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -22,8 +22,7 @@ option('opus', description: 'Enable Opus audio codec') option('smartcard', -type : 'boolean', -value : true, +type : 'feature', description : 'Enable smartcard support') option('alignment-checks', diff --git a/subprojects/spice-common b/subprojects/spice-common index 2e914f33..02530a80 16 --- a/subprojects/spice-common +++ b/subprojects/spice-common @@ -1 +1 @@ -Subproject commit 2e914f3305f685c82143fa04067ce9f57fbfd602 +Subproject commit 02530a80dfa45c936215c47b8e3aa56720eb46b8 -- 2.20.1 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH spice-server v2 1/3] meson: Use gnu_symbol_visibility keyword introduced in meson 0.48
Signed-off-by: Eduardo Lima (Etrunko) --- meson.build| 5 ++--- server/meson.build | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 811099c6..459409f6 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project('spice', 'c', version : run_command('build-aux/git-version-gen', '${MESON_SOURCE_ROOT}/.tarball-version', check : true).stdout().strip(), license : 'LGPLv2.1', -meson_version : '>= 0.47.2') +meson_version : '>= 0.48') message('Updating submodules') run_command('build-aux/meson/check-spice-common', check : true) @@ -36,8 +36,7 @@ spice_server_so_version = '@0@.@1@.@2@'.format(spice_server_current - spice_serv message('libspice.so version: ' + spice_server_so_version) # some global vars -spice_server_global_cflags = ['-fvisibility=hidden', - '-DSPICE_SERVER_INTERNAL', +spice_server_global_cflags = ['-DSPICE_SERVER_INTERNAL', '-DG_LOG_DOMAIN="Spice"', '-DHAVE_CONFIG_H', #'-Werror', diff --git a/server/meson.build b/server/meson.build index 2c024120..63191d79 100644 --- a/server/meson.build +++ b/server/meson.build @@ -179,7 +179,8 @@ spice_server_libs = both_libraries('spice-server', spice_server_sources, include_directories : spice_server_include, link_args : compiler.get_supported_link_arguments(spice_server_link_args), link_depends : spice_server_syms, - dependencies : spice_server_deps) + dependencies : spice_server_deps, + gnu_symbol_visibility : 'hidden') spice_server_shared_lib = spice_server_libs.get_shared_lib() spice_server_static_lib = spice_server_libs.get_static_lib() -- 2.20.1 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH spice-server v2 2/3] meson: Bump libcacard requirement to 2.5.1
This had already been done for autotools in spice-common commit 924f47a653bd87fbd50229ee34b58d7b9a3f1ec8. Signed-off-by: Eduardo Lima (Etrunko) --- meson.build| 15 ++- server/smartcard.c | 4 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/meson.build b/meson.build index 459409f6..f822cc12 100644 --- a/meson.build +++ b/meson.build @@ -172,20 +172,9 @@ if get_option('smartcard') if smartcard_dep.found() spice_server_deps += smartcard_dep spice_server_config_data.set('USE_SMARTCARD', '1') - else -smartcard012_dep = dependency('libcacard', required : false, version : '>= 0.1.2') -if smartcard012_dep.found() - spice_server_deps += smartcard012_dep - spice_server_config_data.set('USE_SMARTCARD_012', '1') -endif +spice_server_has_smartcard = true +spice_server_requires += 'libcacard >= 2.5.1 ' endif - - spice_server_has_smartcard = smartcard_dep.found() or smartcard012_dep.found() - if not spice_server_has_smartcard -error('Building with smartcard support but dependency not found') - endif - - spice_server_requires += 'libcacard >= 0.1.2 ' endif # diff --git a/server/smartcard.c b/server/smartcard.c index 34cfca23..ef99056e 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -20,13 +20,9 @@ #endif #include -#ifdef USE_SMARTCARD_012 -#include -#else #ifdef USE_SMARTCARD #include #endif -#endif #include "reds.h" #include "char-device.h" -- 2.20.1 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-common v2] meson: Bump requirement to 0.48
> This version is already required by spice-gtk and is soon to be required > by spice-server as well, so there is no much sense in keeping it for > spice-commo. > > It is necessary to update the usage of the python module as described in > the documentation: > > https://mesonbuild.com/Release-notes-for-0-48-0.html#python3-module-is-deprecated > > Which gets rid of the following warning message: > > WARNING: Deprecated features used: > * 0.48.0: {'python3 module'} > > Signed-off-by: Eduardo Lima (Etrunko) Acked-by: Frediano Ziglio > --- > meson.build | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meson.build b/meson.build > index 9474618..f451f1c 100644 > --- a/meson.build > +++ b/meson.build > @@ -2,7 +2,7 @@ > # project definition > # > project('spice-common', 'c', > - meson_version : '>= 0.47.0', > + meson_version : '>= 0.48.0', > license : 'LGPLv2.1') > > if not meson.is_subproject() > @@ -133,8 +133,8 @@ foreach dep, version : optional_deps > endforeach > > # Python > -py_module = import('python3') > -python = py_module.find_python() > +py_module = import('python') > +python = py_module.find_installation() > > if get_option('python-checks') >foreach module : ['six', 'pyparsing'] Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH spice-common v2] meson: Bump requirement to 0.48
This version is already required by spice-gtk and is soon to be required by spice-server as well, so there is no much sense in keeping it for spice-commo. It is necessary to update the usage of the python module as described in the documentation: https://mesonbuild.com/Release-notes-for-0-48-0.html#python3-module-is-deprecated Which gets rid of the following warning message: WARNING: Deprecated features used: * 0.48.0: {'python3 module'} Signed-off-by: Eduardo Lima (Etrunko) --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 9474618..f451f1c 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ # project definition # project('spice-common', 'c', - meson_version : '>= 0.47.0', + meson_version : '>= 0.48.0', license : 'LGPLv2.1') if not meson.is_subproject() @@ -133,8 +133,8 @@ foreach dep, version : optional_deps endforeach # Python -py_module = import('python3') -python = py_module.find_python() +py_module = import('python') +python = py_module.find_installation() if get_option('python-checks') foreach module : ['six', 'pyparsing'] -- 2.20.1 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-common 4/4] meson: switch smartcard option to auto feature
> In spice-gtk commit dbdf692909f7a2b272b06a674a38a1aeb4303032, the > smartcard option has been changed from boolean to feature, which > actually broke the option yeld, because the option type is incompatible > between superproject and subproject. > > Signed-off-by: Eduardo Lima (Etrunko) Acked-by: Frediano Ziglio > --- > meson.build | 10 -- > meson_options.txt | 3 +-- > 2 files changed, 5 insertions(+), 8 deletions(-) > > diff --git a/meson.build b/meson.build > index d7b7d1a..f451f1c 100644 > --- a/meson.build > +++ b/meson.build > @@ -147,12 +147,10 @@ if get_option('python-checks') > endif > > # smartcard check > -if get_option('smartcard') > - smartcard_dep = dependency('libcacard', required : false, version : '>= > 2.5.1') > - if smartcard_dep.found() > -spice_common_deps += smartcard_dep > -spice_common_config_data.set('USE_SMARTCARD', '1') > - endif > +smartcard_dep = dependency('libcacard', required : get_option('smartcard'), > version : '>= 2.5.1') > +if smartcard_dep.found() > + spice_common_deps += smartcard_dep > + spice_common_config_data.set('USE_SMARTCARD', '1') > endif > > # > diff --git a/meson_options.txt b/meson_options.txt > index a90726a..7e9e704 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -27,8 +27,7 @@ option('recorder', > description: 'Enable recorder instrumentation') > > option('smartcard', > -type : 'boolean', > -value : true, > +type : 'feature', > yield : true, > description : 'Enable smartcard support') > Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH] qxl-wddm-dod: Load best know defaults for video mode at driver's start
Sure. It receives the video mode (as any video driver) by AcquirePostDisplayInfo. The system knows the video mode from boot time (using GOP protocol). But when this information is broken by 0.18 driver, BasicDisplay does not receive anything good and left us with black screen. (This behavior is documented). On Thu, Feb 7, 2019 at 11:00 PM Marek Kedzierski wrote: > > > Hi Yuri, > > Did you check how BasicDisplay.sys driver is getting default (initial) > display mode information on UEFI systems? > > I did a check on both configurations: bare metal UEFI machine and VM (Windows > 10 1803 x86 with OVMF). > BasicDisplay!BASIC_DISPLAY_DRIVER::StartDevice is the method that is > preparing this information. > I can observe (with windbg) that it is filling PDXGK_DISPLAY_INFORMATION > structure with correct data (width 800, height 600, pitch 3200, etc.) > Anyway the mentioned method uses undocumented dxgkrn call > (dxgkrn!DpGetPostDisplayInfoPlusEdid). > > So in any case, it is required to use undocumented methods. > > Marek > > > - Original Message - > From: "Yuri Benditovich" > To: "Christophe Fergeau" > Cc: "Yan Vugenfirer" , "Spice List" > > Sent: Monday, January 28, 2019 1:47:19 PM > Subject: Re: [Spice-devel] [PATCH] qxl-wddm-dod: Load best know defaults for > video mode at driver's start > > > > On Mon, Jan 28, 2019 at 2:27 PM Christophe Fergeau < cferg...@redhat.com > > wrote: > > > Hey, > > On Fri, Jan 25, 2019 at 09:48:52AM +0200, Yuri Benditovich wrote: > > Even if initial display resolution is not available at driver start, try > > to find it in the registry. > > > Then the driver can prevent black screen > > on uninstall/disable also when it was installed on UEFI machine after > > the production driver 0.18 which did not report valid video mode. > > I'm not sure I understand the problem you are trying to describe here. > "Then the driver can prevent black screen on uninstall/disable" -> is > this saying on non-UEFI system, we still have a black screen issue with > the driver in git master? > > "also when it was installed on UEFI machine after the production driver > 0.18 which did not report valid video mode." -> I assume this part is > related to the commit "Fix for black screen on driver uninstall on ovmf > platform"? If yes, isn't the issue that you describe already fixed by > that commit? > > > All the scenarious below are related to ovmf platform > > Flow 1: the driver from current master branch installed on the machine where > no qxl-wddm-dod driver installed > (or previous one uninstalled and reboot done) > The driver can be uninstalled without problem (this what was fixed by > previous commit). > > Flow 2: there is current production driver (0.18) installed. Driver update > 0.18->current master works OK. > (the driver does not know video mode on startup but it can live without it) > Uninstalling the driver still causes black screen (or broken screen), as the > driver does not know which mode to report on exit. > If it even reports some default, it might be wrong due to various reasons > (will cause broken screen, which is not better than black). > This is what current commit fixes. > > > > > > > Signed-off-by: Yuri Benditovich < yuri.benditov...@daynix.com > > > --- > > qxldod/QxlDod.cpp | 37 - > > 1 file changed, 32 insertions(+), 5 deletions(-) > > > > diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp > > index dea78e2..525cdc3 100755 > > --- a/qxldod/QxlDod.cpp > > +++ b/qxldod/QxlDod.cpp > > @@ -5169,6 +5169,37 @@ UINT SpiceFromPixelFormat(D3DDDIFORMAT Format) > > } > > } > > > > +// Width and Height values for initial video mode are populated by > > +// display class driver upon switch from boot display to operational one. > > +// This is not documented and can be changed in future, but > > +// present under the same key in Win8.1/Win10/2016/2019 > > +static void RetrieveDisplayDefaults(DXGK_DISPLAY_INFORMATION& DispInfo) > > +{ > > + PAGED_CODE(); > > + RTL_QUERY_REGISTRY_TABLE QueryTable[3] = {}; > > + QueryTable[0].Flags = QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT | > > RTL_QUERY_REGISTRY_TYPECHECK | RTL_QUERY_REGISTRY_REQUIRED; > > + QueryTable[0].DefaultType = QueryTable[1].DefaultType = REG_DWORD << 24; > > + QueryTable[0].Name = L"Height"; > > + QueryTable[0].EntryContext = &DispInfo.Height; > > + QueryTable[1].Name = L"Width"; > > + QueryTable[1].EntryContext = &DispInfo.Width; > > + > > + NTSTATUS status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, L"BGFX", > > QueryTable, NULL, NULL); > > + if (NT_SUCCESS(status)) > > + { > > + DbgPrint(TRACE_LEVEL_INFORMATION, ("%s: %dx%d\n", __FUNCTION__, > > DispInfo.Width, DispInfo.Height)); > > + } > > + else > > + { > > + DbgPrint(TRACE_LEVEL_INFORMATION, ("%s: status = %X\n", __FUNCTION__, > > status)); > > + DispInfo.Width = INITIAL_WIDTH; > > + DispInfo.Height = INITIAL_HEIGHT; > > + } > > + DispInfo.ColorFormat = D3DDDIFMT_X8R8G8B8; > > By any chance, is this store
[Spice-devel] [PATCH spice-server 2/3] reds: Reuse agent_dev local variable
The field is only assigned in do_spice_init, surely won't change in the meanwhile. Signed-off-by: Frediano Ziglio --- server/reds.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/server/reds.c b/server/reds.c index f27e28b9d..fbc21f7be 100644 --- a/server/reds.c +++ b/server/reds.c @@ -847,7 +847,7 @@ static RedPipeItem *vdi_port_read_one_msg_from_device(RedCharDevice *self, dev->priv->read_state = VDI_PORT_READ_STATE_GET_BUFF; /* fall through */ case VDI_PORT_READ_STATE_GET_BUFF: { -if (!(dev->priv->current_read_buf = vdi_port_get_read_buf(reds->agent_dev))) { +if (!(dev->priv->current_read_buf = vdi_port_get_read_buf(dev))) { return NULL; } dev->priv->receive_pos = dev->priv->current_read_buf->data; @@ -877,7 +877,7 @@ static RedPipeItem *vdi_port_read_one_msg_from_device(RedCharDevice *self, } else { dev->priv->read_state = VDI_PORT_READ_STATE_GET_BUFF; } -switch (vdi_port_read_buf_process(reds->agent_dev, dispatch_buf)) { +switch (vdi_port_read_buf_process(dev, dispatch_buf)) { case AGENT_MSG_FILTER_OK: agent_adjust_capabilities((VDAgentMessage *) dispatch_buf->data, reds->config->agent_copypaste, @@ -1234,7 +1234,7 @@ void reds_release_agent_data_buffer(RedsState *reds, uint8_t *buf) spice_assert(buf == dev->priv->recv_from_client_buf->buf + sizeof(VDIChunkHeader)); /* if we pushed the buffer the buffer is attached to the channel so don't free it */ if (!dev->priv->recv_from_client_buf_pushed) { -red_char_device_write_buffer_release(RED_CHAR_DEVICE(reds->agent_dev), +red_char_device_write_buffer_release(RED_CHAR_DEVICE(dev), &dev->priv->recv_from_client_buf); } dev->priv->recv_from_client_buf = NULL; @@ -1299,7 +1299,7 @@ void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, const void VDIChunkHeader *header; AgentMsgFilterResult res; -res = agent_msg_filter_process_data(&reds->agent_dev->priv->write_filter, +res = agent_msg_filter_process_data(&dev->priv->write_filter, message, size); switch (res) { case AGENT_MSG_FILTER_OK: @@ -1314,8 +1314,8 @@ void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, const void return; } -spice_assert(reds->agent_dev->priv->recv_from_client_buf); -spice_assert(message == reds->agent_dev->priv->recv_from_client_buf->buf + sizeof(VDIChunkHeader)); +spice_assert(dev->priv->recv_from_client_buf); +spice_assert(message == dev->priv->recv_from_client_buf->buf + sizeof(VDIChunkHeader)); // TODO - start tracking agent data per channel header = (VDIChunkHeader *)dev->priv->recv_from_client_buf->buf; header->port = VDP_CLIENT_PORT; @@ -1323,7 +1323,7 @@ void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, const void dev->priv->recv_from_client_buf->buf_used = sizeof(VDIChunkHeader) + size; dev->priv->recv_from_client_buf_pushed = TRUE; -red_char_device_write_buffer_add(RED_CHAR_DEVICE(reds->agent_dev), dev->priv->recv_from_client_buf); +red_char_device_write_buffer_add(RED_CHAR_DEVICE(dev), dev->priv->recv_from_client_buf); } void reds_on_main_migrate_connected(RedsState *reds, int seamless) @@ -1378,7 +1378,7 @@ void reds_on_main_channel_migrate(RedsState *reds, MainChannelClient *mcc) !agent_dev->priv->read_filter.msg_data_to_read); read_buf->len = read_data_len; -switch (vdi_port_read_buf_process(reds->agent_dev, read_buf)) { +switch (vdi_port_read_buf_process(agent_dev, read_buf)) { case AGENT_MSG_FILTER_OK: agent_adjust_capabilities((VDAgentMessage *)read_buf->data, reds->config->agent_copypaste, @@ -1435,8 +1435,8 @@ void reds_marshall_migrate_data(RedsState *reds, SpiceMarshaller *m) return; } -red_char_device_migrate_data_marshall(RED_CHAR_DEVICE(reds->agent_dev), m); -spice_marshaller_add_uint8(m, reds->agent_dev->priv->client_agent_started); +red_char_device_migrate_data_marshall(RED_CHAR_DEVICE(agent_dev), m); +spice_marshaller_add_uint8(m, agent_dev->priv->client_agent_started); mig_data.agent2client.chunk_header = agent_dev->priv->vdi_chunk_header; @@ -1514,7 +1514,7 @@ static int reds_agent_state_restore(RedsState *reds, SpiceMigrateDataMain *mig_d uint32_t cur_buf_size; agent_dev->priv->read_state = VDI_PORT_READ_STATE_READ_DATA; -agent_dev->priv->current_read_buf = vdi_port_get_read_buf(reds->agent_dev); +agent_dev->priv->current_read_buf = vdi_port_get_read_buf(agent_dev);
[Spice-devel] [PATCH spice-server 3/3] reds: Check QXL ID registering interface
Avoid to register multiple interface with the same ID. This would results in issue as 2 channels would have same (channel_type, channel_id) which should be unique. Qemu always allocate QXL interface with IDs from 0. Signed-off-by: Frediano Ziglio --- server/reds.c | 8 1 file changed, 8 insertions(+) diff --git a/server/reds.c b/server/reds.c index fbc21f7be..2e5c69e60 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3378,6 +3378,14 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds, } qxl = SPICE_UPCAST(QXLInstance, sin); +if (qxl->id < 0) { +spice_warning("invalid QXL ID"); +return -1; +} +if (reds_find_channel(reds, SPICE_CHANNEL_DISPLAY, qxl->id)) { +spice_warning("QXL ID already allocated"); +return -1; +} red_qxl_init(reds, qxl); reds->qxl_instances = g_list_prepend(reds->qxl_instances, qxl); -- 2.20.1 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [PATCH spice-server 1/3] reds: Use proper enumeration for read_state field
Allows the compiler to catch some additional errors. Signed-off-by: Frediano Ziglio --- server/reds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/reds.c b/server/reds.c index 306bb7c6e..f27e28b9d 100644 --- a/server/reds.c +++ b/server/reds.c @@ -224,11 +224,11 @@ typedef struct RedVDIReadBuf { uint8_t data[SPICE_AGENT_MAX_DATA_SIZE]; } RedVDIReadBuf; -enum { +typedef enum { VDI_PORT_READ_STATE_READ_HEADER, VDI_PORT_READ_STATE_GET_BUFF, VDI_PORT_READ_STATE_READ_DATA, -}; +} VDIPortReadStates; struct RedCharDeviceVDIPortPrivate { gboolean agent_attached; @@ -242,7 +242,7 @@ struct RedCharDeviceVDIPortPrivate { /* read from agent */ uint32_t num_read_buf; -uint32_t read_state; +VDIPortReadStates read_state; uint32_t message_receive_len; uint8_t *receive_pos; uint32_t receive_len; -- 2.20.1 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-server 2/2] QXL devices must be registered before Stream Devices
> On Wed, 2019-02-13 at 09:19 -0500, Frediano Ziglio wrote: > > > > > > Stream devices assume that all QXL devices are registered with the > > > server before we receive any communications from the stream device. > > > This > > > is due to the fact that QXL display channel IDs are assigned > > > directly > > > from the QXL device ID, whereas Stream display channels are > > > assigned > > > channel IDs based on the next free ID. If the stream channel is > > > created first, it will find that 0 is the first available display > > > ID and > > > use that for its channel ID. Then when QXL device #0 is registered, > > > it > > > will also create a display channel with channel ID 0, and they will > > > conflict. > > > > Interesting, should not be checked somewhere and detected as API > > violation? > > > > Frediano > > > Maybe. Right now qemu always registers QXL devices immediately after > qemu starts. And obviously we can't communicate via the stream device > until the guest is fully up and running. So I think there's essentially > no way for the bug to happen with current code. I think QXL channels > will always get created before stream channels. But for completeness it > probably would be good to add a check somewhere. > It sounds a good option. > The alternative is to disconnect the QXL ID from the channel ID. In > other words, QXL display channels would use the next available channel > ID (just like the stream channels do) instead of using the qxl->id as > the channel_id. But I don't know if such a change would violate any > other assumptions in the code. > I'm not sure Qemu would be that happy about it. > Jonathon > > I'll post a patch. Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-server 2/2] QXL devices must be registered before Stream Devices
On Wed, 2019-02-13 at 09:19 -0500, Frediano Ziglio wrote: > > > > Stream devices assume that all QXL devices are registered with the > > server before we receive any communications from the stream device. > > This > > is due to the fact that QXL display channel IDs are assigned > > directly > > from the QXL device ID, whereas Stream display channels are > > assigned > > channel IDs based on the next free ID. If the stream channel is > > created first, it will find that 0 is the first available display > > ID and > > use that for its channel ID. Then when QXL device #0 is registered, > > it > > will also create a display channel with channel ID 0, and they will > > conflict. > > Interesting, should not be checked somewhere and detected as API > violation? > > Frediano Maybe. Right now qemu always registers QXL devices immediately after qemu starts. And obviously we can't communicate via the stream device until the guest is fully up and running. So I think there's essentially no way for the bug to happen with current code. I think QXL channels will always get created before stream channels. But for completeness it probably would be good to add a check somewhere. The alternative is to disconnect the QXL ID from the channel ID. In other words, QXL display channels would use the next available channel ID (just like the stream channels do) instead of using the qxl->id as the channel_id. But I don't know if such a change would violate any other assumptions in the code. Jonathon ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-server 2/2] QXL devices must be registered before Stream Devices
> > Stream devices assume that all QXL devices are registered with the > server before we receive any communications from the stream device. This > is due to the fact that QXL display channel IDs are assigned directly > from the QXL device ID, whereas Stream display channels are assigned > channel IDs based on the next free ID. If the stream channel is > created first, it will find that 0 is the first available display ID and > use that for its channel ID. Then when QXL device #0 is registered, it > will also create a display channel with channel ID 0, and they will > conflict. Interesting, should not be checked somewhere and detected as API violation? Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-server 1/2] Fixup display info test
> > Rather than showing the expected data in raw format (ascii codes, etc), > which is hard to verify, show the characters themselves, and group them > by structure. > Thanks, I've been really lazy, I just dump, checked and copy&paste, this patch make it much better. > Also add a few more comments. > --- > server/tests/test-stream-device.c | 35 +++ > 1 file changed, 26 insertions(+), 9 deletions(-) > > diff --git a/server/tests/test-stream-device.c > b/server/tests/test-stream-device.c > index cb3a1a4ff..dcdd91896 100644 > --- a/server/tests/test-stream-device.c > +++ b/server/tests/test-stream-device.c > @@ -493,7 +493,8 @@ static void test_stream_device_data_message(TestFixture > *fixture, gconstpointer > > static void test_display_info(TestFixture *fixture, gconstpointer user_data) > { > -// build a message for the streaming device > +// craft a message from the mock stream device that provides display > info to the server for the > +// given stream > static const char address[] = "pci/a/b.cde"; > StreamMsgDeviceDisplayInfo info = { > .stream_id = GUINT32_TO_LE(0x01020304), > @@ -510,11 +511,13 @@ static void test_display_info(TestFixture *fixture, > gconstpointer user_data) > *message_sizes_end = p - message; > ++message_sizes_end; > > -// parse the message we crafted > +// parse the simulated display info message from the stream device so > the server now has display > +// info for the mock stream device > test_kick(); > > // initialize a QXL interface > test_add_display_interface(test); > +/* qxl device supports 2 monitors */ > spice_qxl_set_device_info(&test->qxl_instance, "pci/0/1.2", 0, 2); > > // build the buffer to send to the agent for display information > @@ -524,14 +527,28 @@ static void test_display_info(TestFixture *fixture, > gconstpointer user_data) > size_t buf_len; > uint8_t *buf = spice_marshaller_linearize(m, 0, &buf_len, &to_free); > > -// check output buffer > +// check output buffer. The message that we send to the vdagent should > combine display info for > +// the stream device that we crafted above and the qxl device. > static const uint8_t expected_buffer[] = { > - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > - 10, 0, 0, 0,112, 99,105, 47, 48, 47, 49, 46, 50, 0, 0, 0, > - 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0,112, 99, > -105, 47, 48, 47, 49, 46, 50, 0, 0, 0, 0, 0, 4, 3, 2, 1, > - 13, 12, 11, 10, 12, 0, 0, 0,112, 99,105, 47, 97, 47, 98, 46, > - 99,100,101, 0 > + /* device count */3, 0, 0, 0, > + > + /* channel_id */ 0, 0, 0, 0, > + /* monitor_id */ 0, 0, 0, 0, > + /* device_display_id */ 0, 0, 0, 0, > + /* device_address_len */ 10, 0, 0, 0, > + /* device_address */'p','c','i','/','0','/','1','.','2', 0, > + > + /* channel_id */ 0, 0, 0, 0, > + /* monitor_id */ 1, 0, 0, 0, > + /* device_display_id */ 1, 0, 0, 0, > + /* device_address_len */ 10, 0, 0, 0, > + /* device_address */'p','c', 'i','/','0','/','1','.','2', 0, > + > + /* channel_id */ 0, 0, 0, 0, > + /* monitor_id */ 4, 3, 2, 1, > + /* device_display_id */ 13, 12, 11, 10, > + /* device_address_len */ 12, 0, 0, 0, > + /* device_address */ > 'p','c','i','/','a','/','b','.','c','d','e', 0 > }; > g_assert_cmpint(buf_len, ==, sizeof(expected_buffer)); > g_assert_true(memcmp(buf, expected_buffer, buf_len) == 0); Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel