summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-26server: allows to set maximum monitorsFrediano Ziglio5-5/+26
spice-server will attempt to limit number of monitors. Guest machine can send monitor list it accepts. Limiting the number sent by guest will limit the number of monitors client will try to enable. The guest usually see client monitors enabled and start using it so not seeing client monitor won't try to enable more monitor. In this case the additional monitor guest can support will always be seen as heads with no attached monitors. This allows limiting monitors number without changing guest drivers. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-26build-sys: Fix build with automake < 1.13Christophe Fergeau1-1/+2
AC_CONFIG_MACRO_DIRS is not available with older automake versions, which causes autogen.sh failures on RHEL6. m4_include() can be used instead.
2015-06-22mjpeg: Convert rate control checks to asserts in encoderFrancois Gouget1-6/+3
The checks would lead the reader to think these functions can be called when bit rate control is off when in fact they are only called when it is active. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-06-22server: Refresh the input fps every 5 second, without a timer.Francois Gouget1-30/+15
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-06-22build-sys: Use spice-common m4 macro for lz4Christophe Fergeau2-11/+1
This will allow to share this detection code with spice-gtk.
2015-06-22build-sys: Use spice-common m4 macro for openglChristophe Fergeau1-29/+4
This factorizes a bit of configure.ac m4 code.
2015-06-22build-sys: Use spice-common m4 macro for smartcardChristophe Fergeau1-18/+6
Besides the code factorization, this will allow smartcard support to be automatically enabled if libcacard is present and --disable-smartcard is not used.
2015-06-17reds: increase listening socket backlogMarc-André Lureau1-1/+1
With a TCP socket, the backlog doesn't seem to matter much, perhaps because of latency or underlying protocol behaviour. However, on UNIX socket, it is fairly easy to reach the backlog limit and the client will get an EAGAIN error (but not ECONNREFUSED as stated in listen(7)) that is not easy to deal with: attempting to reconnect in a loop might busy-loop forever as there are no guarantee the server will accept new connections, so it will be inherently racy. Typically, Spice server can easily have up to 15 concurrent incoming connections that are established during initialization of the session. To improve the situation, raise the backlog limit to the default maximum system value, which is 128 on Linux.
2015-06-16Add password length checkCédric Bosdonnat1-0/+2
Don't allow setting a too long password.
2015-06-16Use spice_malloc instead of mallocFrediano Ziglio1-4/+2
Do not just check and give warning before crashing the program accessing a NULL pointer but use spice_malloc which exits with a proper message. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-15Remove duplicate streaming enumerationJonathon Jongsma4-17/+10
There is already a enumeration in a public header that defines the different streaming options, so there's no need to duplicate that enumeration internally. Just use the public enum values.
2015-06-15Use AS_HELP_STRING for configure optionsJonathon Jongsma1-15/+16
2015-06-11Fix typo in commentFrediano Ziglio1-1/+1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-11Use MIN macro to compute a minimumFrediano Ziglio1-1/+1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-11LZ4: warn if trying to set lz4 but not supportedJavier Celaya1-0/+8
2015-06-09server: Remove an unused structure.Francois Gouget1-10/+0
2015-06-04sound: do not modify client state on migrationMarc-André Lureau1-1/+4
During migration, a volume jump is observed by the client. This is due to qemu setting up destination server with default sound state, and the server sending it after the client is connected. The volume is later restored after migration is finished so there is no need to send this default state values on connection. Tested with both AC97 & HDA devices. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
2015-04-23build-sys: Pass --enable-python-checks when running autogen.shChristophe Fergeau1-1/+1
This will tell spice-common configure.ac to test for the availability of python-six when building from git.
2015-04-23Update spice-common submoduleChristophe Fergeau1-0/+0
This fixes a few issues with older python-six versions: Christophe Fergeau (2): configure.ac: Check for needed python modules for git builds codegen: Use six.PY3 rather than six.PY2
2015-04-10build-sys: Replace cpu detection error with warningChristophe Fergeau1-11/+7
configure.ac currently errors out when trying to build on non-x86/non-ARM CPUs. Since the previous commits improved big endian support a lot, this commit replaces the error with a warning at configure time to make testing on big endian platforms easier.
2015-04-10build-sys: Remove unused 'X86_64' conditionalChristophe Fergeau1-1/+0
X86_64 was defined as an AM_CONDITIONAL, but then nothing was using it. This commit gets rid of it.
2015-04-10ppc: Fix glz magic endianessChristophe Fergeau1-1/+2
This is a modified version of a patch initially by Erlon R. Cruz <erlon.cruz@br.flextronics.com>
2015-04-10ppc: Fixing endianness for channel messagesChristophe Fergeau1-10/+10
This is a modified version of a patch initially from Erlon R. Cruz <erlon.cruz@br.flextronics.com>
2015-04-10ppc: Update spice-common for endianness-related fixesChristophe Fergeau1-0/+0
Alexander Wauck (1): Make spice_codegen.py work on both Python 2 and 3 Christophe Fergeau (17): Remove unused header file build-sys: Remove unused X check build-sys: Remove unused win32 check build-sys: Remove unused WITH_SMARTCARD conditional build-sys: Small cleanup of AM_CPPFLAGS build-sys: Add fallback for AS_VAR_APPEND build-sys: Move posix checks to a separate m4 macro build-sys: Move smartcard check to m4 macro build-sys: Move celt check to m4 macro build-sys: Move opus check to m4 macro build-sys: Move opengl check to m4 macro build-sys: Move pixman check to m4 macro Remove unused 'invers' arg from canvas_get_* Remove redundant #if defined(SW_CANVAS_CACHE) || defined(SW_CANVAS_IMAGE_CACHE) Remove another redundant (SW_CANVAS_CACHE) || (SW_CANVAS_IMAGE_CACHE) #ifdef Get rid of SW_CANVAS_IMAGE_CACHE ssl_verify: Move wincrypt.h related #ifdef closer to the include Erlon Cruz (2): ppc: Fix lz magic endianness ppc: build-sys: Add big-endian support Fabiano Fidêncio (1): Fix typo in pixman_image_get_stride() function Javier Celaya (6): LZ4: Fix output buffer size LZ4: Adjust reading the top_down flag LZ4: Decode the image format from the stream LZ4: Fix the row alignment when it is not on a 32bit boundary LZ4: Add support for 24bit pixman surfaces LZ4: Do not include arpa/inet.h in Windows builds Victor Toso (1): common: fix build with mingw
2015-04-10ppc: Fix endianness handling in initial SPICE connectionChristophe Fergeau2-17/+46
This commit fixes enough endianness issues that it's possible to connect to a spice-server/qemu running on a big-endian box with a client running on a little-endian machine. I haven't tested more than getting to the bios/bootloader and typing a bit on the keyboard as I did not manage to boot a distro afterwards :( This is based on patches send by Erlon R. Cruz <erlon.cruz@br.flextronics.com>
2015-03-15m4: WARN FLAGS: Drop -Wenum-compareUri Lublin1-0/+3
My RHEL-6 gcc (4.4.7) complains a lot about it: cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C For older gcc version (e.g. 4.4.7), man gcc says -Wenum-compare is "C++ and Objective-C++ only". For newer gcc (e.g. 4.9.2), man gcc says "In C this warning is enabled by -Wall."
2015-02-25Do not compress bitmaps on UNIX socketFabiano Fidêncio1-1/+2
On UNIX socket do not perform unnecessary image compression
2015-02-24tests: Fix build on HurdFabiano Fidêncio1-0/+4
As PATH_MAX is not defined on Hurd, let's check for it and define whenever it is necessary. https://bugs.freedesktop.org/show_bug.cgi?id=74313
2015-02-08char-device: spice_char_device_write_to_device: protect against recursionUri Lublin1-0/+12
This fixes Spice's smart card support and is related to commit 697f3214fd16adcd524456003619f7f44ddd031b. Reported-by: Swapna Krishnan <skrishna@redhat.com> Recursion is now possible starting with spice_char_device_write_to_device going through spice_char_device_wakeup (after going through qemu), calling again to spice_char_device_write_to_device. The protecting code is the same as the one protecting the read path. This function call loop makes the program to abort with the following messages: usb-ccid: chardev: unexpected message of type 3000000 qemu: qemu_mutex_lock: Resource deadlock avoided Backtrace: (gdb) bt * #0 0x00007ffff3fc78c7 in raise () from /lib64/libc.so.6 * #1 0x00007ffff3fc952a in abort () from /lib64/libc.so.6 * #2 0x0000555555969a95 in error_exit (err=35, * msg=0x5555559f8c90 <__func__.5119> "qemu_mutex_lock") * at util/qemu-thread-posix.c:48 * #3 0x0000555555969b82 in qemu_mutex_lock (mutex=0x5555562c4d60) * at util/qemu-thread-posix.c:79 * #4 0x0000555555714771 in qemu_chr_fe_write (s=0x5555562c4d60, * buf=0x7fffffffd2a0 "", len=12) at qemu-char.c:219 * #5 0x000055555586be49 in ccid_card_vscard_send_msg (s=0x5555565c5f80, * type=VSC_Error, reader_id=0, payload=0x7fffffffd2e0 "", length=4) * at hw/usb/ccid-card-passthru.c:75 * #6 0x000055555586bf00 in ccid_card_vscard_send_error (s=0x5555565c5f80, * reader_id=0, code=VSC_GENERAL_ERROR) at * hw/usb/ccid-card-passthru.c:91 * #7 0x000055555586c559 in ccid_card_vscard_handle_message ( * card=0x5555565c5f80, scr_msg_header=0x5555565c6008) * at hw/usb/ccid-card-passthru.c:254 * #8 0x000055555586c72f in ccid_card_vscard_read (opaque=0x5555565c5f80, * buf=0x5555565034b0 "", size=12) at hw/usb/ccid-card-passthru.c:289 * #9 0x00005555557149db in qemu_chr_be_write (s=0x5555562c4d60, * buf=0x5555565034b0 "", len=12) at qemu-char.c:305 * #10 0x000055555571cde5 in vmc_write (sin=0x5555562c4e78, * buf=0x5555565034b0 "", len=12) at spice-qemu-char.c:41 * #11 0x00007ffff4fa86aa in spice_char_device_write_to_device ( * dev=0x55555657f210) at char_device.c:462 * #12 0x00007ffff4fa9b48 in spice_char_device_wakeup (dev=0x55555657f210) * at char_device.c:862 * #13 0x00007ffff4ff7658 in spice_server_char_device_wakeup * (sin=0x5555562c4e78) at reds.c:2955 * #14 0x000055555571d1d2 in spice_chr_write (chr=0x5555562c4d60, * buf=0x7fffffffd560 "", len=12) at spice-qemu-char.c:189 * #15 0x0000555555714789 in qemu_chr_fe_write (s=0x5555562c4d60, * buf=0x7fffffffd560 "", len=12) at qemu-char.c:220 * #16 0x000055555586be49 in ccid_card_vscard_send_msg (s=0x5555565c5f80, * type=VSC_Error, reader_id=0, payload=0x7fffffffd5a0 "", length=4) * at hw/usb/ccid-card-passthru.c:75 * #17 0x000055555586bf00 in ccid_card_vscard_send_error * (s=0x5555565c5f80, * reader_id=0, code=VSC_SUCCESS) at hw/usb/ccid-card-passthru.c:91 * #18 0x000055555586c4fc in ccid_card_vscard_handle_message ( * card=0x5555565c5f80, scr_msg_header=0x5555565c6008) * at hw/usb/ccid-card-passthru.c:242 * #19 0x000055555586c72f in ccid_card_vscard_read (opaque=0x5555565c5f80, * buf=0x5555565034b0 "", size=12) at hw/usb/ccid-card-passthru.c:289 * #20 0x00005555557149db in qemu_chr_be_write (s=0x5555562c4d60, * buf=0x5555565034b0 "", len=12) at qemu-char.c:305 * #21 0x000055555571cde5 in vmc_write (sin=0x5555562c4e78, * buf=0x5555565034b0 "", len=12) at spice-qemu-char.c:41 * #22 0x00007ffff4fa86aa in spice_char_device_write_to_device ( * dev=0x55555657f210) at char_device.c:462 * #23 0x00007ffff4fa8d37 in spice_char_device_write_buffer_add ( * dev=0x55555657f210, write_buf=0x555556501f70) at char_device.c:597 * #24 0x00007ffff501142d in smartcard_channel_write_to_reader ( * write_buf=0x555556501f70) at smartcard.c:669 * #25 0x00007ffff501034c in smartcard_char_device_notify_reader_add ( * st=0x55555657ef00) at smartcard.c:335 * #26 0x00007ffff50112b3 in smartcard_add_reader (scc=0x555556493ee0, * name=0x5555565023cc "E-Gate 0 0") at smartcard.c:642 * #27 0x00007ffff50118d2 in smartcard_channel_handle_message ( * rcc=0x555556493ee0, type=101, size=22, msg=0x5555565023c0 "\003") * at smartcard.c:757 * #28 0x00007ffff4fbc168 in red_peer_handle_incoming * (stream=0x555556588250, handler=0x555556497ff0) at red_channel.c:308 * #29 0x00007ffff4fbc231 in red_channel_client_receive * (rcc=0x555556493ee0) at red_channel.c:326 * #30 0x00007ffff4fc0019 in red_channel_client_event (fd=59, event=1, * data=0x555556493ee0) at red_channel.c:1574 * #31 0x00005555558b6076 in watch_read (opaque=0x5555565002f0) * at ui/spice-core.c:101 * #32 0x00005555558e8d48 in qemu_iohandler_poll (pollfds=0x5555562b7630, * ret=2) at iohandler.c:143 * #33 0x00005555558e89a4 in main_loop_wait (nonblocking=0) at * main-loop.c:495 * #34 0x00005555557219b0 in main_loop () at vl.c:1794 * #35 0x0000555555729257 in main (argc=40, argv=0x7fffffffddc8, * envp=0x7fffffffdf10) at vl.c:4350
2015-02-03LZ4: Send the original format with the compressed dataJavier Celaya3-6/+7
2015-02-03LZ4: Do not reverse bottom-up imagesJavier Celaya3-24/+14
Reversing the bottom-up images in the server is not needed since Pixman, in the client, is able to deal with them. As a result, the previous code was more complex and wrong. This commit fixes and cleans it.
2015-02-03LZ4: Fix encoder output sizeJavier Celaya1-1/+2
2015-02-03LZ4: Limit LZ4 to RGB formatsJavier Celaya1-0/+2
Currently, the LZ4 encoding only (partially) supports RGB images, so we must check the image format before using it. In the future, indexed formats may be implemented too, but their use is usually very small compared to RGB.
2015-01-15Remove spice-experimentalMarc-André Lureau4-61/+0
Remove unneded symbols that nobody should be using anyway. ABI is modified with this patch, but the library version is not bumped.
2015-01-15Do not perform network tests on UNIX socketMarc-André Lureau2-2/+4
By default, stream latency is 0 and bandwidth is infinite. On UNIX socket do not perform unnecessary testing and keep those values.
2015-01-15reds-stream: add reds_stream_get_family() functionMarc-André Lureau2-0/+11
2015-01-15reds: add Unix socket supportMarc-André Lureau2-6/+33
Learn to listen on a Unix address. In this case, the connection is plain only (non-tls).
2014-12-15inputs: Remove unneeded variableChristophe Fergeau1-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.
2014-12-15inputs: Split overlong lineChristophe Fergeau1-1/+2
Cosmetic change.
2014-12-15inputs: Fix key_up/key_down mismatchChristophe Fergeau1-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.
2014-12-03Remove unused SPICE_CANVAS_INTERNALChristophe Fergeau4-8/+0
2014-12-03client: Remove client codeChristophe Fergeau178-104026/+1
The client has been superseded by virt-viewer ( http://virt-manager.org/download/sources/virt-viewer/ ) and is no longer being maintained.
2014-12-02Add LZ4 compression support.Javier Celaya7-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.
2014-12-01configure.ac: Never add xinerama to SPICE_REQUIRESChristophe Fergeau1-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.
2014-12-01configure.ac: Only check for xinerama for client buildsChristophe Fergeau1-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.
2014-11-29build-sys: fix out-of-tree build of testsMarc-André Lureau1-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" ^
2014-11-27Add explicit spice-core.h includeMarc-André Lureau1-1/+1
Several functions use core interfaces, add and explicit include.
2014-11-27Move spice_server_get_num_clients() declarationMarc-André Lureau2-3/+2
This function is not related to migration.
2014-11-27Rename mm_timer/mm_timeMarc-André Lureau4-13/+13
As suggested by Christophe on the mailing list.
2014-11-27Remove guest side video time-stampingMarc-André Lureau6-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