On Thu, Dec 07, 2017 at 08:47:39AM +0000, Frediano Ziglio wrote: > Due to the way Qemu handle the device we must consume all pending > data inside the callback to read data from the device. Any idea if QEMU can be fixed to do the right thing? We'll still need some kind of workaround to deal with older QEMUs, but might be nicer if newer QEMUs don't have this limitation. It was not clear to me if the limitation comes from chardev/spice.c or from a more generic QEMU layer. I would say "inside the stream_device_read_msg_from_dev() callback" rather than "inside the callback to read data from the device" > We need to consume all data from previous device dialog to avoid s/dialog/communication maybe? > that next device usage is still seeing old data. > This as Qemu return 0 if you call SpiceCharDeviceInterface::read > outside this callback (which is called by Qemu using > spice_server_char_device_wakeup). "This needs to be done within this callback, as QEMU returns 0 if you call SpiceCharDeviceInterface::read() outside of it"? "QEMU invokes this callback through a call to spice_server_char_device_wakeup" > Also to communicate the error and avoiding to have to read any data the > guest want to write disable the device. I'm not sure what you mean here. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel