Commit Graph

1554 Commits

Author SHA1 Message Date
Alon Levy
dc3cd205dd Release 0.12.0 2012-09-15 00:36:54 +03:00
Alon Levy
124984a171 server/spice-server.syms: add missing global labels
Although global is the default, this makes the file more consistent.
2012-09-13 16:43:01 +03:00
Alon Levy
c48812ee51 server/Makefile.am: fix for make distcheck
Doesn't make sense to distribute test_spice_version.sh, so just
ensure the build passes if it doesn't exist.
2012-09-13 16:38:58 +03:00
Alon Levy
56eef9eeaa spice-server 0.11.5
Added api:
 QXL interface (3.2)
  client_monitors_config
2012-09-13 14:47:32 +03:00
Alon Levy
9e1d165fc0 server/tests: agent mock, client_monitors_config 2012-09-13 14:47:32 +03:00
Alon Levy
d694739b21 server: Filter VD_AGENT_MONITORS_CONFIG
If the guest supports client monitors config we pass it the
VDAgentMonitorsConfig message via the
QXLInterface::client_monitors_config api instead of via the vdagent.
2012-09-13 14:47:32 +03:00
Alon Levy
4338968aad server/reds: reuse already defined local 2012-09-13 14:47:32 +03:00
Alon Levy
dc69ef49d0 server/red_dispatcher: client_monitors_config support
Adds two functions:
 - red_dispatcher_use_client_monitors_config:
   check that QXLInterface supports client_monitors_config and that it's
   functional.
 - red_dispatcher_client_monitors_config:
   send the client monitors configuration to the guest.
2012-09-13 14:47:31 +03:00
Alon Levy
ce42c76aed server: add QXLInterface::client_monitors_config
Used to implement guest monitor configuration change similarly to real
hardware in conjunction with the new qemu interrupt
QXL_INTERRUPT_CLIENT_MONITORS_CONFIG. client_monitors_config is also
used to probe the support by the interface. If it is not supported we
send the message to the guest agent.
This makes a linux qxl driver similar to existing kms drivers.

The logic is:

For every received VDAgentMonitorsConfig:
 if client_monitors_config(NULL):
  write client configuration to pci rom BAR.
  send interrupt to guest
  guest kernel reads configuration from rom BAR.
  guest kernel issues event to user space
  user space reads (libdrm) and reconfigures (libXRandr)
 else: (current implementation)
  write message to guest agent
  guest agent issues reconfiguration via XRandr / windows Escape ioctl to kernel
2012-09-13 14:47:31 +03:00
Alon Levy
9b2e52f2bc update spice-common module
For qxl client_monitors_config support.
2012-09-13 14:47:26 +03:00
Alon Levy
c41616bb7f server/red_dispatcher: change a printerr to debug 2012-09-12 21:09:00 +03:00
Søren Sandmann Pedersen
b2683943fe Bump SPICE_INTERFACE_QXL_VERSION_MINOR
Then check that we have the right version before accessing the
set_client_capabilities() function.
2012-09-11 13:43:48 -04:00
Peter Robinson
07426f3c4f Enable build on armv6+
The following patch enables it to build on ARM platforms that support
atomics. Tested on an armv7hl on an ARMv7 device running Fedora 18. Using
firefox connecting to a RHEV-M instance I could launch consoles in
spice-xpi and login so basic support works!

Resolves: rhbz#613529
2012-09-11 15:15:14 +02:00
Christophe Fergeau
a37d440c82 Update spice-common to get A8 surface definitions
Latest spice needs these definitions from spice-protocol
2012-09-10 10:51:09 +02:00
Søren Sandmann Pedersen
88283023a8 Bump spice.h version number to 0.11.4
No new symbols are added, but there is an addition to QXLInterface:

    void (*set_client_capabilities)(QXLInstance *qin,
                                    uint8_t client_present,
                                    uint8_t caps[58]);
2012-09-07 12:06:07 -04:00
Søren Sandmann Pedersen
7628b91a0b Set a8 capability in the QXL device if supported by the client 2012-09-07 12:06:07 -04:00
Søren Sandmann Pedersen
8855438ab6 Process outstanding commands in the ring after changing capability bits
When a new client connects, there may be commands in the ring that it
can't understand, so we need to process these before forwarding new
commands to the client. By doing this after changing the capability
bits we ensure that the new client will never see a command that it
doesn't understand (under the assumption that the guest will read and
obey the capability bits).

Acked-by: Alon Levy <alonl@redhat.com>
2012-09-07 12:05:50 -04:00
Søren Sandmann Pedersen
83b3e3f20d Add new set_client_capabilities() interface to QXLInstance
A new interface

  set_client_capabilities (QXLInstance *qin,
  			   uint8_t client_present,
  			   uint8_t caps[58]);

is added to QXLInstance, and spice server is changed to call it
whenever a client connects or disconnects. The QXL device in response
is expected to update the client capability bits in the ROM of the
device and raise the QXL_INTERRUPT_CLIENT interrupt.

There is a potential race condition in the case where a client
disconnects and a new client with fewer capabilities connects. There
may be commands in the ring that the new client can't handle. This
case is handled by first changing the capability bits, then processing
all commands in the ring, and then start forwarding commands to the
new client. As long as the guest obeys the capability bits, the new
client will never see anything it doesn't understand.
2012-09-06 13:04:11 -04:00
Søren Sandmann Pedersen
9e9432c023 client: Advertise A8_SURFACE capability 2012-09-06 13:04:10 -04:00
Alon Levy
5579d8721b server/red_parse_qxl: fix bitmap_consistent again 2012-09-05 23:00:55 +03:00
Jeremy White
5819976c7e Implement spice_server_set_exit_on_disconnect to enable an option whereby the spice server shuts down on client disconnect. 2012-09-05 19:18:34 +03:00
Alon Levy
bf29ff4296 server/red_parse_qxl: fix wrong bitmap_consistent
The bit calculation was wrong for all the paletted types by a factor of
between 8 and 1 (SPICE_BITMAP_FMT_{1,4,8}BIT_PLT_{LE,BE})
2012-09-05 19:18:31 +03:00
Alon Levy
1c4e315e3e server/red_parse_qxl: add bitmap consistency check
Just checks stride vs width times bpp.

This fixes a potential abort on guest generated bad images in
glz_encoder.

Other files touched to move some consts to red_common, they are
static so no problem to be defined in both red_worker.c and
red_parse_qxl.c .
2012-09-03 19:27:22 +03:00
Alon Levy
f567f6b4cd server/tests/test_display_base: fix update_area abort
Don't do zero area update_areas, server now aborts on those. This tester
is not supposed to test those aborts.
2012-09-03 19:26:44 +03:00
Alon Levy
eab78033a6 server: replace syntax-check reported tabs with spaces 2012-09-03 14:56:56 +03:00
Alon Levy
078742b0ee server: add dist-hook to prevent spice version configure/spice.h difference 2012-09-03 10:31:02 +03:00
Alon Levy
8ac808918c 0.11.3 release
No new api entries.
2012-09-02 20:54:37 +03:00
Alon Levy
a6b2c10c1e add server/tests/test_vdagent 2012-09-02 14:42:18 +03:00
Alon Levy
12c4349de7 server/tests/test_two_servers 2012-09-02 13:36:49 +03:00
Alon Levy
caea769943 server/tests: introduce Test struct 2012-09-02 13:36:41 +03:00
Alon Levy
897aaa7be5 server/red_worker: seamless: fix invalid memory reference
replace add_ref with add for stack allocated SpiceMigrateDataDisplay.

This fixes wrong MIGRATE_DATA message in display channel (symptom is
glz_encoder_max being way too big, and malloc failure at target) seen on
F18 with gcc-4.7.1-5.fc18.x86_64 and glibc-2.16-8.fc18.x86_64 (didn't
appear on RHEL 6).
2012-08-30 17:08:10 +03:00
Alon Levy
3d28317e97 server: freezed->froze, missing whitespace after declarations 2012-08-30 17:08:09 +03:00
Alon Levy
4f7876e4c8 server: s/max_encdoers/max_encoders/ 2012-08-30 17:08:09 +03:00
Yonit Halperin
1dbe5af2ac server/inputs_channel.c: whitespace fix 2012-08-30 17:08:09 +03:00
Alon Levy
e9557228d8 server/red_tunnel_worker: remove unneeded expect_migrate_mark 2012-08-30 17:08:09 +03:00
Alon Levy
77a06903f6 server/red_tunnel_worker.c: fix build
Only passes compile, not tested.
2012-08-28 00:04:14 +03:00
Marc-André Lureau
560d8b0135 inputs: handle SPICE_MSGC_INPUTS_KEY_SCANCODE
Handle SPICE_MSGC_INPUTS_KEY_SCANCODE message, allowing arbitrary
keyboard scancode sequence.
2012-08-27 17:37:24 +02:00
Alon Levy
bd10d502f8 support automake >= 1.12
Requires a single line (sans comments) change to configure.ac in
spice-common too, to define the new AM_PROG_AR.
2012-08-27 16:17:17 +03:00
Alon Levy
e7aee13e57 server/red_worker: handle_dev_update_area: fail if invalid area 2012-08-27 16:17:17 +03:00
Yann E. MORIN
fd39b2c246 client: fix missing stdarg.h include
When the C library is uClibc, stdarg.h is required to get the
definition for va_list et al.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-27 14:18:29 +02:00
Yonit Halperin
c83a608fb4 enable seamless migration and set migration protocol version 2012-08-27 09:13:14 +03:00
Yonit Halperin
c24276d941 inputs channel migration: don't send any msg after MSG_MIGRATE
Pending motion acks, and keyboard modifiers messages will be sent
by the destination after receiving the migration data.
2012-08-27 09:13:13 +03:00
Yonit Halperin
b18c6d4298 inputs_channel: send and handle migration data 2012-08-27 09:13:13 +03:00
Yonit Halperin
0f4bc12090 migration_protocol: add inputs channel migration data
Storing the motion count in uint16_t and not in uint32_t since
the exact count is not important, just its division in
SPICE_INPUT_MOTION_ACK_BUNCH (see the next 2 patches).
2012-08-27 09:13:13 +03:00
Yonit Halperin
115d095d46 main_channel: don't expect init msg in a seamless migration destination
If the server is a destination of seamless migration, send msgs to the client,
even though an init msg has not been sent to the client.
2012-08-27 09:13:12 +03:00
Yonit Halperin
e142bd9a61 red_channel: set send_data.last_sent_serial in red_channel_client_set_message_serial
red_channel_client_set_message_serial is called for setting
the serial of the display channel messages after migration (on the
destination side). The serial is retrieved from the migration data.
2012-08-27 09:13:12 +03:00
Yonit Halperin
26027036c0 red_channel: remove unused migrate flag from RedChannel
The relevant flags reside in RedChannelClient and RedClient
2012-08-27 09:13:12 +03:00
Yonit Halperin
934fb14ccc snd_worker: handling migration
The playback and record channel send SPICE_MSG_MIGRATE to the client.
Both playback and record channel does not have a state to restore:
while in the legacy migration implementation the record channel
used to restore the mode and start time, it looks unnecessary since
the client receives from the src MSG_RECORD_STOP before the migration
completion notification (when the vm is stopped). Afterwards, when the vm
starts on the dest side, the client receives MSG_RECORD_START.
2012-08-27 09:13:11 +03:00
Yonit Halperin
8874f3b259 snd_channel: fix double release
Due to the fix in the previous patch, snd_disconnect_channel can be
called both when there is write/read error in the channel, or from
red_client_destroy (which calls client_cbs.disconnect).
Multiple calls to snd_disconnect_channel resulted in calling
channel->cleanup(channel) more than once (double release).
2012-08-27 09:13:11 +03:00
Yonit Halperin
08d223beb3 red_channel (dummy): fix not adding dummy RedChannelClient to the client
snd channel wasn't added to be part of the client's channels list.
As a result, when the client was destroyed, or migrated, snd channel
client wasn't destroy, or its migration callback wasn't called.

However, due to adding dummy channels to the client, we need special
handling for calls to disconnecting dummy channel clients.

TODO: we need to refactor snd_worker to use red_channel
2012-08-27 09:13:11 +03:00