summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* server: rename worker->channelMarc-André Lureau2015-01-131-4/+4
|
* server: make more of cursor privateMarc-André Lureau2015-01-135-65/+89
|
* server: make cursor channel privateMarc-André Lureau2015-01-136-73/+93
|
* server: move some cursor code to cursor_channel.cMarc-André Lureau2015-01-137-670/+676
| | | | | | | | | | | | | | | | Also fix warning due to unexpected pipe item type The specific item type that was not being handled was PIPE_ITEM_TYPE_INVAL_ONE (#102). This item type is used by the cursor channel, but the analogous item for the display channel is PIPE_ITEM_TYPE_INVAL_PALLET_CACHE. Use this value instead. The exact warning follows: (/usr/bin/qemu-kvm:24458): Spice-Warning **: ../../server/dcc-send.c:2442:dcc_send_item: should not be reached (/usr/bin/qemu-kvm:24458): Spice-CRITICAL **: ../../server/dcc.c:1595:release_item_before_push: invalid item type
* server: small move to red_channelMarc-André Lureau2015-01-093-12/+18
|
* server: rename red_client_cache.h to cache_item.tmpl.cMarc-André Lureau2015-01-093-3/+3
|
* server: split cache_item.hMarc-André Lureau2015-01-093-15/+24
|
* server: start separate display/cursor channel headersMarc-André Lureau2015-01-095-262/+281
| | | | Just move some declarations around
* server: move some pixmap cache code in own fileMarc-André Lureau2015-01-095-360/+330
| | | | | Remove that hideous template header that should really be regular code since it's specialized and instanciated only for pixmap.
* worker: use GOnce to surround some global init in dispatcherMarc-André Lureau2015-01-091-3/+7
|
* server: move dispatcher GSource handling codeMarc-André Lureau2015-01-094-21/+34
|
* worker: use a single clockidMarc-André Lureau2015-01-091-25/+20
| | | | | The stat functions in worker are not generic enough to deserve to be "non-worker", so just pass the worker instance.
* worker: remove need for WorkerInitDataMarc-André Lureau2015-01-096-139/+123
| | | | Move code around to declare and place it where it fits better.
* server: dispatcher_init/dispatcher_newMarc-André Lureau2015-01-093-4/+6
|
* worker: remove useless MESSAGE_READYMarc-André Lureau2015-01-092-14/+5
| | | | | Now that worker is created before running, and run() returns success, there is no point in using MESSAGE_READY.
* server: remove worker thread creation from dispatcherMarc-André Lureau2015-01-097-31/+56
|
* server: remove hardcoded RED_MAX_RENDERERSMarc-André Lureau2015-01-093-6/+6
|
* server/dispatcher: move worker enums to dispatcher headerMarc-André Lureau2015-01-092-62/+63
| | | | Group enums with their respective struct location.
* channel: do not free rcc->stream in red_channel_client_disconnectMarc-André Lureau2015-01-092-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following scary racy corruption after glib loop switch: ==28173== ==28173== Debugger has detached. Valgrind regains control. We continue. ==28173== Invalid read of size 8 ==28173== at 0x4C7871E: reds_stream_read (reds.c:4521) ==28173== by 0x4C2F9D7: red_peer_receive (red_channel.c:209) ==28173== by 0x4C2FB59: red_peer_handle_incoming (red_channel.c:255) ==28173== by 0x4C2FF36: red_channel_client_receive (red_channel.c:329) ==28173== by 0x4C33D6D: red_channel_client_event (red_channel.c:1577) ==28173== by 0x4C65098: watch_func (red_worker.c:10292) ==28173== by 0x504DDAB: g_io_unix_dispatch (giounix.c:167) ==28173== by 0x4FFACB6: g_main_dispatch (gmain.c:3065) ==28173== by 0x4FFBA0D: g_main_context_dispatch (gmain.c:3641) ==28173== by 0x4FFBBFF: g_main_context_iterate (gmain.c:3712) ==28173== by 0x4FFC028: g_main_loop_run (gmain.c:3906) ==28173== by 0x4C6ABF2: red_worker_main (red_worker.c:12180) ==28173== Address 0x7d688e0 is 32 bytes inside a block of size 160 free'd ==28173== at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==28173== by 0x4C78A84: reds_stream_free (reds.c:4594) ==28173== by 0x4C34E2E: red_channel_client_disconnect (red_channel.c:1865) ==28173== by 0x4C30363: red_channel_client_default_peer_on_error (red_channel.c:417) ==28173== by 0x4C3011B: red_peer_handle_outgoing (red_channel.c:372) ==28173== by 0x4C3305F: red_channel_client_send (red_channel.c:1298) ==28173== by 0x4C33FB6: red_channel_client_begin_send_message (red_channel.c:1616) ==28173== by 0x4C5F4B4: display_begin_send_message (red_worker.c:8360) ==28173== by 0x4C61DE8: display_channel_send_item (red_worker.c:9164) ==28173== by 0x4C30C69: red_channel_client_send_item (red_channel.c:599) ==28173== by 0x4C332BB: red_channel_client_push (red_channel.c:1351) ==28173== by 0x4C33C3A: red_channel_client_handle_message (red_channel.c:1545)
* worker: use glib main loopMarc-André Lureau2015-01-094-478/+258
| | | | | | Clean up, more extensible. Avoid server hanging when no client are connected.
* server: use more const CoreInterfaceMarc-André Lureau2015-01-092-5/+5
|
* worker: replace init with red_worker_newMarc-André Lureau2015-01-091-5/+5
|
* worker: move red_init() functionsMarc-André Lureau2015-01-091-8/+10
|
* server/tests/replay: introduceAlon Levy2015-01-093-2/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usage: replay <cmdfile> <port> <client command line> will run the commands from cmdfile ignoring timestamps, right after a connection is established from the client, and will SIGINT the client on end of cmdfile, and exit itself after waiting for the client. spicy-stats from spice-gtk is useful for testing, it prints the summary of the traffic on each channel. You can also run with no client by doing: replay <cmdfile> For example, the 300 MB file (compressed to 4 MB with xz -9) available at [1] produces the following output: spicy-stats total bytes read: total bytes read: inputs: 214 display: 1968983 cursor: 390 main: 256373 You could run it directly like so: curl http://annarchy.freedesktop.org/~alon/win7_boot_shutdown.cmd.xz | xzcat | server/tests/replay - 12345 `which spicy-stats` -h localhost -p 12345 Known Problems: * Implementation is wrong. Should do a single device->host conversion (i.e. get_virt), and then marshall/demarshall that (i.e. RedDrawable). * segfault on file read done resulting in the above spicy-stats not being reproducable (well, up to 1% yes). [1] http://annarchy.freedesktop.org/~alon/win7_boot_shutdown.cmd.xz Now based on glib including using an asyncqueue for reading the playback file, and proper freeing of the allocated commands, with --slow, --compression and a progress timer, and doesn't use more then nsurfaces.
* server/red_worker: record to SPICE_WORKER_RECORD_FILENAMEAlon Levy2015-01-091-6/+81
| | | | | | | | | | | | | | | if the environment variable in the title is set and can be opened for writing a log of all display commands (no cursor commands yet) and any QXLWorker calls (particularily primary create and destroy) will be logged to that file, and possible to replay using the replay utility introduced later. For an example file (4 MB download, 300 MB after unpack with xz, these 300 MB are themselves reduced from 1.2GB using zlib compression for any chunk): (old file without a header) http://annarchy.freedesktop.org/~alon/win7_boot_shutdown.cmd.xz
* server/red_{record, replay}.[ch]: introduceAlon Levy2015-01-097-0/+2121
| | | | | | | | | | | | | | | | Currently hand crafted with some sed scripts and alot of vim macros from red_parse_qxl after considering the logger in qemu/hw/qxl-logger.c and seeing it was incomplete. The only problem with logging from the server and not from qemu is that it requires coordinated shutdown to avoid half a message. Should be automatically generated from a declarative syntax, i.e. qxl.proto. Note: zlib compression is introduced in a disabled state, see ZLIB define Now with a simple versioned header and generated ids by the server instead of based on the recorded file, and doesn't use more then 1024 surfaces (configurable).
* server/dispatcher: add extra_dispatcher, hack for red_recordAlon Levy2015-01-092-0/+18
|
* server/dispatcher: pass message_type to callbacks for consistencyAlon Levy2015-01-094-37/+44
|
* red_worker: replace some abort()Marc-André Lureau2015-01-091-1/+2
|
* server/red_worker: remove redundant spice_warn_if in validate_surfaceAlon Levy2015-01-091-1/+0
|
* server/red_worker: red_draw_qxl_drawable: protect from NULL dereference in ↵Alon Levy2015-01-091-0/+5
| | | | case of buggy driver (or recording)
* tests: use glib main loopMarc-André Lureau2015-01-092-190/+97
|
* server/util: replace receive/send with xread/xwriteMarc-André Lureau2015-01-094-38/+42
| | | | | They are just utils functions around read and write, let's not use different naming.
* Cleanup: move static function declarations out of headerJonathon Jongsma2014-12-232-4/+4
| | | | | It doesn't make much sense to have static function declarations in a header, even a private header. So move them down into the source file.
* inputs: Remove unneeded variableChristophe Fergeau2014-12-151-9/+8
| | | | | | | | inputs_channel_handle_parsed() is casting its void * argument to a uint8_t * buf before recasting this 'buf' variable to different other types. This intermediate 'buf' variable is not needed, especially as we can then benefit from implicit casts from void * to the type we need.
* inputs: Split overlong lineChristophe Fergeau2014-12-151-1/+2
| | | | Cosmetic change.
* inputs: Fix key_up/key_down mismatchChristophe Fergeau2014-12-151-5/+5
| | | | | | When handling a KEY_UP message, the various variables were called 'key_down', and they were called 'key_up' when handling KEY_DOWN messages. This commit makes the naming consistent.
* Remove unused SPICE_CANVAS_INTERNALChristophe Fergeau2014-12-034-8/+0
|
* client: Remove client codeChristophe Fergeau2014-12-03178-104026/+1
| | | | | | The client has been superseded by virt-viewer ( http://virt-manager.org/download/sources/virt-viewer/ ) and is no longer being maintained.
* Add LZ4 compression support.Javier Celaya2014-12-027-6/+358
| | | | | | | | - Add lz4 encoder to compress an image of type LZ4 (see spice_common). - Add code in red_worker to use LZ4 when it is enabled, and the client supports it through its display capability, or fallback to LZ. - Add enable_lz4 switch in the configure script. Show LZ4 support at the end.
* configure.ac: Never add xinerama to SPICE_REQUIRESChristophe Fergeau2014-12-011-1/+0
| | | | | | SPICE_REQUIRES is only used to generate the Requires.private line of spice-server.pc. The server code is not using xinerama, so we don't need to list xinerama in Requires.private.
* configure.ac: Only check for xinerama for client buildsChristophe Fergeau2014-12-011-18/+18
| | | | | | | Xinerama support is only used for the X11 client, but is currently being checked even for server only builds. This commit ensures Xinerama is not checked for/added to spice-server.pc when not building the client.
* build-sys: fix out-of-tree build of testsMarc-André Lureau2014-11-291-0/+1
| | | | | | | | | | | | Fixes the following build error: In file included from /home/elmarco/src/spice-new/src/spice/server/tests/test_display_base.h:4:0, from /home/elmarco/src/spice-new/src/spice/server/tests/test_display_no_ssl.c:11: /home/elmarco/src/spice-new/src/spice/server/spice.h:23:27: fatal error: spice-version.h: No such file or directory #include "spice-version.h" ^
* Add explicit spice-core.h includeMarc-André Lureau2014-11-271-1/+1
| | | | Several functions use core interfaces, add and explicit include.
* Move spice_server_get_num_clients() declarationMarc-André Lureau2014-11-272-3/+2
| | | | This function is not related to migration.
* Rename mm_timer/mm_timeMarc-André Lureau2014-11-274-13/+13
| | | | As suggested by Christophe on the mailing list.
* Remove guest side video time-stampingMarc-André Lureau2014-11-276-26/+2
| | | | | | | | | | | | | | | | | The multimedia time is defined by the server side monotonic time [1], but the drawing time-stamp is done in guest side, so it requires synchronization between host and guest. This is expensive, when no audio is playing, there is a ~30x/sec wakeup to update the qxl device mmtime, and it requires marking dirty the rom region. Instead, the video timestamping can be done more efficiently on server side, without visible drawbacks. [1] a better timestamp could be the audio time, since audio players are usually sync with audio time) Related to: https://bugzilla.redhat.com/show_bug.cgi?id=912763
* build-sys: generate spice-version.hMarc-André Lureau2014-11-272-1/+12
| | | | | | | Editing the hexadecimal value of spice-version and keeping it in sync with actual release is a bit tedious. Let's generate it automatically (although handling of bumps will need temporarily static versions, when 0.12 -> 1.0 for example)
* Split spice.hMarc-André Lureau2014-11-2710-574/+806
| | | | Make it easier to read the Spice server API.
* spice.h: remove redundant declarationsMarc-André Lureau2014-11-271-5/+1
| | | | Those are already declared in <spice/qxl_dev.h>.