qemu-e2k/hw
Leonardo Bras b88651cb4d QIOChannel: Add flags on io_writev and introduce io_flush callback
Add flags to io_writev and introduce io_flush as optional callback to
QIOChannelClass, allowing the implementation of zero copy writes by
subclasses.

How to use them:
- Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY),
- Wait write completion with qio_channel_flush().

Notes:
As some zero copy write implementations work asynchronously, it's
recommended to keep the write buffer untouched until the return of
qio_channel_flush(), to avoid the risk of sending an updated buffer
instead of the buffer state during write.

As io_flush callback is optional, if a subclass does not implement it, then:
- io_flush will return 0 without changing anything.

Also, some functions like qio_channel_writev_full_all() were adapted to
receive a flag parameter. That allows shared code between zero copy and
non-zero copy writev, and also an easier implementation on new flags.

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220513062836.965425-3-leobras@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2022-05-16 13:56:24 +01:00
..
9pfs 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host 2022-05-01 14:07:03 +02:00
acpi hw/acpi/aml-build: Use existing CPU topology to build PPTT table 2022-05-09 11:47:55 +01:00
adc aspeed/adc: Add AST1030 support 2022-05-02 17:03:02 +02:00
alpha
arm machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
audio pc: remove -soundhw pcspk 2022-05-07 07:46:59 +02:00
avr
block hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507) 2022-05-12 12:31:08 +02:00
char
core machine: move more memory validation to Machine object 2022-05-12 12:29:44 +02:00
cpu
cris
display artist: only render dirty scanlines on the display surface 2022-05-08 18:52:37 +01:00
dma
gpio hw/gpio/aspeed_gpio: Fix QOM pin property 2022-05-02 17:03:04 +02:00
hppa machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
hyperv util: rename qemu_*block() socket functions 2022-05-03 15:53:20 +04:00
i2c
i386 machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
ide
input hw: replace qemu_set_nonblock() 2022-05-03 15:52:33 +04:00
intc ppc/xive: Update the state of the External interrupt signal 2022-05-05 15:36:17 -03:00
ipack
ipmi
isa Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
m68k
mem
microblaze
mips Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
misc lasi: move from hw/hppa to hw/misc 2022-05-08 18:52:37 +01:00
net Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
nios2
nubus
nvme Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
nvram machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
openrisc hw/openrisc: use right OMPIC size variable 2022-05-15 10:33:01 +09:00
pci Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
pci-bridge
pci-host dino: move from hw/hppa to hw/pci-host 2022-05-08 18:52:36 +01:00
pcmcia
ppc machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
rdma
remote QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
riscv hw/riscv: Enable TPM backends 2022-04-29 10:48:48 +10:00
rtc
rx
s390x machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
scsi virtio-scsi: move request-related items from .h to .c 2022-05-09 10:45:04 +01:00
sd
sensor
sh4
smbios
sparc machine: make memory-backend a link property 2022-05-12 12:29:44 +02:00
sparc64 machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
ssi aspeed/smc: Add AST1030 support 2022-05-02 17:03:03 +02:00
timer aspeed/timer: Add AST1030 support 2022-05-02 17:03:03 +02:00
tpm
tricore
usb Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
vfio linux-headers: Update to v5.18-rc6 2022-05-13 08:20:11 -06:00
virtio vhost-backend: do not depend on CONFIG_VHOST_VSOCK 2022-05-12 12:29:44 +02:00
watchdog aspeed/wdt: Add AST1030 support 2022-05-02 17:03:03 +02:00
xen hw/xen/xen_pt: Resolve igd_passthrough_isa_bridge_create() indirection 2022-05-12 12:07:06 +02:00
xenpv Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
xtensa hw/xtensa: fix reset value of MIROUT register of MX PIC 2022-05-06 15:27:40 -07:00
Kconfig
meson.build