1. 23 6月, 2014 7 次提交
  2. 19 6月, 2014 4 次提交
  3. 13 6月, 2014 1 次提交
    • D
      char: fix avail_connections init in qemu_chr_open_eventfd() · e9d21c43
      David Marchand 提交于
      When trying to use a ivshmem server with qemu, ivshmem init code tries to
      create a CharDriverState object for each eventfd retrieved from the server.
      To create this object, a call to qemu_chr_open_eventfd() is done.
      Right after this, before adding a frontend, qemu_chr_fe_claim_no_fail() is
      called.
      qemu_chr_open_eventfd() does not set avail_connections to 1, so no frontend can
      be associated because qemu_chr_fe_claim_no_fail() makes qemu stop right away.
      
      This problem comes from 456d6069
      "qemu-char: Call fe_claim / fe_release when not using qdev chr properties".
      
      Fix this, by setting avail_connections to 1 in qemu_chr_open_eventfd().
      Signed-off-by: NDavid Marchand <david.marchand@6wind.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e9d21c43
  4. 11 6月, 2014 1 次提交
  5. 21 5月, 2014 3 次提交
  6. 13 3月, 2014 1 次提交
  7. 18 2月, 2014 2 次提交
  8. 23 12月, 2013 1 次提交
  9. 16 12月, 2013 1 次提交
  10. 05 10月, 2013 1 次提交
  11. 01 10月, 2013 1 次提交
  12. 12 9月, 2013 1 次提交
    • G
      chardev: fix pty_chr_timer · b0d768c3
      Gerd Hoffmann 提交于
      pty_chr_timer first calls pty_chr_update_read_handler(), then clears
      timer_tag (because it is a one-shot timer).   This is the wrong order
      though.  pty_chr_update_read_handler might re-arm time timer, and the
      new timer_tag gets overwitten in that case.
      
      This leads to crashes when unplugging a pty chardev:  pty_chr_close
      thinks no timer is running -> timer isn't canceled -> pty_chr_timer gets
      called with stale CharDevState -> BOOM.
      
      This patch fixes the ordering.
      Kill the pointless goto while being at it.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=994414
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      b0d768c3
  13. 05 9月, 2013 3 次提交
  14. 23 8月, 2013 1 次提交
  15. 20 8月, 2013 1 次提交
  16. 14 8月, 2013 1 次提交
    • J
      qemu-char: fix infinite recursion connecting to monitor pty · 3a3567d3
      James Hogan 提交于
      Since commit bd5c51ee (qemu-char: don't issue CHR_EVENT_OPEN in a BH), an
      infinite recursion occurs when putting the monitor on a pty (-monitor
      pty) and connecting a terminal to the slave port.
      
      This is because of the qemu_chr_be_event(s, CHR_EVENT_OPENED) added to
      qemu_chr_be_generic_open(). This event is captured by monitor_event()
      which prints a welcome message to the character device. The flush of
      that welcome message retriggers another open event in pty_chr_state()
      because it checks s->connected, but only sets it to 1 after calling
      qemu_chr_be_generic_open().
      
      I've fixed this by setting s->connected = 1 before the call to
      qemu_chr_be_generic_open() instead of after, so that the recursive
      pty_chr_state() doesn't call it again.
      
      An example snippet of repeating backtrace:
       ...
       #107486 0x007aec58 in monitor_flush (mon=0xf418b0) at qemu/monitor.c:288
       #107487 0x007aee7c in monitor_puts (mon=0xf418b0, str=0x1176d07 "") at qemu/monitor.c:322
       #107488 0x007aef20 in monitor_vprintf (mon=0xf418b0, fmt=0x8d4820 "QEMU %s monitor - type 'help' for more information\n",
           ap=0x7f432be0) at qemu/monitor.c:339
       #107489 0x007aefac in monitor_printf (mon=0xf418b0, fmt=0x8d4820 "QEMU %s monitor - type 'help' for more information\n")
           at qemu/monitor.c:347
       #107490 0x007ba4bc in monitor_event (opaque=0xf418b0, event=2) at qemu/monitor.c:4699
       #107491 0x00684c28 in qemu_chr_be_event (s=0xf37788, event=2) at qemu/qemu-char.c:108
       #107492 0x00684c70 in qemu_chr_be_generic_open (s=0xf37788) at qemu/qemu-char.c:113
       #107493 0x006880a4 in pty_chr_state (chr=0xf37788, connected=1) at qemu/qemu-char.c:1145
       #107494 0x00687fa4 in pty_chr_update_read_handler (chr=0xf37788) at qemu/qemu-char.c:1121
       #107495 0x00687c9c in pty_chr_write (chr=0xf37788, buf=0x70b3c008 <Address 0x70b3c008 out of bounds>, len=538720)
           at qemu/qemu-char.c:1063
       #107496 0x00684cc4 in qemu_chr_fe_write (s=0xf37788, buf=0x70b3c008 <Address 0x70b3c008 out of bounds>, len=538720)
           at qemu/qemu-char.c:118
       ...
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Tested-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Message-id: 1375960178-10882-1-git-send-email-james.hogan@imgtec.com
      Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3a3567d3
  17. 31 7月, 2013 1 次提交
    • M
      chardev: fix CHR_EVENT_OPENED events for mux chardevs · 7b7ab18d
      Michael Roth 提交于
      As of bd5c51ee, 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: NMichael 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: NAnthony Liguori <aliguori@us.ibm.com>
      7b7ab18d
  18. 29 7月, 2013 3 次提交
    • M
      qapi: Rename ChardevBackend member "memory" to "ringbuf" · 3a1da42e
      Markus Armbruster 提交于
      Commit 1da48c65 called the new member "memory" after commit 3949e594
      standardized "ringbuf".  Rename for consistency.
      
      However, member name "memory" is visible in QMP since 1.5.  It's
      undocumented just like the driver name.  Keep it working anyway.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1374849874-25531-4-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3a1da42e
    • M
      qemu-char: Register ring buffer driver with correct name "ringbuf" · c11ed966
      Markus Armbruster 提交于
      The driver is new in 1.4, with the documented name "ringbuf".
      However, it's actual name is the completely undocumented "memory".
      Screwed up in commit 3949e594.  Fix code to match documentation.
      
      Keep the undocumented name working as an alias for compatibility.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1374849874-25531-3-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c11ed966
    • M
      Revert "chardev: Make the name of memory device consistent" · 4f57378f
      Markus Armbruster 提交于
      This reverts commit 6a85e60c.
      
      Commit 51767e7c "qemu-char: Add new char backend CirMemCharDriver"
      introduced a memory ring buffer character device driver named
      "memory".  Commit 3949e594 "qemu-char: Saner naming of memchar stuff &
      doc fixes" changed the driver name to "ringbuf", along with a whole
      bunch of other names, with the following rationale:
      
          Naming is a mess.  The code calls the device driver
          CirMemCharDriver, the public API calls it "memory", "memchardev",
          or "memchar", and the special commands are named like
          "memchar-FOO".  "memory" is a particularly unfortunate choice,
          because there's another character device driver called
          MemoryDriver.  Moreover, the device's distinctive property is that
          it's a ring buffer, not that's in memory.
      
      This is what we released in 1.4.0.
      
      Unfortunately, the rename missed a critical instance of "memory": the
      actual driver name.  Thus, the new device could be used only by an
      entirely undocumented name.  The documented name did not work.
      Bummer.
      
      Commit 6a85e60c fixes this by changing the documentation to match the
      code.  It also changes some, but not all related occurences of
      "ringbuf" to "memory".  Left alone are identifiers in C code, HMP and
      QMP commands.  The latter are external interface, so they can't be
      changed.
      
      The result is an inconsistent mess.  Moreover, "memory" is a rotten
      name.  The device's distinctive property is that it's a ring buffer,
      not that's in memory.  User's don't care whether it's in RAM, flash,
      or carved into chocolate tablets by Oompa Loompas.
      
      Revert the commit.  Next commit will fix just the bug.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1374849874-25531-2-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      4f57378f
  19. 19 7月, 2013 1 次提交
  20. 11 7月, 2013 1 次提交
  21. 10 7月, 2013 1 次提交
  22. 29 6月, 2013 3 次提交