0f9668e0c1
Remove qemu-common.h include from most units
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2022-04-06 14:31:55 +02:00
e03b56863d
Replace config-time define HOST_WORDS_BIGENDIAN
...
Replace a config-time define with a compile time condition
define (compatible with clang and gcc) that must be declared prior to
its usage. This avoids having a global configure time define, but also
prevents from bad usage, if the config header wasn't included before.
This can help to make some code independent from qemu too.
gcc supports __BYTE_ORDER__ from about 4.6 and clang from 3.2.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
[ For the s390x parts I'm involved in ]
Acked-by: Halil Pasic <pasic@linux.ibm.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220323155743.1585078-7-marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2022-04-06 10:50:37 +02:00
505dbf9b99
ui/clipboard: add a clipboard reset serial event
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-12-21 10:50:21 +04:00
835f69f4e6
ui/vdagent: add serial capability support
...
The Spice agent implements a simple serial mechanism to avoid clipboard
races between client & guest. See:
045a6978d6
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-12-21 10:50:21 +04:00
1b17f1e9f9
ui: generalize clipboard notifier
...
Use a QemuClipboardNotify union type for extendable clipboard events.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-12-21 10:50:21 +04:00
5912745288
ui/vdagent: replace #if 0 with protocol version check
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-12-21 10:50:21 +04:00
ddece46576
ui/vdagent: add CHECK_SPICE_PROTOCOL_VERSION
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-12-21 10:50:21 +04:00
90208bc965
ui/vdagent: add a migration blocker
...
The current implementation lacks migration support. After migration,
vdagent support will be broken (even after a restart of the daemons).
Let's try to fix it in 6.2.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-19-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
314bf50086
ui/vdagent: send release when no clipboard owner
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-17-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
3d3f0bc3f7
ui/vdagent: send empty clipboard when unhandled
...
Rather than leaving the agent timing out or hanging, reply to it with an
empty result.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-15-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
d2ed2c01c2
ui/vdagent: use qemu_clipboard_info helper
...
The clipboard unit now tracks the current clipboard grab, no need to
duplicate this work.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-14-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
c98c50de7c
ui/vdagent: use qemu_clipboard_peer_release helper
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-13-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
3b99bb4c3a
ui/vdagent: split clipboard recv message handling
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-12-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
5fb2e8d99b
ui/vdagent: reset outbuf on disconnect
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-11-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
5e0a24e868
ui/vdagent: disconnect handlers and reset state on finalize
...
Avoid handlers being called with dangling pointers when the object is
freed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-10-marcandre.lureau@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
e7c55746f1
ui/vdagent: remove copy-pasta comment
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-3-marcandre.lureau@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:14 +04:00
248c50b2bd
ui/vdagent: fix leak on error path
...
"info" was leaked when more than 10 entries.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20210805135715.857938-2-marcandre.lureau@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
2021-08-31 17:25:09 +04:00
f0349f4d89
ui/vdagent: add clipboard support
...
This patch adds support for clipboard messages to the qemu vdagent
implementation, which allows the guest exchange clipboard data with
qemu. Clipboard support can be enabled/disabled using the new
'clipboard' parameter for the vdagent chardev. Default is off.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-id: 20210519053940.1888907-1-kraxel@redhat.com
Message-Id: <20210519053940.1888907-7-kraxel@redhat.com >
2021-05-21 09:42:44 +02:00
5608191980
ui/vdagent: add mouse support
...
This patch adds support for mouse messages to the vdagent
implementation. This can be enabled/disabled using the new
'mouse' parameter for the vdagent chardev. Default is on.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Acked-by: Markus Armbruster <armbru@redhat.com >
Message-id: 20210519053940.1888907-1-kraxel@redhat.com
Message-Id: <20210519053940.1888907-6-kraxel@redhat.com >
2021-05-21 09:42:44 +02:00
de74a22cc8
ui/vdagent: core infrastructure
...
The vdagent protocol allows the guest agent (spice-vdagent) and the
spice client exchange messages to implement features which require
guest cooperation, for example clipboard support.
This is a qemu implementation of the spice client side. This allows
the spice guest agent talk to qemu directly when not using the spice
protocol.
usage: qemu \
-chardev qemu-vdagent,id=vdagent \
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0
This patch adds just the protocol basics: initial handshake and
capability negotiation. The following patches will add actual
functionality and also add fields to the initially empty
ChardevVDAgent qapi struct.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-id: 20210519053940.1888907-1-kraxel@redhat.com
Message-Id: <20210519053940.1888907-5-kraxel@redhat.com >
2021-05-21 09:42:44 +02:00