[Spice-devel] [PATCH spice] chardev: remove write polling
Marc-André Lureau
mlureau at redhat.com
Fri Oct 24 03:15:13 PDT 2014
----- Original Message -----
> 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).
>
right, I had already made a change locally to use the interface version (although
I think we shouldn't be using that, but instead use regular library versioning)
Sending now.
More information about the Spice-devel
mailing list