Gerd Hoffmann <kra...@redhat.com> writes: > 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 vdagent,id=vdagent \ > -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 > > This patch adds just the protocol basics: initial handshake and > capability negotiation. > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> [...] > diff --git a/qapi/char.json b/qapi/char.json > index 6413970fa73b..6e565ce42753 100644 > --- a/qapi/char.json > +++ b/qapi/char.json > @@ -390,6 +390,17 @@ > 'data': { '*size': 'int' }, > 'base': 'ChardevCommon' } > > +## > +# @ChardevVDAgent: > +# > +# Configuration info for vdagent. > +# > +# Since: 6.0 > +## > +{ 'struct': 'ChardevVDAgent', > + 'data': { }, > + 'base': 'ChardevCommon' }
ChardevVDAgent isn't strictly needed (it's identical to ChardevBackend), but it may make the code easier to read or easier to change. Okay. Does it miss "'if': 'defined(CONFIG_SPICE)'"? > + > ## > # @ChardevBackend: > # > @@ -417,6 +428,8 @@ > 'if': 'defined(CONFIG_SPICE)' }, > 'spiceport': { 'type': 'ChardevSpicePort', > 'if': 'defined(CONFIG_SPICE)' }, > + 'vdagent': { 'type': 'ChardevVDAgent', > + 'if': 'defined(CONFIG_SPICE)' }, > 'vc': 'ChardevVC', > 'ringbuf': 'ChardevRingbuf', > # next one is just for compatibility