[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/1] virtio: serial: expose a 'guest_writable
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/1] virtio: serial: expose a 'guest_writable' callback for users |
Date: |
Thu, 9 Oct 2014 14:04:53 +0100 |
On 9 October 2014 13:17, Amit Shah <address@hidden> wrote:
> On (Thu) 09 Oct 2014 [13:18:16], Markus Armbruster wrote:
>> The code should work, but whether it makes sense is hard to judge for
>> virtio noobs like me without a user of guest_writable. The conditional
>> guarding vsc->guest_writable(port) in particular.
>
> Right. This was originally requested by the spice folks, and they
> don't yet have a user implemented (waiting for the spice-char
> implementation). But Peter came up with a user; so I posted this w/o
> the spice part of it. But looks like Peter has lost the code for his
> user, so this patch will have to wait ;-)
I have the QEMU code...
https://git.linaro.org/people/peter.maydell/qemu-arm.git/patch/33895359ddee3696bb24eac24cf8ee4cd697c72c
...I just lost the bit of userspace code I was using to test it
It's not very interesting as a use case though since it's
just an echo-back-everything-you-say test backend (but it
does demonstrate that there are basic things you can't do
at all without some variation on this API).
What I would like to see in this patch is a comment giving
much clearer definition of the semantics of the guest_writable
call: for instance, is it always called when the guest is
writable, or is it only guaranteed to be called if the
QEMU backend has previously tried to do virtio_serial_write
and got back a return code indicating an incomplete write?
thanks
-- PMM