« Previous | Next » 

Revision f76e4c7f


Added by Hans de Goede almost 9 years ago

spice-qemu-char: Generate chardev open/close events

Define a state callback and make that generate chardev open/close events when
called by the spice-server.


1) For all but the newest spice-server versions (which have a fix for this)
the code ignores these events for a spicevmc with a subtype of vdagent, this
subtype specific knowledge is undesirable, but unavoidable for now, see:

2) This code deliberately sends the events immediately rather then from a
bh. This is done this way because:
a) There is no need to do it from a bh; and
b) Doing it from a bh actually causes issues because the spice-server may send
data immediately after the open and when the open runs from a bh, then
qemu_chr_be_can_write will return 0 for the first write which the spice-server
does not expect, when this happens the spice-server will never retry the write
causing communication to stall.

Signed-off-by: Hans de Goede <>
Signed-off-by: Anthony Liguori <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences