qemu/hw/char
David Gibson 6c3bc244d3 spapr: Implement bug in spapr-vty device to be compatible with PowerVM
The spapr-vty device implements the PAPR defined virtual console,
which is also implemented by IBM's proprietary PowerVM hypervisor.

PowerVM's implementation has a bug where it inserts an extra \0 after
every \r going to the guest.  Because of that Linux's guest side
driver has a workaround which strips \0 characters that appear
immediately after a \r.

That means that when running under qemu, sending a binary stream from
host to guest via spapr-vty which happens to include a \r\0 sequence
will get corrupted by that workaround.

To deal with that, this patch duplicates PowerVM's bug, inserting an
extra \0 after each \r.  Ugly, but the best option available.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
2017-11-22 15:28:37 +11:00
..
bcm2835_aux.c
cadence_uart.c
cmsdk-apb-uart.c
debugcon.c
digic-uart.c
escc.c
etraxfs_ser.c
exynos4210_uart.c
grlib_apbuart.c
imx_serial.c
ipoctal232.c
lm32_juart.c
lm32_uart.c
Makefile.objs
mcf_uart.c
milkymist-uart.c
omap_uart.c
parallel.c
pl011.c
sclpconsole-lm.c
sclpconsole.c
serial-isa.c
serial-pci.c
serial.c
sh_serial.c
spapr_vty.c spapr: Implement bug in spapr-vty device to be compatible with PowerVM 2017-11-22 15:28:37 +11:00
stm32f2xx_usart.c
terminal3270.c
trace-events
virtio-console.c
virtio-serial-bus.c
xen_console.c
xilinx_uartlite.c