summaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2013-07-30 13:04:22 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-30 18:48:21 -0500
commit7b7ab18d0b9769b5f39e663fa55caed461b1202e (patch)
tree74ae15cdfacae193d2006a580d4f67dccb4666d7 /include/sysemu
parent5fe0d351b3a7caf77f899db804d09e4553329c84 (diff)
downloadqemu-7b7ab18d0b9769b5f39e663fa55caed461b1202e.tar.gz
chardev: fix CHR_EVENT_OPENED events for mux chardevs
As of bd5c51ee6c4f1c79cae5ad2516d711a27b4ea8ec, chardevs no longer use bottom-halves to issue CHR_EVENT_OPENED events. To maintain past semantics, we instead defer the CHR_EVENT_OPENED events toward the end of chardev initialization. For muxes, this isn't good enough, since a range of FEs must be able to attach to the mux prior to any CHR_EVENT_OPENED being issued, else each FE will immediately print it's initial output (prompts, banners, etc.) just prior to us switching to the next FE as part of initialization. The is new and confusing behavior for users, as they'll see output for things like the HMP monitor, even though their the current mux focus may be a guest serial port with potentially no output. We fix this by further deferring CHR_EVENT_OPENED events for FEs associated with muxes until after machine init by flagging mux chardevs with 'explicit_be_open', which suppresses emission of CHR_EVENT_OPENED events until we explicitly set the mux as opened later. Currently, we must defer till after machine init since we potentially associate FEs with muxes as part of realize (for instance, serial_isa_realizefn). Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Message-id: 1375207462-8141-1-git-send-email-mdroth@linux.vnet.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/char.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index e65e4a4844..8053130a97 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -77,6 +77,7 @@ struct CharDriverState {
int explicit_fe_open;
int explicit_be_open;
int avail_connections;
+ int is_mux;
QemuOpts *opts;
QTAILQ_ENTRY(CharDriverState) next;
};