diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-11-03 16:28:23 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-12-21 09:30:32 +0100 |
commit | d09c4a47874f30820b08c39ad39bcca9b8cde084 (patch) | |
tree | 63451b0f382ccf605a509f3873ec44bbe10008b2 /include/chardev | |
parent | 5a22ab71623c0fb709d49df353bdf2ec7c445c4c (diff) | |
download | qemu-d09c4a47874f30820b08c39ad39bcca9b8cde084.zip qemu-d09c4a47874f30820b08c39ad39bcca9b8cde084.tar.gz qemu-d09c4a47874f30820b08c39ad39bcca9b8cde084.tar.bz2 |
chardev: fix backend events regression with mux chardev
Kirill noticied that on recent versions on QEMU he was not able to
trigger SysRq to invoke debug capabilites of Linux Kernel. He tracked
it down to qemu_chr_be_event() ignoring CHR_EVENT_BREAK due s->be
being NULL. The bug was introduced in 2.8, commit a4afa548fc6d ("char:
move front end handlers in CharBackend"). Since the commit, the
qemu_chr_be_event() failed to deliver CHR_EVENT_BREAK due to
qemu_chr_fe_init() does not set s->be in case of mux.
Let's fix this by teaching mux to send an event to the frontend with
the focus.
Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Fixes: a4afa548fc6d ("char: move front end handlers in CharBackend")
Message-Id: <20171103152824.21948-2-marcandre.lureau@redhat.com>
Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/chardev')
-rw-r--r-- | include/chardev/char.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/chardev/char.h b/include/chardev/char.h index 43aabcc..778d610 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -248,6 +248,7 @@ typedef struct ChardevClass { void (*chr_accept_input)(Chardev *chr); void (*chr_set_echo)(Chardev *chr, bool echo); void (*chr_set_fe_open)(Chardev *chr, int fe_open); + void (*chr_be_event)(Chardev *s, int event); } ChardevClass; Chardev *qemu_chardev_new(const char *id, const char *typename, |