qemu-e2k/include/chardev
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
..
char-fd.h char-fd: remove useless chr pointer 2017-08-01 17:27:33 +02:00
char-fe.h char.h: fix gtk-doc comment style 2018-10-03 14:45:05 +04:00
char-io.h chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
char-mux.h chardev: introduce chr_machine_done hook 2018-03-12 16:12:46 +01:00
char-parallel.h char: fix alias devices regression 2017-06-08 17:57:36 +04:00
char-serial.h char: fix alias devices regression 2017-06-08 17:57:36 +04:00
char-win-stdio.h chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
char-win.h chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
char.h chardev: mark the calls that allow an implicit mux monitor 2018-10-03 14:45:05 +04:00