1. 23 Jun, 2014 1 commit
  2. 10 Jun, 2014 2 commits
  3. 02 Jun, 2014 2 commits
  4. 26 May, 2014 5 commits
    • Gerd Hoffmann's avatar
      console: add kbd_put_keysym_console · 3f9a6e85
      Gerd Hoffmann authored
      So you can send keysyms to a specific (text terminal) console.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    • Gerd Hoffmann's avatar
      console: rework text terminal cursor logic · aea7947c
      Gerd Hoffmann authored
      Have a global timer.  Update all visible terminal windows syncronously.
      Right now this can be the active_console only, but that will change
      soon.  The global timer will disable itself if not needed, so we only
      have to care start it if needed.  Which might be at console switch time
      or when a new displaychangelistener is registered.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    • Gerd Hoffmann's avatar
      console: update text terminal surface unconditionally · b35e3ba0
      Gerd Hoffmann authored
      These days each QemuConsole has its own private DisplaySurface,
      so we can simply render updates all the time.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    • Gerd Hoffmann's avatar
      console: nicer initial screen · 521a580d
      Gerd Hoffmann authored
      Now that we have a function to create a fancy DisplaySurface with a
      message for the user, to handle non-existing graphics hardware, we
      can make it more generic and use it for other things too.
      This patch adds a text line to the in initial DisplaySurface, notifying
      the user that the display isn't initialized yet by the guest.
      You can see this in action when starting qemu with '-S'.  Also when
      booting ovmf in qemu (which needs a few moments to initialize itself
      before it initializes the vga).
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    • Kirill Batuzov's avatar
      console: Abort on property access errors · afff2b15
      Kirill Batuzov authored
      All defined properties of QemuConsole are mandatory and no access to them
      should fail. Nevertheless not checking returned errors is bad because in case
      of unexpected failure it will hide the bug and cause a memory leak.
      Abort in case of unexpected property access errors. This change exposed a bug
      where an attempt was made to write to a read-only property "head".
      Set "head" property's value at creation time and do not attempt to change it
      later. This fixes the bug mentioned above.
      Signed-off-by: default avatarKirill Batuzov <batuzovk@ispras.ru>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
  5. 07 May, 2014 1 commit
  6. 19 Mar, 2014 2 commits
    • Stefan Hajnoczi's avatar
      qom: Add check() argument to object_property_add_link() · 39f72ef9
      Stefan Hajnoczi authored
      There are currently three types of object_property_add_link() callers:
      1. The link property may be set at any time.
      2. The link property of a DeviceState instance may only be set before
      3. The link property may never be set, it is read-only.
      Something similar can already be achieved with
      object_property_add_str()'s set() argument.  Follow its example and add
      a check() argument to object_property_add_link().
      Also provide default check() functions for case #1 and #2.  Case #3 is
      covered by passing a NULL function pointer.
      Cc: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Anthony Liguori <aliguori@amazon.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      [AF: Tweaked documentation comment]
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Stefan Hajnoczi's avatar
      qom: Make QOM link property unref optional · 9561fda8
      Stefan Hajnoczi authored
      Some object_property_add_link() callers expect property deletion to
      unref the link property object.  Other callers expect to manage the
      refcount themselves.  The former are currently broken and therefore leak
      the link property object.
      This patch adds a flags argument to object_property_add_link() so the
      caller can specify which refcount behavior they require.  The new
      OBJ_PROP_LINK_UNREF_ON_RELEASE flag causes the link pointer to be
      unreferenced when the property is deleted.
      This fixes refcount leaks in qdev.c, xilinx_axidma.c, xilinx_axienet.c,
      s390-virtio-bus.c, virtio-pci.c, virtio-rng.c, and ui/console.c.
      Rationale for refcount behavior:
       * hw/core/qdev.c
         - bus children are explicitly unreferenced, don't interfere
         - parent_bus is essentially a read-only property that doesn't hold a
           refcount, don't unref
         - hotplug_handler is leaked, do unref
       * hw/dma/xilinx_axidma.c
         - rx stream "dma" links are set using set_link, therefore they
           need unref
         - tx streams are set using set_link, therefore they need unref
       * hw/net/xilinx_axienet.c
         - same reasoning as hw/dma/xilinx_axidma.c
       * hw/pcmcia/pxa2xx.c
         - pxa2xx bypasses set_link and therefore does not use refcounts
       * hw/s390x/s390-virtio-bus.c
       * hw/virtio/virtio-pci.c
       * hw/virtio/virtio-rng.c
       * ui/console.c
         - set_link is used and there is no explicit unref, do unref
      Cc: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Anthony Liguori <aliguori@amazon.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
  7. 05 Mar, 2014 3 commits
  8. 02 Dec, 2013 3 commits
  9. 13 Nov, 2013 1 commit
  10. 22 Aug, 2013 1 commit
  11. 28 Jun, 2013 1 commit
  12. 10 Jun, 2013 1 commit
    • Michael Roth's avatar
      qemu-char: don't issue CHR_EVENT_OPEN in a BH · bd5c51ee
      Michael Roth authored
      When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET,
      and it was issued as a bottom-half:
      Which we basically used to print out a greeting/prompt for the
      AFAICT the only reason this was ever done in a BH was because in
      some cases we'd modify the chr_write handler for a new chardev
      backend *after* the site where we issued the reset (see:
      At some point this event was renamed to CHR_EVENT_OPENED, and we've
      maintained the use of this BH ever since.
      However, due to 9f939df9, we schedule
      the BH via g_idle_add(), which is causing events to sometimes be
      delivered after we've already begun processing data from backends,
      leading to:
       known bugs:
          session negotation resets with OPENED event, in some cases this
          is causing new sessions to get sporadically reset
       potential bugs:
          can_read handler checks for dev->parser != NULL, which may be
          true if CLOSED BH has not been executed yet. In the past, OPENED
          quiesced outstanding CLOSED events prior to us reading client
          data. If it's delayed, our check may allow reads to occur even
          though we haven't processed the OPENED event yet, and when we
          do finally get the OPENED event, our state may get reset.
          can begin session before OPENED event is processed, leading to
          a spurious reset of the system and irq_levels
          may start a gdb session prior to the machine being paused
      To fix these, let's just drop the BH.
      Since the initial reasoning for using it still applies to an extent,
      work around that by deferring the delivery of CHR_EVENT_OPENED until
      after the chardevs have been fully initialized, toward the end of
      qmp_chardev_add() (or some cases, qemu_chr_new_from_opts()). This
      defers delivery long enough that we can be assured a CharDriverState
      is fully initialized before CHR_EVENT_OPENED is sent.
      Also, rather than requiring each chardev to do an explicit open, do it
      automatically, and allow the small few who don't desire such behavior to
      suppress the OPENED-on-init behavior by setting a 'explicit_be_open'
      We additionally add missing OPENED events for stdio backends on w32,
      which were previously not being issued, causing us to not recieve the
      banner and initial prompts for qmp/hmp.
      Reported-by: default avatarStefan Priebe <s.priebe@profihost.ag>
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Message-id: 1370636393-21044-1-git-send-email-mdroth@linux.vnet.ibm.com
      Cc: qemu-stable@nongnu.org
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
  13. 25 Apr, 2013 6 commits
  14. 16 Apr, 2013 11 commits