qemu-e2k/hw/char
Marc-André Lureau 95e30b2a13 chardev: mark the calls that allow an implicit mux monitor
This is mostly for readability of the code. Let's make it clear which
callers can create an implicit monitor when the chardev is muxed.

This will also enforce a safer behaviour, as we don't really support
creating monitor anywhere/anytime at the moment. Add an assert() to
make sure the programmer explicitely wanted that behaviour.

There are documented cases, such as: -serial/-parallel/-virtioconsole
and to less extent -debugcon.

Less obvious and questionable ones are -gdb, SLIRP -guestfwd and Xen
console. Add a FIXME note for those, but keep the support for now.

Other qemu_chr_new() callers either have a fixed parameter/filename
string or do not need it, such as -qtest:

* qtest.c: qtest_init()
  Afaik, only used by tests/libqtest.c, without mux. I don't think we
  support it outside of qemu testing: drop support for implicit mux
  monitor (qemu_chr_new() call: no implicit mux now).

* hw/
  All with literal @filename argument that doesn't enable mux monitor.

* tests/
  All with @filename argument that doesn't enable mux monitor.

On a related note, the list of monitor creation places:

- the chardev creators listed above: all from command line (except
  perhaps Xen console?)

- -gdb & hmp gdbserver will create a "GDB monitor command" chardev
  that is wired to an HMP monitor.

- -mon command line option

From this short study, I would like to think that a monitor may only
be created in the main thread today, though I remain skeptical :)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2018-10-03 14:45:05 +04:00
..
bcm2835_aux.c bcm2835_aux: Swap RX and TX interrupt assignments 2018-07-16 17:18:42 +01:00
cadence_uart.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
cmsdk-apb-uart.c hw/char/cmsdk-apb-uart.c: Accept more input after character read 2018-05-04 18:05:50 +01:00
debugcon.c misc: drop old i386 dependency 2017-12-18 17:07:03 +03:00
digic-uart.c hw/digic: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
escc.c hw/char: remove legacy interface escc_init() 2018-02-16 12:14:26 +11:00
etraxfs_ser.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
exynos4210_uart.c hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev 2018-04-26 13:57:00 +01:00
grlib_apbuart.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
imx_serial.c imx_serial: Generate interrupt on receive data ready if enabled 2018-08-20 11:24:31 +01:00
ipoctal232.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
lm32_juart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
lm32_uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
Makefile.objs hw: make virtio devices configurable via default-configs/ 2018-06-01 15:14:31 +02:00
mcf_uart.c hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
milkymist-uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
omap_uart.c chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
parallel-isa.c hw/isa: Move parallel_hds_isa_init() to hw/char/parallel-isa.c 2018-03-12 16:12:47 +01:00
parallel.c hw/char/parallel: Convert from pdebug() macro to trace events 2018-06-29 15:04:18 +01:00
pl011.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
sclpconsole-lm.c s390x/sclp: clean up sclp masks 2018-03-08 15:49:23 +01:00
sclpconsole.c s390x/sclp: clean up sclp masks 2018-03-08 15:49:23 +01:00
serial-isa.c serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS 2018-04-26 13:57:00 +01:00
serial-pci.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
serial.c serial: fix DLL writes 2018-10-02 18:47:55 +02:00
sh_serial.c hw/char/sh_serial: Add timeout handling to unbreak serial input 2018-10-02 18:47:55 +02:00
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 hw/char/stm32f2xx_usart: fix TXE/TC bit handling 2018-02-22 15:12:51 +00:00
terminal3270.c chardev: introduce qemu_chr_timeout_add_ms() 2018-01-12 13:22:02 +01:00
trace-events hw/char/parallel: Convert from pdebug() macro to trace events 2018-06-29 15:04:18 +01:00
virtio-console.c qapi: Drop qapi_event_send_FOO()'s Error ** argument 2018-08-28 18:21:38 +02:00
virtio-serial-bus.c virtio: do not take address of packed members 2018-10-02 19:09:13 +02:00
xen_console.c chardev: mark the calls that allow an implicit mux monitor 2018-10-03 14:45:05 +04:00
xilinx_uartlite.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00