1. 29 9月, 2017 1 次提交
  2. 31 8月, 2017 1 次提交
  3. 12 5月, 2017 1 次提交
    • G
      opengl: add egl-headless display · bb1599b6
      Gerd Hoffmann 提交于
      Add egl-headless user interface.  It doesn't provide a real user
      interface, it only provides opengl support using drm render nodes.
      It will copy back the bits rendered by the guest using virgl back
      to a DisplaySurface and kick the usual display update code paths,
      so spice and vnc and screendump can pick it up.
      
      Use it this way:
        qemu -display egl-headless -vnc $display
        qemu -display egl-headless -spice gl=off,$args
      
      Note that you should prefer native spice opengl support (-spice
      gl=on) if possible because that delivers better performance.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20170505104101.30589-7-kraxel@redhat.com
      bb1599b6
  4. 16 3月, 2017 1 次提交
    • G
      cirrus/vnc: zap bitblit support from console code. · 50628d34
      Gerd Hoffmann 提交于
      There is a special code path (dpy_gfx_copy) to allow graphic emulation
      notify user interface code about bitblit operations carryed out by
      guests.  It is supported by cirrus and vnc server.  The intended purpose
      is to optimize display scrolls and just send over the scroll op instead
      of a full display update.
      
      This is rarely used these days though because modern guests simply don't
      use the cirrus blitter any more.  Any linux guest using the cirrus drm
      driver doesn't.  Any windows guest newer than winxp doesn't ship with a
      cirrus driver any more and thus uses the cirrus as simple framebuffer.
      
      So this code tends to bitrot and bugs can go unnoticed for a long time.
      See for example commit "3e10c3ec vnc: fix qemu crash because of SIGSEGV"
      which fixes a bug lingering in the code for almost a year, added by
      commit "c7628bff vnc: only alloc server surface with clients connected".
      
      Also the vnc server will throttle the frame rate in case it figures the
      network can't keep up (send buffers are full).  This doesn't work with
      dpy_gfx_copy, for any copy operation sent to the vnc client we have to
      send all outstanding updates beforehand, otherwise the vnc client might
      run the client side blit on outdated data and thereby corrupt the
      display.  So this dpy_gfx_copy "optimization" might even make things
      worse on slow network links.
      
      Lets kill it once for all.
      
      Oh, and one more reason: Turns out (after writing the patch) we have a
      security bug in that code path ...
      
      Fixes: CVE-2016-9603
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1489494419-14340-1-git-send-email-kraxel@redhat.com
      50628d34
  5. 27 2月, 2017 2 次提交
  6. 28 1月, 2017 1 次提交
    • M
      chardev: qom-ify · 777357d7
      Marc-André Lureau 提交于
      Turn Chardev into Object.
      
      qemu_chr_alloc() is replaced by the qemu_chardev_new() constructor. It
      will call qemu_char_open() to open/intialize the chardev with the
      ChardevCommon *backend settings.
      
      The CharDriver::create() callback is turned into a ChardevClass::open()
      which is called from the newly introduced qemu_chardev_open().
      
      "chardev-gdb" and "chardev-hci" are internal chardev and aren't
      creatable directly with -chardev. Use a new internal flag to disable
      them. We may want to use TYPE_USER_CREATABLE interface instead, or
      perhaps allow -chardev usage.
      
      Although in general we keep typename and macros private, unless the type
      is being used by some other file, in this patch, all types and common
      helper macros for qemu-char.c are in char.h. This is to help transition
      now (some types must be declared early, while some aren't shared) and
      when splitting in several units. This is to be improved later.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      777357d7
  7. 10 1月, 2017 2 次提交
    • S
      curses: Fix compiler warnings (Mingw-w64 redefinition of macro KEY_EVENT) · f27ff810
      Stefan Weil 提交于
      For builds with Mingw-w64 as it is included in Cygwin, there are two
      header files which define KEY_EVENT with different values.
      
      This results in lots of compiler warnings like this one:
      
        CC      vl.o
      In file included from /qemu/include/ui/console.h:340:0,
                       from /qemu/vl.c:76:
      /usr/i686-w64-mingw32/sys-root/mingw/include/curses.h:1522:0: warning: "KEY_EVENT" redefined
       #define KEY_EVENT 0633  /* We were interrupted by an event */
      
      In file included from /usr/share/mingw-w64/include/windows.h:74:0,
                       from /usr/share/mingw-w64/include/winsock2.h:23,
                       from /qemu/include/sysemu/os-win32.h:29,
                       from /qemu/include/qemu/osdep.h:100,
                       from /qemu/vl.c:24:
      /usr/share/mingw-w64/include/wincon.h:101:0: note: this is the location of the previous definition
       #define KEY_EVENT 0x1
      
      QEMU only uses the KEY_EVENT macro from wincon.h.
      Therefore we can undefine the macro coming from curses.h.
      
      The explicit include statement for curses.h in ui/curses.c is not needed
      and was removed.
      
      Those two modifications fix the redefinition warnings.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Acked-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
      Message-id: 20161119185318.10564-1-sw@weilnetz.de
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      f27ff810
    • S
      console: add API to get underlying gui window ID · b3cb21b9
      Samuel Thibault 提交于
      This adds two console functions, qemu_console_set_window_id and
      qemu_graphic_console_get_window_id, to let graphical backend record the
      window id in the QemuConsole structure, and let the baum driver read it.
      Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
      Message-id: 20161221003806.22412-2-samuel.thibault@ens-lyon.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      b3cb21b9
  8. 28 9月, 2016 1 次提交
  9. 15 9月, 2016 1 次提交
  10. 06 7月, 2016 1 次提交
  11. 29 6月, 2016 1 次提交
  12. 21 5月, 2016 5 次提交
  13. 11 4月, 2016 1 次提交
    • G
      ui/virtio-gpu: add and use qemu_create_displaysurface_pixman · ca58b45f
      Gerd Hoffmann 提交于
      Add a the new qemu_create_displaysurface_pixman function, to create
      a DisplaySurface backed by an existing pixman image.  In that case
      there is no need to create a new pixman image pointing to the same
      backing storage.  We can just use the existing image directly.
      
      This does not only simplify things a bit, but most importantly it
      gets the reference counting right, so the backing storage for the
      pixman image wouldn't be released underneath us.
      
      Use new function in virtio-gpu, where using it actually fixes
      use-after-free crashes.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1459499240-742-1-git-send-email-kraxel@redhat.com
      ca58b45f
  14. 23 3月, 2016 1 次提交
  15. 01 3月, 2016 1 次提交
  16. 23 2月, 2016 1 次提交
    • P
      include: Clean up includes · 90ce6e26
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      
      NB: If this commit breaks compilation for your out-of-tree
      patchseries or fork, then you need to make sure you add
      #include "qemu/osdep.h" to any new .c files that you have.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      90ce6e26
  17. 03 2月, 2016 2 次提交
  18. 08 1月, 2016 1 次提交
    • O
      ui/curses: Fix color attribute of monitor for curses · 4083733d
      OGAWA Hirofumi 提交于
      Current text_console_update() writes totally broken color attributes
      to console_write_ch(). The format now is writing,
      
      [WRONG]
      	bold << 21 | fg << 12 | bg << 8 | char
      	fg == 3bits curses color number
      	bg == 3bits curses color number
      
      I can't see this format is where come from. Anyway, this doesn't work
      at all.
      
      What curses expects is actually (and vga.c is using),
      
      [RIGHT]
      	bold << 21 | bg << 11 | fg << 8 | char
      	fg == 3bits vga color number
      	bg == 3bits vga color number
      
      And curses set COLOR_PAIR() up to match this format, and curses's
      chtype. I.e,
      
      	bold | color_pair | char
      	color_pair == (bg << 3 | fg)
      
      To fix, this simply uses VGA color number everywhere except curses.c
      internal. Then, convert it to above [RIGHT] format to write by
      console_write_ch(). And as bonus, this reduces to expose curses define
      to other parts (removes COLOR_* from console.c).
      
      [Tested the first line is displayed as white on blue back for monitor
      in curses console]
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Message-id: 87r3j95407.fsf@mail.parknet.co.jp
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4083733d
  19. 03 11月, 2015 1 次提交
  20. 08 10月, 2015 1 次提交
  21. 23 6月, 2015 2 次提交
    • M
      Include monitor/monitor.h exactly where needed · a0b1a66e
      Markus Armbruster 提交于
      In particular, don't include it into headers.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
      a0b1a66e
    • M
      QemuOpts: Wean off qerror_report_err() · 70b94331
      Markus Armbruster 提交于
      qerror_report_err() is a transitional interface to help with
      converting existing monitor commands to QMP.  It should not be used
      elsewhere.
      
      The only remaining user in qemu-option.c is qemu_opts_parse().  Is it
      used in QMP context?  If not, we can simply replace
      qerror_report_err() by error_report_err().
      
      The uses in qemu-img.c, qemu-io.c, qemu-nbd.c and under tests/ are
      clearly not in QMP context.
      
      The uses in vl.c aren't either, because the only QMP command handlers
      there are qmp_query_status() and qmp_query_machines(), and they don't
      call it.
      
      Remaining uses:
      
      * drive_def(): Command line -drive and such, HMP drive_add and pci_add
      
      * hmp_chardev_add(): HMP chardev-add
      
      * monitor_parse_command(): HMP core
      
      * tmp_config_parse(): Command line -tpmdev
      
      * net_host_device_add(): HMP host_net_add
      
      * net_client_parse(): Command line -net and -netdev
      
      * qemu_global_option(): Command line -global
      
      * vnc_parse_func(): Command line -display, -vnc, default display, HMP
        change, QMP change.  Bummer.
      
      * qemu_pci_hot_add_nic(): HMP pci_add
      
      * usb_net_init(): Command line -usbdevice, HMP usb_add
      
      Propagate errors through qemu_opts_parse().  Create a convenience
      function qemu_opts_parse_noisily() that passes errors to
      error_report_err().  Switch all non-QMP users outside tests to it.
      
      That leaves vnc_parse_func().  Propagate errors through it.  Since I'm
      touching it anyway, rename it to vnc_parse().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
      70b94331
  22. 09 6月, 2015 1 次提交
  23. 05 6月, 2015 1 次提交
    • P
      ui/console: remove dpy_gfx_update_dirty · 42af3e3a
      Paolo Bonzini 提交于
      dpy_gfx_update_dirty expects DIRTY_MEMORY_VGA logging to be always on,
      but that will not be the case soon.  Because it computes the memory
      region on the fly for every update (with memory_region_find), it cannot
      enable/disable logging by itself.
      
      We could always treat updates as invalidations if dirty logging is
      not enabled, assuming that the board will enable logging on the
      RAM region that includes the framebuffer.
      
      However, the function is unused, so just drop it.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      42af3e3a
  24. 29 5月, 2015 2 次提交
    • G
      gtk: add opengl support, using egl · 97edf3bd
      Gerd Hoffmann 提交于
      This adds opengl rendering support to the gtk ui, using egl.
      It's off by default for now, use 'qemu -display gtk,gl=on'
      to play with this.
      
      Note that gtk got native opengl support with release 3.16.
      There most likely will be a separate implementation for 3.16+,
      using the native gtk opengl support.  This patch covers older
      versions (and for the time being 3.16 too, hopefully without
      rendering quirks).
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      97edf3bd
    • G
      ui: use libexpoxy · dcf30025
      Gerd Hoffmann 提交于
      libepoxy does the opengl extension handling for us.
      
      It also is helpful for trouble-shooting as it prints nice error messages
      instead of silently failing or segfaulting in case we do something
      wrong, like using gl commands not supported by the current context.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      dcf30025
  25. 06 5月, 2015 1 次提交
  26. 05 5月, 2015 3 次提交
  27. 22 4月, 2015 1 次提交
  28. 10 3月, 2015 2 次提交