summaryrefslogtreecommitdiffstats
path: root/server
Commit message (Collapse)AuthorAgeFilesLines
* server/red_worker: fix worker->drawable_countAlon Levy2010-12-161-1/+1
| | | | | | | | | | | | | drawable_count was becoming negative. It tracks the number of items in the worker->current_list ring. It was decremented correctly, but incremented only in several cases. The cases it wasn't incremented where: red_current_add_equal found an equivalent drawable by moving the increment to where the item is added to current_list, in __current_add_drawable, the accounting remains correct. This has no affect other then correct accounting, as drawable_count isn't used for anything.
* move chardevs out of experimentalGerd Hoffmann2010-12-162-25/+26
| | | | | | | | | While we are at it: There is no reason for chardev support to stay in the experimental area, so move it out. qemu should not need the "spice-experimental.h" file. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 7bbc2ba090788d844573e044041480ff6e3cba7b)
* move switch-host migration out of experimentalGerd Hoffmann2010-12-162-5/+8
| | | | | | | | seamless stays in the experimental area. comments updates too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 6acb817071daa13b8389bfce12cac6221997cebe)
* client migration: switch hostGerd Hoffmann2010-12-162-11/+59
| | | | | | | | | | | | | | | | | Implement server-side support for switch-host client migration. Client side support is present already in the tree. Setting the migration information is done using the existing spice_server_migrate_info() function. A new spice_server_migrate_switch() function has been added which triggers sending out the switch-host message. Seamless migration functions are left there for now. spice_server_migrate_start() has been chamnged to just fail unconditionally though as seamless migration is broken anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 4b1ea4e102bb8a737487dab51dd0f3fc94352948)
* server: improve error handlingGerd Hoffmann2010-12-091-8/+24
| | | | | | | | | We should pass up errors instead of aborting. Do that at least for bind() failures which actually happen in real live due to the tcp port being busy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit aafd8eea74acb23fc818b49824a74c4d885c3504)
* smartcard: configure option --enable-smartcardAlon Levy2010-12-071-0/+11
|
* smartcard: server side (not enabled yet)Alon Levy2010-12-073-0/+574
|
* server: add spice_server_char_device_remove_interfaceAlon Levy2010-12-071-5/+14
|
* server: print subtype when adding CHAR_DEVICE interfacesAlon Levy2010-12-061-1/+1
|
* server: add static to spice_server_char_device_add_interfaceAlon Levy2010-12-061-1/+1
|
* server: fix print text on vdagent interface additionAlon Levy2010-12-061-1/+1
|
* server: add char_device.h header, use in reds.cAlon Levy2010-12-062-4/+12
|
* spice-experimental.h: add multiple include protectionAlon Levy2010-12-061-1/+7
|
* server/vdi_port (virtserial): always read dataAlon Levy2010-12-061-6/+13
| | | | | | | | | | | | We erronously ignored data from guest on the serial channel if no client is connected. This leads to an assert when the guest writes a second time, since there is still data unconsumed by us (the host). Fix by reading data anyway, and discarding it after parsing (and reading) whole messages from the guest. Net affect is that any messages the agent sends while no client is connected get discarded, but only full messages are discarded. This fixes an abort if booting a winxp guest with vdagent without a connected client.
* server: add char_device.h to Makefile.am for make distAlon Levy2010-12-021-0/+1
|
* server/tests: add test_display_no_sslAlon Levy2010-11-304-50/+588
| | | | | | | | | | updates taken from spice vga mode updates, i.e. non cacheable, glz compressed (depends on whatever settings you apply to the server) opaque draw operations. + completed the SpiceCoreInterface implementation (timers) v1->v2: removed test_util.c (Hans) replaced mallocz with calloc (Hans)
* server/tests: Makefile.am fixesAlon Levy2010-11-301-2/+2
| | | | | * don't install tests on make install * don't forget anything for make dist tarball
* add .gitignore for testsAlon Levy2010-11-301-0/+4
|
* server/reds: zap unsetting of QEMU_AUDIO_DRVAlon Levy2010-11-081-1/+0
|
* gitignore: add generated_*, vim temps, pycAlon Levy2010-11-081-0/+3
|
* reds: remove needless buffer in InputsStateAlon Levy2010-11-081-3/+0
|
* server: tests: add basic tests with working do nothing serverAlon Levy2010-11-088-0/+293
|
* Release 0.6.30.6.3Hans de Goede2010-10-181-1/+1
|
* Bump version to 0.6.20.6.2Hans de Goede2010-10-181-1/+1
|
* server: remove useless agent send_tokensHans de Goede2010-10-161-32/+5
| | | | | | | | We are keeping track of tokens for sending agent data to the client, but the client send an initial value of ~0, and never gives us new send tokens so this is all rather useless -> remove it. Note that it is kept in the migration data struct for compatibility reasons.
* Call read_from_vdi_port() from vdi_read_buf_release()Hans de Goede2010-10-151-2/+12
| | | | | | | | | | | | | | | | | | | | | | | read_from_vdi_port(), called from vdagent_char_device_wakeup() may fail to consume all data because no buffers are available in the read_bufs ring. When this happens we would fail to ever read more data from the agent on the guest as the port is throttled and stays throttled until we've consumed all data from the current buffer. This patch re-enables the call to read_from_vdi_port() from vdi_read_buf_release(), so that we will try the read again when space becomes available in the read_bufs ring. Together with another nasty hack in the linux guest virtio_console driver, where it waits for a write to be acked by the host before continuing with the next one, this can lead to a linux guest getting stuck / hang (until the write is read by the spice-server which never happens becaus of the above issues). Note that even with this patch, the guest will still gets stuck due to a bug in watch_update_mask in spice-core in qemu, which causes writing to the client to never resume once it blocked. A patch for this has been submitted to qemu.
* server: always call read_from_vdi_port() in a while loopHans de Goede2010-10-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | read_from_vdi_port() MUST always be called in a while loop until it returns 0. This is needed because it can cause new data available events and its recursion protection causes those to get lost. Calling it until it returns 0 ensures that all data has been consumed. Example scenario where we can fail to read the available data otherwise: - server/reds.c: vdagent_char_device_wakeup get called by hw/spice-vmc.c because data has arrived from the guest, - hw/spice-vmc.c: vmc_read get calls - If the vmc_read call depletes the current buffer it calls virtio_serial_throttle_port(&svc->port, false) - This causes vmc_have_data to get called, which if in the mean time another buffer has arrived causes vdagent_char_device_wakeup to gets called again (so recursively) - vdagent_char_device_wakeup is protected against recursive calling and ignores the second call (a nasty hack) - if no other data arrives, the arrived data will not get read
* Don't crash when a client disconnects while there were pending writesHans de Goede2010-10-151-1/+1
|
* server: add channel notifications.Gerd Hoffmann2010-10-123-4/+48
| | | | | | | | | | | | | This patch adds a channel event callback to the spice core interface. This new callback will be called for three events: (1) A new connection has been established. (2) The channel is ready (i.e. authentication is done, link message verification passed all tests, channel is ready to use). (3) Channel was disconnected. Qemu will use this to send notifications to the management app.
* server: Handle self_image in localize_bitmapAlexander Larsson2010-09-211-9/+16
| | | | | | When drawing a drawable with a NULL src bitmap that means we should be using the previously generated self_bitmap. Not doing this causes a segfault due to accessing the NULL.
* server: Handle NULL image in red_update_streamableAlexander Larsson2010-09-211-1/+2
| | | | A NULL src bitmap means self_bitmap, which is not a stream, so abort.
* server: Use the right image size for self_bitmapAlexander Larsson2010-09-211-2/+2
| | | | | | | The self_bitmap is the size of self_bitmap_area, not the bbox. This is especially important since we later copy the self_bitmap_area into the new bitmap, and if that is larger than bbox then we will overwrite random memory.
* server: Don't leak QUIC image chunksAlexander Larsson2010-09-211-0/+3
| | | | | red_put_image() needs to free the chunks for QUIC images, as we allocate these when creating the image.
* server: Ensure we flush the release pipe after an oomAlexander Larsson2010-09-201-0/+1
| | | | | | We really need to flush the ring to ensure that we push something on the release ring. If we don't do this and the ring is not pushed for other reasons we will timeout in the guest driver waiting for the ring.
* Release more drawables on OOMAlexander Larsson2010-09-201-1/+1
| | | | | | | | We've changed how resources are released so they are now being freed continuosly, rather than on OOM, since we want to free as early possible to avoid fragmentation. So, OOM situations should be a bit less common now and signify a real memory shortage, so we should try to free up more resources.
* fix palette handling for 0.4 compatGerd Hoffmann2010-09-141-43/+56
| | | | | spice 0.4 guests pass 16bpp palette colors when running in a 16bpp video mode. Convert them to 32bpp.
* fix brush handling for 0.4 compatGerd Hoffmann2010-09-141-23/+38
| | | | | spice 0.4 guests pass 16bpp colors for brushes when running in a 16bpp video mode. Convert them to 32bpp.
* move command flags handling to the qxl parserGerd Hoffmann2010-09-143-14/+18
| | | | | Pass through command flags to the qxl parser, so we can hide all compat bits for spice 0.4 within the qxl parser.
* server: avoid creating a stream from traces more than once for the same drawableYonit Halperin2010-09-021-5/+10
| | | | could have caused ASSERT(!drawable->stream) in red_create_stream
* Add API to turn on backwards compatibility modeAlexander Larsson2010-09-022-0/+33
| | | | | | | | | | | | | | | | | | When upgrading a cluster of machines you typically do this by upgrading a set of machines at a time, making the new machines run the new software version, but in a fashion compatible with the old versions (in terms of e.g. migration). Then when all machines are upgrades, any new features in the new version can be enabled. This API allows qemu to limit the set of features that spice uses to those compatible with an older version, in order to do an upgrade like this. Right now it doesn't really do much, since we don't keep compat with 0.4.0 atm (although that may be added later). There is no guarantee that any future version of spice support being compatible with any previous version. However, we will always support compatibility with the previous major version so that clusters can be upgraded step by step.
* qxl parser: complete parsing of QXLCompatDrawable structsGerd Hoffmann2010-08-311-0/+14
|
* server: red_current_add_equal - don't push a drawable to the middle of the ↵Yonit Halperin2010-08-311-1/+13
| | | | | | | pipe if it depends on surfaces. This will prevent: 1) rendering problems (commands sent to the client in the wrong order) 2) sending commands for surfaces that haven't been created yet on the client side.
* server: when woken up by data ready to be read, don't call write.Alon Levy2010-08-311-1/+1
| | | | | | | | | This used to be a callback for the vdi_port "data ready" interrupt, which did indicate either data ready to read or data ready to write, but this is no longer the case now that virtio-serial is used. This seemingly simple fix prevents a race that needs to be fixed with another patch, see freedesktop bz #29903
* server: retry mouse send on queue fullAlon Levy2010-08-311-0/+1
|
* server: bugfix - make vdi_port_write_retry reiterate if write_queue still ↵Alon Levy2010-08-311-1/+1
| | | | | | | | | not empty The vdi_port_write_timer_started flag was not being reset, which prevented another vdi_port_write_timer_start from actually starting the timer. Fix is to change order of lines. This happens in the callback of the timer, so no chance of double timer set.
* server: add subtype to SpiceCharDeviceInterface, use for vdagentAlon Levy2010-08-312-7/+50
|
* server: rename SpiceVDIPort* to SpiceCharDevice*Alon Levy2010-08-312-38/+38
|
* server: fix red_current_flush to flush only the surface that was given as ↵Yonit Halperin2010-08-301-1/+3
| | | | | | | | | | parameter A side effect of the previous red_current_flush, which flushed all the surfaces, and was called on a new display channel connection, was that red_handle_drawable_surfaces_client_synced sent the most updated surfaces images when needed. However, now, it should explicitly call red_current_flush. Moreover, since red_current_flush was called on a new display channel connection only if there was a primary surface, if the connection of the display channel occurred at the moment of no primary surface, red_handle_drawable_surfaces_client_synced was buggy.
* Bump versions.Gerd Hoffmann2010-08-301-1/+1
| | | | | | Update #define in server/spice.h in preparation for the 0.6.0 release. We also got some new functions, thus we have to increate the shared lib minor number for spice-server.
* Add config functions.Gerd Hoffmann2010-08-302-0/+38
| | | | | | A bunch of configuration functions where never ported forward from rhel-6 to upstream. Add them so we can add qemu config options for these settings.