Skip to content
Snippets Groups Projects
  1. Nov 04, 2021
  2. Sep 14, 2021
  3. May 02, 2021
  4. Dec 15, 2020
    • Paolo Bonzini's avatar
      chardev: do not use machine_init_done · 5a1ee607
      Paolo Bonzini authored
      
      machine_init_done is not the right flag to check when preconfig
      is taken into account; for example "./qemu-system-x86_64 -serial
      mon:stdio -preconfig" does not print the QEMU monitor header until after
      exit_preconfig.  Add back a custom bool for mux character devices.  This
      partially undoes commit c7278b43 ("chardev: introduce chr_machine_done
      hook", 2018-03-12), but it keeps the cleaner logic using a function
      pointer in ChardevClass.
      
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      5a1ee607
  5. Jul 13, 2020
  6. Jan 08, 2020
  7. Jun 12, 2019
  8. Feb 13, 2019
  9. Feb 12, 2019
    • Artem Pisarenko's avatar
      chardev: fix mess in OPENED/CLOSED events when muxed · 7a9657ef
      Artem Pisarenko authored
      
      When chardev is multiplexed (mux=on) there are a lot of cases where
      CHR_EVENT_OPENED/CHR_EVENT_CLOSED events pairing (expected from
      frontend side) is broken. There are either generation of multiple
      repeated or extra CHR_EVENT_OPENED events, or CHR_EVENT_CLOSED just
      isn't generated at all.
      This is mostly because 'qemu_chr_fe_set_handlers()' function makes its
      own (and often wrong) implicit decision on updated frontend state and
      invokes 'fd_event' callback with 'CHR_EVENT_OPENED'. And even worse,
      it doesn't do symmetric action in opposite direction, as someone may
      expect (i.e. it doesn't invoke previously set 'fd_event' with
      'CHR_EVENT_CLOSED'). Muxed chardev uses trick by calling this function
      again to replace callback handlers with its own ones, but it doesn't
      account for such side effect.
      Fix that using extended version of this function with added argument
      for disabling side effect and keep original function for compatibility
      with lots of frontends already using this interface and being
      "tolerant" to its side effects.
      One more source of event duplication is just line of code in
      char-mux.c, which does far more than comment above says (obvious fix).
      
      Signed-off-by: default avatarArtem Pisarenko <artem.k.pisarenko@gmail.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <7dde6abbd21682857f8294644013173c0b9949b3.1541507990.git.artem.k.pisarenko@gmail.com>
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      7a9657ef
  10. Jun 01, 2018
  11. Apr 17, 2018
  12. Mar 12, 2018
    • Peter Xu's avatar
      chardev: introduce chr_machine_done hook · c7278b43
      Peter Xu authored
      
      Introduce ChardevClass.chr_machine_done() hook so that chardevs can run
      customized procedures after machine init.
      
      There was an existing mux user already that did similar thing but used a
      raw machine done notifier.  Generalize it into a framework, and let the
      mux chardevs provide such a class-specific hook to achieve the same
      thing.  Then we can move the mux related code to the char-mux.c file.
      
      Since at it, replace the mux_realized variable with the global
      machine_init_done varible.
      
      This notifier framework will be further leverged by other type of
      chardevs soon.
      
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <20180306053320.15401-6-peterx@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c7278b43
  13. Feb 09, 2018
  14. Dec 21, 2017
  15. Jul 14, 2017
  16. Jun 02, 2017
  17. May 04, 2017
  18. Jan 31, 2017
Loading