1. 24 Feb, 2012 4 commits
    • Gerd Hoffmann's avatar
      optimize screendump for the common non-switch case · 45efb161
      Gerd Hoffmann authored
      switch console only if needed, also pass down whenever the console was
      switched or not because a displaysurface redraw is only needed in case
      the console was switched.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    • Gerd Hoffmann's avatar
      Remove screendump dummy functions. · 16735102
      Gerd Hoffmann authored
      The code in console.c verifies whenever a screen_dump function
      pointer is present before calling it, so there is no need to supply an
      dummy function.  Remove them.  Also report an error to notify the user
      that he didn't got a screenshot.
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    • Markus Armbruster's avatar
      console: Eliminate text_consoles[] · 8811e1e1
      Markus Armbruster authored
      Simply use consoles[] instead.
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    • Markus Armbruster's avatar
      Revert "qemu-char: Print strerror message on failure" and deps · 1f51470d
      Markus Armbruster authored
      The commit's purpose is laudable:
          The only way for chardev drivers to communicate an error was to
          return a NULL pointer, which resulted in an error message that
          said _that_ something went wrong, but not _why_.
      It attempts to achieve it by changing the interface to return 0/-errno
      and update qemu_chr_open_opts() to use strerror() to display a more
      helpful error message.  Unfortunately, it has serious flaws:
      1. Backends "socket" and "udp" return bogus error codes, because
      qemu_chr_open_socket() and qemu_chr_open_udp() assume that
      unix_listen_opts(), unix_connect_opts(), inet_listen_opts(),
      inet_connect_opts() and inet_dgram_opts() fail with errno set
      appropriately.  That assumption is wrong, and the commit turns
      unspecific error messages into misleading error messages.  For
          $ qemu-system-x86_64 -nodefaults -vnc :0 -chardev socket,id=bar,host=xxx
          inet_connect: host and/or port not specified
          chardev: opening backend "socket" failed: No such file or directory
      ENOENT is what happens to be in my errno when the backend returns
      -errno.  Let's put ERANGE there just for giggles:
          $ qemu-system-x86_64 -nodefaults -vnc :0 -chardev socket,id=bar,host=xxx -drive if=none,iops=99999999999999999999
          inet_connect: host and/or port not specified
          chardev: opening backend "socket" failed: Numerical result out of range
      Worse: when errno happens to be zero, return -errno erroneously
      signals success, and qemu_chr_new_from_opts() dies dereferencing
      uninitialized chr.  I observe this with "-serial unix:".
      2. All qemu_chr_open_opts() knows about the error is an errno error
      code.  That's simply not enough for a decent message.  For instance,
      when inet_dgram() can't resolve the parameter host, which errno code
      should it use?  What if it can't resolve parameter localaddr?
      Clue: many backends already report errors in their open methods.
      Let's revert the flawed commit along with its dependencies, and fix up
      the silent error paths instead.
      This reverts commit 6e1db57b.
      This reverts commit aad04cd0.
      The parts of commit db418a0a "Add stdio char device on windows" that
      depend on the reverted change fixed up.
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
  2. 02 Jan, 2012 1 commit
    • Alexander Graf's avatar
      console: Fix segfault on screendump without VGA adapter · 33bcd98c
      Alexander Graf authored
      When trying to create a screen dump without having any VGA adapter
      inside the guest, QEMU segfaults.
      This is because it's trying to switch back to the "previous" screen
      it was on before dumping the VGA screen. Unfortunately, in my case
      there simply is no previous screen so it accesses a NULL pointer.
      Fix it by checking if previous_active_console is actually available.
      This is 1.0 material.
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
  3. 06 Dec, 2011 3 commits
  4. 07 Nov, 2011 1 commit
  5. 05 Oct, 2011 1 commit
  6. 16 Sep, 2011 1 commit
  7. 09 Sep, 2011 1 commit
  8. 22 Aug, 2011 3 commits
  9. 20 Aug, 2011 1 commit
  10. 23 Jul, 2011 1 commit
  11. 24 Jun, 2011 1 commit
  12. 03 Jun, 2011 1 commit
  13. 22 Mar, 2011 1 commit
  14. 21 Mar, 2011 1 commit
    • Paolo Bonzini's avatar
      change all rt_clock references to use millisecond resolution accessors · 7bd427d8
      Paolo Bonzini authored
      This was done with:
          sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
              $(git grep -l 'get_clock\>.*rt_clock' )
          sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \
              $(git grep -l 'new_timer\>.*rt_clock' )
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
  15. 01 Feb, 2011 3 commits
  16. 03 Oct, 2010 1 commit
  17. 01 Jun, 2010 2 commits
  18. 25 Apr, 2010 1 commit
  19. 19 Feb, 2010 1 commit
  20. 12 Dec, 2009 2 commits
  21. 17 Nov, 2009 1 commit
  22. 01 Oct, 2009 2 commits
  23. 11 Sep, 2009 1 commit
  24. 27 Jul, 2009 1 commit
  25. 16 Mar, 2009 1 commit
  26. 13 Mar, 2009 1 commit
    • aliguori's avatar
      DisplayAllocator interface (Stefano Stabellini) · 7b5d76da
      aliguori authored
      Hi all,
      this patch adds a DisplayAllocator interface that allows display
      frontends (sdl in particular) to provide a preallocated display buffer
      for the graphical backend to use.
      Whenever a graphical backend cannot use
      qemu_create_displaysurface_from because its own internal pixel format
      cannot be exported directly (text mode or graphical mode with color
      depth 8 or 24), it creates another display buffer in memory using
      qemu_create_displaysurface and does the conversion.
      This new buffer needs to be blitted into the sdl surface buffer every time
      we need to update portions of the screen.
      We can avoid this using the DisplayAllocator interace: sdl provides its
      own implementation of qemu_create_displaysurface, giving back the sdl
      surface buffer directly (as we used to do before the DisplayState
      Since the buffer returned by sdl could be in bgr format we need to put
      back in the handlers of that case.
      This approach is good if the two following conditions are true:
      1) the sdl surface is a software surface that resides in main memory;
      2) the host display color depth is either 16 or 32 bpp.
      If first condition is false we can have bad performances using sdl
      and vnc together.
      If the second condition is false performances are certainly not going to
      improve but they shouldn't get worse either.
      The first condition is always true, at least on linux/X11 systems; but I
      believe is true also on other platforms.
      The second condition is true in the vast majority of the cases.
      This patch should also have the good side effect of solving the sdl
      2D slowness malc was reporting on MacOS, because SDL_BlitSurface is not
      going to be called anymore when the guest is in text mode or 24bpp.
      However the root problem is still present so I suspect we may
      still see some slowness on MacOS when the guest is in 32 or 16 bpp.
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6839 c046a42c-6fe2-441c-8c8c-71466251a162
  27. 07 Mar, 2009 1 commit
  28. 05 Feb, 2009 1 commit