[Spice-devel] [PATCH spice] chardev: remove write polling
Christophe Fergeau
cfergeau at redhat.com
Fri Oct 24 02:53:27 PDT 2014
On Fri, Oct 24, 2014 at 10:54:24AM +0200, Marc-André Lureau wrote:
> @@ -407,6 +407,10 @@ typedef struct SpiceCharDeviceInterface SpiceCharDeviceInterface;
> typedef struct SpiceCharDeviceInstance SpiceCharDeviceInstance;
> typedef struct SpiceCharDeviceState SpiceCharDeviceState;
>
> +typedef enum {
> + SPICE_CHAR_DEVICE_NOTIFY_WRITABLE = 1 << 0,
> +} spice_char_device_flags;
> +
> struct SpiceCharDeviceInterface {
> SpiceBaseInterface base;
>
> @@ -414,6 +418,7 @@ struct SpiceCharDeviceInterface {
> int (*write)(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len);
> int (*read)(SpiceCharDeviceInstance *sin, uint8_t *buf, int len);
> void (*event)(SpiceCharDeviceInstance *sin, uint8_t event);
> + spice_char_device_flags flags;
> };
QEMU uses a static SpiceCharDeviceInterface:
static SpiceCharDeviceInterface vmc_interface = {
.base.type = SPICE_INTERFACE_CHAR_DEVICE,
.base.description = "spice virtual channel char device",
.base.major_version = SPICE_INTERFACE_CHAR_DEVICE_MAJOR,
.base.minor_version = SPICE_INTERFACE_CHAR_DEVICE_MINOR,
.state = vmc_state,
.write = vmc_write,
.read = vmc_read,
#if SPICE_SERVER_VERSION >= 0x000c02
.event = vmc_event,
#endif
};
If we are using a QEMU version compiled against an older spice-server, and then
upgrade spice-server but not QEMU, I don't think accessing that new 'flags'
filed is going to work (in other words, this change seems to be an ABI break).
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141024/80109702/attachment.sig>
More information about the Spice-devel
mailing list