Skip to content

char: Add support for nonblocking writes

Amit Shah qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v9 Latest5 patches 15 repliesIn review

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5char: Add a QemuChrHandlers struct to initialise chardev handlersgdbstub.c hw/debugcon.c hw/escc.c +16 more+174 -617 replies
2/5char: Introduce char_set/remove_fd_handlers()qemu-char.c+42 -225 replies
3/5char: Add framework for a 'write unblocked' callbackqemu-char.c qemu-char.h+8 -01 reply
4/5char: Update send_all() to handle nonblocking chardev write requestsnet/socket.c qemu-char.c qemu_socket.h+70 -90 replies
5/5char: Equip the unix/tcp backend to handle nonblocking writesqemu-char.c+27 -02 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchGerd Hoffmann
1/5A-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [Qemu-devel] [PATCH v9 0/5] char: Add support for nonblocking writes

Hello,

This version of the series adds proper handling of nonblocking when the backend managed to flush out some data but not all (ret > 0 && ret < len).

Just the unix/tcp backends have been updated to be nonblocking, but it's easy to add support to the other backends, as the last patch in the series shows.

I'll work on that once this is applied.

The virtio-console code will be the first user of this work, that series will be sent shortly.

This series depends on the virtio-serial fixes and enhancements series that I sent out a short while back.

Please review and apply,

Amit Shah (5):
char: Add a QemuChrHandlers struct to initialise chardev handlers
char: Introduce char_set/remove_fd_handlers()
char: Add framework for a 'write unblocked' callback
char: Update send_all() to handle nonblocking chardev write requests
char: Equip the unix/tcp backend to handle nonblocking writes

 gdbstub.c            |    9 ++-
 hw/debugcon.c        |    2 +-
 hw/escc.c            |    9 ++-
 hw/etraxfs_ser.c     |   13 +++-
 hw/ivshmem.c         |   28 ++++++--
 hw/mcf_uart.c        |    9 ++-
 hw/pl011.c           |    9 ++-
 hw/pxa2xx.c          |   13 +++-
 hw/serial.c          |    9 ++-
 hw/sh_serial.c       |   12 +++-
 hw/syborg_serial.c   |    9 ++-
 hw/usb-serial.c      |    9 ++-
 hw/virtio-console.c  |    9 ++-
 hw/xen_console.c     |   16 +++--
 hw/xilinx_uartlite.c |   11 +++-
 monitor.c            |   19 ++++-
 net/slirp.c          |    8 ++-
 net/socket.c         |    4 +-
 qemu-char.c          |  196 ++++++++++++++++++++++++++++++++++++++++----------
 qemu-char.h          |   17 ++++-
 qemu_socket.h        |    2 +-
 21 files changed, 321 insertions(+), 92 deletions(-)
Signature · 1 line
1.7.3.4