• When the vga resolution changes, a new display surface is not allocated
    immediately; instead that is deferred until the next update.  However,
    if we're running without a display client attached, that won't happen
    and the next bitblt is likely to cause a segfault by overflowing the
    display surface.
    
    Fix by reallocating the display immediately when the resolution changes.
    
    Tested with (Windows|Linux) x (cirrus|std) x (curses|sdl).
    
    Changes from v1:
     - fix segfault when switching virtual consoles with curses
    
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6989 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »



  • A pci config write may remap the vga linear frame buffer, confusing the
    memory slot dirty logging logic.
    
    Fixed Windows with -vga std.
    
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Sigend-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6852 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Hi all,
    since vga_draw_graphic is only called by vga_hw_update when the console
    associated with the graphic card is active, we don't need to check if
    the current console is active using is_graphic_console.
    
    I suspect I introduced these checks when the console switching mechanism
    didn't work as it does now.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6840 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • 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: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6839 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »





  • [ The following text is in the "UTF-8" character set. ]
    
        [ Your display is set for the "koi8-r" character set.  ]
    
        [ Some characters may be displayed incorrectly. ]
    
    This patch fixes vga rendering when the guest endianness differs from
    the host endianness: in this case we can only share the buffer if the
    bpp is 32 and we must change the pixelformat accordingly.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6413 c046a42c-6fe2-441c-8c8c-71466251a162
    malc authored
     
    Browse Code »

  • Fix crash introduced in revision 6336.
    
    (Stefano Stabellini)
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6349 c046a42c-6fe2-441c-8c8c-71466251a162
    aurel32 authored
     
    Browse Code »
  • this patch fixes the screendump functionality that was recently broken;
    it must be applied *after* PATCH 5, 6 and 7 of the original displaystate
    change patch series.
    In fact the other patches make much easier to solve the screendump
    problem because they make the console switching mechanism more robust.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6345 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • 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: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6344 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »

  • 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: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6336 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • 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: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6335 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »




  • MMIO exits are more expensive in KVM or Xen than in QEMU because they 
    involve, at least, privilege transitions.  However, MMIO write 
    operations can be effectively batched if those writes do not have side 
    effects.
    
    Good examples of this include VGA pixel operations when in a planar 
    mode.  As it turns out, we can get a nice boost in other areas too.  
    Laurent mentioned a 9.7% performance boost in iperf with the coalesced 
    MMIO changes for the e1000 when he originally posted this work for KVM.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5961 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »