1. 20 3月, 2010 1 次提交
    • A
      Rewrite mouse handlers to use QTAILQ and to have an activation function · 6fef28ee
      Anthony Liguori 提交于
      And convert usb-hid to use it (to avoid regression with bisection)
      
      Right now, when we do info mice and we've added a usb tablet, we don't see it
      until the guest starts using the tablet.  We implement this behavior in order
      to provide a means to delay registration of a mouse handler since we treat
      the last registered handler as the current handler.
      
      This is a usability problem though as we would like to give the user feedback
      that they've either 1) not added an absolute device 2) there is an absolute
      device but the guest isn't using it 3) we have an absolute device and it's
      active.
      
      By using QTAILQ and having an explicit activation function that moves the
      handler to the front of the queue, we can implement the same semantics as
      before with respect to automatically switching to usb tablet while providing
      the user with a whole lot more information.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6fef28ee
  2. 09 3月, 2010 1 次提交
  3. 20 2月, 2010 1 次提交
  4. 12 12月, 2009 2 次提交
  5. 02 10月, 2009 2 次提交
  6. 11 9月, 2009 1 次提交
  7. 04 9月, 2009 1 次提交
  8. 29 6月, 2009 1 次提交
  9. 21 5月, 2009 1 次提交
    • A
      Eliminate --disable-gfx-check and make VNC default when SDL not available · f92f8afe
      Anthony Liguori 提交于
       --disable-gfx-check predates VNC server support.  It made sense back then
      because the only thing you could do without SDL was use -nographic mode or
      similar tricks.  Since this is a very advanced mode of operation, gfx-check
      provided a good safety net for casual users.
      
      A casual user is very likely to use VNC to interact with a guest.  In fact, it's
      often frustrating to install QEMU on a server and have to specify
      disable-gfx-check when you only want to use VNC.
      
      This patch eliminates disable-gfx-check and makes SDL behave like every other
      optional dependency.  If SDL is not available, instead of failing ungracefully
      if no special options are specified, we default to -vnc localhost:0,to=99.
      When we do default to VNC, we also print a message to tell the user that we've
      done this include which port we're currently listening on.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      f92f8afe
  10. 10 5月, 2009 1 次提交
  11. 13 3月, 2009 1 次提交
    • A
      DisplayAllocator interface (Stefano Stabellini) · 7b5d76da
      aliguori 提交于
      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
      changes).
      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: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6839 c046a42c-6fe2-441c-8c8c-71466251a162
      7b5d76da
  12. 06 3月, 2009 4 次提交
    • A
      monitor: Rework API (Jan Kiszka) · 376253ec
      aliguori 提交于
      Refactor the monitor API and prepare it for decoupled terminals:
      term_print functions are renamed to monitor_* and all monitor services
      gain a new parameter (mon) that will once refer to the monitor instance
      the output is supposed to appear on. However, the argument remains
      unused for now. All monitor command callbacks are also extended by a mon
      parameter so that command handlers are able to pass an appropriate
      reference to monitor output services.
      
      For the case that monitor outputs so far happen without clearly
      identifiable context, the global variable cur_mon is introduced that
      shall once provide a pointer either to the current active monitor (while
      processing commands) or to the default one. On the mid or long term,
      those use case will be obsoleted so that this variable can be removed
      again.
      
      Due to the broad usage of the monitor interface, this patch mostly deals
      with converting users of the monitor API. A few of them are already
      extended to pass 'mon' from the command handler further down to internal
      functions that invoke monitor_printf.
      
      At this chance, monitor-related prototypes are moved from console.h to
      a new monitor.h. The same is done for the readline API.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
      376253ec
    • A
      monitor: Rework modal password input (Jan Kiszka) · bb5fc20f
      aliguori 提交于
      Currently, waiting for the user to type in some password blocks the
      whole VM because monitor_readline starts its own I/O loop. And this loop
      also screws up reading passwords from virtual console.
      
      Patch below fixes the shortcomings by using normal I/O processing also
      for waiting on a password. To keep to modal property for the monitor
      terminal, the command handler is temporarily replaced by a password
      handler and a callback infrastructure is established to process the
      result before switching back to command mode.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6710 c046a42c-6fe2-441c-8c8c-71466251a162
      bb5fc20f
    • A
      monitor: Break out readline_show_prompt (Jan Kiszka) · 9dd442b1
      aliguori 提交于
      Break readline_show_prompt out of readline_start so that (re-)printing
      the prompt can be controlled in a more fine-grained way.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6709 c046a42c-6fe2-441c-8c8c-71466251a162
      9dd442b1
    • A
      monitor: Rework early disk password inquiry (Jan Kiszka) · c0f4ce77
      aliguori 提交于
      Reading the passwords for encrypted hard disks during early startup is
      broken (I guess for quiet a while now):
       - No monitor terminal is ready for input at this point
       - Forcing all mux'ed terminals into monitor mode can confuse other
         users of that channels
      
      To overcome these issues and to lay the ground for a clean decoupling of
      monitor terminals, this patch changes the initial password inquiry as
      follows:
       - Prevent autostart if there is some encrypted disk
       - Once the user tries to resume the VM, prompt for all missing
         passwords
       - Only resume if all passwords were accepted
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6707 c046a42c-6fe2-441c-8c8c-71466251a162
      c0f4ce77
  13. 04 3月, 2009 1 次提交
  14. 26 1月, 2009 1 次提交
  15. 24 1月, 2009 1 次提交
  16. 17 1月, 2009 2 次提交
    • A
      Fix character devices after DisplayState refactoring · 2796dae0
      aliguori 提交于
      The DisplayState refactoring changed the machine init function to create a
      DisplayState for each VGA device instead of being passed an existing
      DisplayState.  This change is critical to enable multiple graphics device
      support.
      
      Unfortunately, the serial/parallel/console code is structured today to run
      before machine init to fill out the CharDriverState table which the machine
      init function uses to determine whether to create the required devices.
      
      Since a 'vc' is a type of CharDriverState, the CharDriverState code requires
      that a DisplayState exist before it runs creating a circular dependency.
      
      To fix this, this splits the creation of the initial CharDriverState from
      the initialization of the text console.  We can then in a second step associate
      a DisplayState with all TextConsoles.  This allows us to create the
      CharDriverState's first, machine init, then associate the TextConsoles with
      a DisplayState.
      
      This code screams for more cleanup.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6352 c046a42c-6fe2-441c-8c8c-71466251a162
      2796dae0
    • A
      graphical_console_init change (Stefano Stabellini) · 3023f332
      aliguori 提交于
      Patch 5/7
      
      This patch changes the graphical_console_init function to return an
      allocated DisplayState instead of a QEMUConsole.
      
      This patch contains just the graphical_console_init change and few other
      modifications mainly in console.c and vl.c.
      It was necessary to move the display frontends (e.g. sdl and vnc)
      initialization after machine->init in vl.c.
      
      This patch does *not* include any required changes to any device, these
      changes come with the following patches.
      
      Patch 6/7
      
      This patch changes the QEMUMachine init functions not to take a
      DisplayState as an argument because is not needed any more;
      
      In few places the graphic hardware initialization function was called
      only if DisplayState was not NULL, now they are always called.
      Apart from these cases, the rest are all mechanical substitutions.
      
      Patch 7/7
      
      This patch updates the graphic device code to use the new
      graphical_console_init function.
      
      As for the previous patch, in few places graphical_console_init was called
      only if DisplayState was not NULL, now it is always called.
      Apart from these cases, the rest are all mechanical substitutions.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6344 c046a42c-6fe2-441c-8c8c-71466251a162
      3023f332
  17. 16 1月, 2009 2 次提交
    • A
      DisplayState interface change (Stefano Stabellini) · 7d957bd8
      aliguori 提交于
      This patch changes the DisplayState interface adding support for
      multiple frontends at the same time (sdl and vnc) and implements most
      of the benefit of the shared_buf patch without the added complexity.
      
      Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is
      also responsible for allocating the data and setting the depth.
      Vga.c (or another backend) will do any necessary conversion.
      
      The idea is to change it so that is vga.c (or another backend) together
      with console.c that fully manage the DisplayState interface allocating
      data and setting the depth (either 16 or 32 bit, if the guest uses a
      different resolution or is in text mode, vga.c (or another backend) is
      in charge of doing the conversion seamlessly).
      
      The other idea is that DisplayState supports *multiple* frontends
      like sdl and vnc; each of them can register some callbacks to be called
      when a display event occurs.
      
      The interesting changes are:
      
      - the new structures and related functions in console.h and console.c
      
      in particular the following functions are very helpful to manage a
      DisplaySurface:
      
      qemu_create_displaysurface
      qemu_resize_displaysurface
      qemu_create_displaysurface_from
      qemu_free_displaysurface
      
      - console_select and qemu_console_resize in console.c
      this two functions manage multiple consoles on a single host display
      
      - moving code around in hw/vga.c
      as for the shared_buf patch this is necessary to be able to handle a dynamic
      DisplaySurface bpp
      
      - changes to vga_draw_graphic in hw/vga.c
      this is the place where the DisplaySurface buffer is shared with the
      videoram, when possible;
      
      
      Compared to the last version the only changes are:
      
      - do not remove support to dpy_copy in cirrus_vga
      - change the name of the displaysurface handling functions
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6336 c046a42c-6fe2-441c-8c8c-71466251a162
      7d957bd8
    • A
      remove bgr (Stefano Stabellini) · 8927bcfd
      aliguori 提交于
      Do not handle bgr host displays in the backends.
      
      Right now a bgr flag exists so that sdl can set it, if the SDL_Surface
      is bgr.
      Afterwards the graphic device (e.g. vga.c) does the needed conversion.
      
      With this patch series is sdl that is responsible for rendering the format
      provided by the graphic device that must provide a DisplaySurface
      (ds->surface) in 16 or 32 bpp, rgb.
      Afterwards sdl creates a SDL_Surface from the given DisplaySurface and
      blits it into the main SDL_Surface using SDL_BlitSurface.
      
      Everything is handled by sdl transparently, because SDL_BlitSurface is
      perfectly capable of handling bgr displays by itself.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6335 c046a42c-6fe2-441c-8c8c-71466251a162
      8927bcfd
  18. 25 11月, 2008 1 次提交
  19. 06 10月, 2008 1 次提交
  20. 24 9月, 2008 2 次提交
  21. 22 8月, 2008 3 次提交
  22. 19 8月, 2008 1 次提交
  23. 01 8月, 2008 1 次提交
  24. 02 7月, 2008 1 次提交
  25. 15 4月, 2008 1 次提交
  26. 14 3月, 2008 1 次提交
    • A
      Slowdown SDL while minimized · f442e08b
      aurel32 提交于
      When SDL is invisible/minimized, there is no need to keep calling the
      VGA refresh 33 times per second.  This patch reduces in that case the
      rate to 2 times per second, which should be responsive enough for the
      un-minimizing event.
      
      (Samuel Thibault)
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4050 c046a42c-6fe2-441c-8c8c-71466251a162
      f442e08b
  27. 11 2月, 2008 1 次提交
  28. 18 11月, 2007 1 次提交