diff options
| author | Peter Maydell | 2015-03-19 17:46:32 +0100 |
|---|---|---|
| committer | Peter Maydell | 2015-03-19 17:46:32 +0100 |
| commit | 33a8d5b72d63fe44f08614408284fa934dee1edd (patch) | |
| tree | 54c471427858e1d1aa72ca188dffeeaca950bcf6 /include | |
| parent | Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-03-1... (diff) | |
| parent | virtio: serial: expose a 'guest_writable' callback for users (diff) | |
| download | qemu-33a8d5b72d63fe44f08614408284fa934dee1edd.tar.gz qemu-33a8d5b72d63fe44f08614408284fa934dee1edd.tar.xz qemu-33a8d5b72d63fe44f08614408284fa934dee1edd.zip | |
Merge remote-tracking branch 'remotes/amit/tags/vser-for-2.3-3' into staging
virtio-serial api: guest_writable callback for users
# gpg: Signature made Thu Mar 19 12:06:55 2015 GMT using RSA key ID 854083B6
# gpg: Good signature from "Amit Shah <amit@amitshah.net>"
# gpg: aka "Amit Shah <amit@kernel.org>"
# gpg: aka "Amit Shah <amitshah@gmx.net>"
* remotes/amit/tags/vser-for-2.3-3:
virtio: serial: expose a 'guest_writable' callback for users
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/virtio/virtio-serial.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h index ccf8459829..18d1bccd0b 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -60,6 +60,17 @@ typedef struct VirtIOSerialPortClass { /* Guest is now ready to accept data (virtqueues set up). */ void (*guest_ready)(VirtIOSerialPort *port); + /* + * Guest has enqueued a buffer for the host to write into. + * Called each time a buffer is enqueued by the guest; + * irrespective of whether there already were free buffers the + * host could have consumed. + * + * This is dependent on both the guest and host end being + * connected. + */ + void (*guest_writable)(VirtIOSerialPort *port); + /* * Guest wrote some data to the port. This data is handed over to * the app via this callback. The app can return a size less than |
