Commit Graph

135 Commits

Author SHA1 Message Date
Alon Levy
534d8ede7a Revert "add QXL_SURF_FLAG_GUEST_MEM for allocating surfaces on guest memory"
This reverts commit 2dfea386b3.

local commit accidentally pushed doing a "git push" instead of a
"git push master:master", reverting.
2011-11-10 15:55:45 +02:00
Alon Levy
2dfea386b3 add QXL_SURF_FLAG_GUEST_MEM for allocating surfaces on guest memory 2011-10-01 21:21:56 +03:00
Alon Levy
e9eba76d5b remove INSTALL symlink
prevents koji build, zip fails. There is no place for a symlink, and
this file is installed by autoreconf -i anyway.
2011-09-26 15:47:42 +03:00
Yonit Halperin
abfdf4d8ab Release 0.8.2
semi-seamless migration RHBZ 738262
2011-09-19 11:37:19 +03:00
Alon Levy
771f21b6c9 Release 0.8.1
For qxl_dev.h changes.
2011-07-18 11:38:18 +03:00
Alon Levy
156490faa1 qxl_dev: add third revision V10
The driver will check for this revision or higher to know that the device
supports async io, the two S3 related ios, and the interrupts IO_CMD and ERROR.
2011-07-18 11:20:40 +03:00
Alon Levy
54253a6d54 qxl_dev: add QXL_INTERRUPT_ERROR
The interrupt is used to notify the guest driver it did an error in
the last io operation. It can be left unhandled.
2011-07-18 11:20:39 +03:00
Alon Levy
49808025e7 add QXL_IO_FLUSH_{SURFACES,RELEASE} for sleep (S3) support
related RHBZ: 688883

Guest initiated sleep looks like this:

 Guest:
  (0) stop putting new commands into the rings
  (1) QXL_IO_FLUSH_SURFACES
      qxl calls flush_surfaces(), spice-server flushes command rings and
      renders all surfaces, thereby flushing state to device memory.
  (2) QXL_IO_DESTROY_ALL_SURFACES
      zap surfaces
  (3) QXL_IO_FLUSH_RELEASE
      push release queue head into the release ring, so the guest
      will see it and can release everything.
  (4) tell acpi to reset
 Qemu:
  (5) qxl_reset_handler
 Guest:
  (6) sends surface create commands

The QXL_IO_FLUSH_SURFACES is an optimization, to reduce vmexits. It is used to
 flush both command rings and update all surfaces at once (equivalent to
 UPDATE_AREA X NUM_ACTIVE_SURFACES)

 destroy all surfaces to release resources but not destroy the guest side surfaces
 get device to flush all server released resources to the release ring (could use multiple
  calls to OOM - but this is not well defined, would need to loop)
 After (1) there will be no memory allocated on the pci bars.
2011-07-18 11:20:39 +03:00
Gerd Hoffmann
9601a6353b Add async I/O commands.
Add async versions of the I/O commands which do not block and instead
raise the new QXL_INTERRUPT_IO_CMD when done.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-18 11:20:39 +03:00
Marc-André Lureau
ad3cc860a3 protocol: add SPICE_{PLAYBACK,RECORD}_CAP_VOLUME caps
These changes the protocol the following way:

When the client announces it has SPICE_PLAYBACK_CAP_VOLUME, the server
can send PlaybackChannel.{volume,mute} messages to notify of volume
changes (respectively for RECORD).

If the client doesn't implement SPICE_PLAYBACK_CAP_VOLUME, the server can
handle the volume changes the way it prefers, for example, ignoring them or
applying volume effect on the server side etc..
2011-07-18 11:20:39 +03:00
Marc-André Lureau
e2d6494b26 spice: enums.h regenerated 2011-07-18 11:20:39 +03:00
Christophe Fergeau
2257ca24ef protocol: use packed-start/end to pack structures
spice-protocol comes with 2 headers to handle structure packing,
but controller_prot.h and foreign_menu_prot were both using their
own preprocessor definitions to handle packing. It's better to have
structure packing macros centralized since how it's done varies
between compilers, so it may need to change over time.
2011-07-18 11:20:07 +03:00
Marc-André Lureau
15452bfcd4 controller: add missing spice/types include 2011-07-18 11:20:07 +03:00
Hans de Goede
f343634fdd vd_agent.h: Add a VDP_END_PORT to the chunk port enum 2011-03-24 11:57:08 +01:00
Alon Levy
44e22ca6b6 qxl_dev: introduce defines for rings sizes 2011-03-08 20:17:37 +02:00
Hans de Goede
52d4094f31 Release 0.8.0 2011-03-01 19:20:35 +02:00
Marc-André Lureau
28fca476f4 protocol: add clipboard selection capability
Add a new capability VD_AGENT_CAP_CLIPBOARD_SELECTION.

When both client and servers have this capability, the
VDAgentClipboard* messages MUST be prepended with a uint8_t indicating
which clipboard selection to operate + 3 bytes stuffing for alignment
that could be used for future capabilities or extensions.

A few clipboard selection are defined according to X11/Gtk scheme:

- VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD: the default clipboard,
  implemented by most OS to deal with explicit Copy/Paste operations.

- VD_AGENT_CLIPBOARD_SELECTION_PRIMARY: the PRIMARY clipboard, used
  for mouse selections.

- VD_AGENT_CLIPBOARD_SELECTION_SECONDARY: the SECONDARY clipboard.

See also:
http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki

https://bugs.freedesktop.org/show_bug.cgi?id=34833
2011-03-01 19:02:42 +02:00
Marc-André Lureau
d3a4947525 protocol: add common channel caps for AUTH mechanism selection
Current version 2.0 of the SPICE protocol describes how the client
reply to the server SpiceLinkReply message with a RSA_public_encrypt()
of the password.

Instead of using the current Spice AUTH mechanism, we would like to
offer different AUTH mechanisms, in particular SASL, which is a
framework allowing different underlying mechanisms such as
GSSAPI/Kerberos v5 (and optionally adding a data security layer).

We could bump the protocol version, but that would make this feature
mandatory for the implementer of the protocol. By using the channel
caps, the client and server are left to negotiate and alter the AUTH
part of the protocol as follows:

- SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION, if set, the authentication
  mechanism can be chosen during link phase. If both client and server
  have this cap, the client MUST reply to SpiceLinkReply with a
  SpiceLinkAuthMechanism message, with the value of the CAP_AUTH
  mechanism choosen (a uint32 auth_mechanism). The following
  authentication steps are described by the selected authentication
  mechanism.

The differents mechanisms selectable via
SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION are also specified as part of
the common channel caps. They can be used only if both client and
server offer them.

Ex: no AUTH selection
C: SpiceLinkMess
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION not in common caps
- The client can't choose AUTH, and fallback on Spice RSA mechanism

Ex: AUTH selection
C: SpiceLinkMess, CAP_PROTOCOL_AUTH_SELECTION in common caps
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION in common caps
- The client MUST reply with SpiceLinkAuthMechanism
C: SpiceLinkAuthMechanism (with a matching CAP_AUTH)

- SPICE_COMMON_CAP_AUTH_SPICE, the following steps and authentication
  mechanism are the same as with version 2.0: a RSA_public_encrypt()
  of the password is sent.

  This mechanism MUST be implemented in both client and server to
  comply with the SPICE protocol.

- SPICE_COMMON_CAP_AUTH_SASL, the authentication exchange follows
  SASL protocol has defined in RFC 2222.

  This mechanism is OPTIONAL in both client and servers.

Ex: AUTH selection, followed by SASL authentication

AUTH Selection:
C: SpiceLinkMess, CAP_PROTOCOL_AUTH_SELECTION + CAP_AUTH_SASL in common caps
S: SpiceLinkReply, CAP_PROTOCOL_AUTH_SELECTION + CAP_AUTH_SASL in common caps
- The client MUST reply with SpiceLinkAuthMechanism
C: SpiceLinkAuthMechanism CAP_AUTH_SASL

Init:
S:  u32 mechlist-length
    u8-array mechlist-string

Start:
C:  u32 mechname-length
    u8-array mechname-string
    u32 clientout-length
    u8-array clientout-string
S:  u32 serverin-length
    u8-array serverin-string
    u8 continue

Step: (while continue)
C:  u32 clientout-length
    u8-array clientout-string
S:  u32 serverin-length
    u8-array serverin-string
    u8 continue

See also VNC SASL protocol description, which uses the same protocol:

http://sourceforge.net/mailarchive/forum.php?thread_name=20100719125155.GA14166%40evileye.atkac.brq.redhat.com&forum_name=tigervnc-rfbproto

Updated since v1 of this commit:
 - renamed s/SPICE_CHANNEL_CAP/SPICE_COMMON_CAP
 - added some note about mandatory vs optional mechanisms.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-03-01 19:02:08 +02:00
Hans de Goede
0d0e952195 Release 0.7.1 2011-02-11 15:15:39 +01:00
Alon Levy
b740b46dd5 enums: typedefy SpiceBitmapFmt 2011-02-11 14:50:06 +01:00
Alon Levy
4a53afdc6d qxl_dev.h: make QXLEffectType an enum instead of defines 2011-02-11 14:49:56 +01:00
Alon Levy
26516cf7ac qxl_dev.h: make QXLBitmapFlags a typedef 2011-02-11 14:49:49 +01:00
Alon Levy
b76063956c qxl_dev.h: make QXLSurfaceCmdType a typedef 2011-02-11 14:49:40 +01:00
Alon Levy
d3fd5a635d qxl_dev.h: name QXL_IMAGE_* flags as type and enum QXLImageFlags 2011-02-11 14:49:33 +01:00
Alon Levy
b16b5b3c4d qxl_dev.h: make QXLCmdType enum also a typedef 2011-02-11 14:49:24 +01:00
Arnon Gilboa
e8ab669dfa define spice_mb MemoryBarrier for WIN64
__asm is not supported on _WIN64, so use macro instead
required for Windows x64 guest display driver (qxldd.dll)
2011-02-11 14:35:10 +01:00
Marc-André Lureau
41946c45cf mingw32: specify packing alignment to 1 byte, to override -mms-bitfield
Ex: G_STRUCT_OFFSET(SpiceLinkReply, num_channel_caps) is 172 bytes
when compiled with -mms-bitfield, and 170 bytes without.

GLib/Gtk are compiled with -mms-bitfield, and it is necessary to
compile with the same option for compatibility. The pack pragma
for MINGW32 corrects the structure alignement.

We could use the pack pragma for GNUC unconditionally, that could help
to ensure struct binary compatibility between different compiled
flavours.
2011-02-11 14:34:52 +01:00
Hans de Goede
d983e6ae8a Update license header for spice/macros.h
This one mistakenly had a GPL header rather then an LGPL header.
2011-01-21 21:36:38 +01:00
Hans de Goede
cd17623ccd Release 0.7.0 2010-12-16 17:08:12 +01:00
Alon Levy
c3822ca59b smartcard: add channel 2010-10-25 14:51:42 +02:00
Hans de Goede
d63c0072b4 controller: Make all text utf-8
We are making all text send over the controller socket utf-8, rather then
having somethings as 8 bit (hostname) and others unicode16.

Adjust the CONTROLLER_MENU_*_DELIMITER defines for this.
2010-10-21 16:47:12 +02:00
Hans de Goede
254b8803f9 Release 0.6.3 2010-10-18 15:10:14 +02:00
Arnon Gilboa
6e499cf69e Add controller protocol 2010-10-18 10:08:45 +02:00
Arnon Gilboa
8e1e17755e Add foreign menu protocol 2010-10-18 10:02:11 +02:00
Hans de Goede
7e66782a76 Add clipboard data types for images 2010-10-12 13:52:40 +02:00
Hans de Goede
55bdae1179 VD_AGENT_CLIPBOARD_GRAB takes a list of types rather then a single type
This way the grabbing side can indicate when the clipboard owning app
can provide the clipboard contents in multiple formats, ie plain text
and html.

Also drop the VD_AGENT_CLIPBOARD_BITMAP type until we have a clear
cross platform definition of the contents to send for bitmap type
clipboard data.
2010-10-04 16:54:00 +02:00
Arnon Gilboa
016cdb0b1d vd_agent: add VD_AGENT_CAP_CLIPBOARD_BY_DEMAND capability enum
VD_AGENT_CLIPBOARD_NONE for unsupported clipboard types
2010-10-04 16:48:27 +02:00
Arnon Gilboa
5fdd0ba665 vd_agent: add protocol messages for clipboard/selection-owner model
-VD_AGENT_CLIPBOARD_GRAB(type) - tell the other side that an application in our side ("we") got ownership of the clipboard.
-VD_AGENT_CLIPBOARD_REQUEST(type) - after we know the other side owns the clipboard (GRAB received), we notify the os we are the owner. when we are asked by the os/app for the clipboard data, we send this REQUEST msg to the other side.
-VD_AGENT_CLIPBOARD(type, data) - the existing message for sending the clipboard, is now sent only in response to REQUEST.
-VD_AGENT_CLIPBOARD_RELEASE - tell the other side that we are no longer the owner of the clipboard (e.g. the owner app was closed).

this patch will be followed by agent & client patches handling the above messages.
2010-10-04 16:48:27 +02:00
Alexander Larsson
57872d7887 Bump version to 0.6.1 2010-09-29 18:16:07 +02:00
Alexander Larsson
2884c98787 Update for release 2010-09-29 18:16:00 +02:00
Gerd Hoffmann
527d52ae25 add compat flag for 16bpp mode
spice 0.6 uses 32bpp values unconditionally for brush and palette
colors.

spice 0.4 used to use 16 bpp or 32 bpp depending on the video mode.
The qxl parser needs to know the guest video mode depth to correctly
interpret these values in spice 0.4 compat mode.  Add a flag to pass
on this informartion.
2010-09-14 10:08:28 +02:00
Alexander Larsson
3eae24f83d Bump version to 0.6.0 2010-08-31 14:28:44 +02:00
Alexander Larsson
068e6362d3 Update NEWS for release 2010-08-31 14:26:39 +02:00
Alon Levy
31d502522a add vd_agent announce capabilities message 2010-08-31 11:08:33 +03:00
Alon Levy
2335032d3b Merge commit 'e27cb334cf70409c7e32be6f061921b4b317be17' 2010-08-30 16:13:58 +03:00
Alon Levy
e27cb334cf move pipe header defines from reds.c to spice-protocol 2010-08-30 13:25:44 +03:00
Alexander Larsson
ae739ac541 Update NEWS for release 2010-08-29 20:17:36 +03:00
Alexander Larsson
5200cb0cd1 Update version to 0.5.3 2010-08-29 20:17:36 +03:00
Alexander Larsson
ca700d1fa7 Change major to 2 to declare network protocol stable 2010-08-29 20:17:36 +03:00
Yonit Halperin
3f63e04881 vdagent protocol: add display setting 2010-08-29 20:17:36 +03:00