Age | Commit message (Collapse) | Author | Files | Lines |
|
semi-seamless migration RHBZ 738262
|
|
For qxl_dev.h changes.
|
|
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.
|
|
The interrupt is used to notify the guest driver it did an error in
the last io operation. It can be left unhandled.
|
|
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.
|
|
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>
|
|
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..
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__asm is not supported on _WIN64, so use macro instead
required for Windows x64 guest display driver (qxldd.dll)
|
|
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.
|
|
This one mistakenly had a GPL header rather then an LGPL header.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
VD_AGENT_CLIPBOARD_NONE for unsupported clipboard types
|
|
-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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define default & env variable for overriding it
|
|
|
|
|