Re: [PATCH spice-server v2 2/2] stream-device: Implements properly device reset on open/close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> 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

Didn't think much about but seems not easy to do.
Basically the buffer to read is available only when Qemu calls
spice_server_char_device_wakeup from spice_chr_write

> 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
> 

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]