1. 11 1月, 2019 1 次提交
  2. 10 1月, 2019 1 次提交
  3. 24 8月, 2018 1 次提交
  4. 12 6月, 2018 1 次提交
    • M
      object: fix OBJ_PROP_LINK_UNREF_ON_RELEASE ambivalence · 265b578c
      Marc-André Lureau 提交于
      A link property can be set during creation, with
      object_property_add_link() and later with object_property_set_link().
      
      add_link() doesn't add a reference to the target object, while
      set_link() does.
      
      Furthemore, OBJ_PROP_LINK_UNREF_ON_RELEASE flags, set during add_link,
      says whether a reference must be released when the property is destroyed.
      This can lead to leaks if the property was later set_link(), as the
      added reference is never released.
      
      Instead, rename OBJ_PROP_LINK_UNREF_ON_RELEASE to OBJ_PROP_LINK_STRONG
      and use that has an indication on how the link handle reference
      management in set_link().
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 20180531195119.22021-3-marcandre.lureau@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      265b578c
  5. 18 5月, 2018 1 次提交
    • M
      console: Avoid segfault in screendump · 08d9864f
      Michal Privoznik 提交于
      After f771c544 it is possible to select device and
      head which to take screendump from. And even though we check if
      provided head number falls within range, it may still happen that
      the console has no surface yet leading to SIGSEGV:
      
        qemu.git $ ./x86_64-softmmu/qemu-system-x86_64 \
          -qmp stdio \
          -device virtio-vga,id=video0,max_outputs=4
      
        {"execute":"qmp_capabilities"}
        {"execute":"screendump", "arguments":{"filename":"/tmp/screen.ppm", "device":"video0", "head":1}}
        Segmentation fault
      
       #0  0x00005628249dda88 in ppm_save (filename=0x56282826cbc0 "/tmp/screen.ppm", ds=0x0, errp=0x7fff52a6fae0) at ui/console.c:304
       #1  0x00005628249ddd9b in qmp_screendump (filename=0x56282826cbc0 "/tmp/screen.ppm", has_device=true, device=0x5628276902d0 "video0", has_head=true, head=1, errp=0x7fff52a6fae0) at ui/console.c:375
       #2  0x00005628247740df in qmp_marshal_screendump (args=0x562828265e00, ret=0x7fff52a6fb68, errp=0x7fff52a6fb60) at qapi/qapi-commands-ui.c:110
      
      Here, @ds from frame #0 (or @surface from frame #1) is
      dereferenced at the very beginning of ppm_save(). And because
      it's NULL crash happens.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-id: cb05bb1909daa6ba62145c0194aafa05a14ed3d1.1526569138.git.mprivozn@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      08d9864f
  6. 15 5月, 2018 1 次提交
  7. 27 4月, 2018 1 次提交
  8. 09 4月, 2018 1 次提交
  9. 14 3月, 2018 1 次提交
    • G
      console: minimal hotplug suport · 9588d67e
      Gerd Hoffmann 提交于
      This patch allows to unbind devices from QemuConsoles, using the new
      graphic_console_close() function.  The QemuConsole will show a static
      display then, saying the device was unplugged.  When re-plugging a
      display later on the QemuConsole will be reused.
      
      Eventually we will allocate and release QemuConsoles dynamically at some
      point in the future, that'll need more infrastructure though to notify
      user interfaces (gtk, sdl, spice, ...) about QemuConsoles coming and
      going.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      9588d67e
  10. 12 3月, 2018 2 次提交
  11. 05 3月, 2018 3 次提交
  12. 03 3月, 2018 1 次提交
  13. 22 2月, 2018 1 次提交
  14. 09 2月, 2018 2 次提交
  15. 10 11月, 2017 1 次提交
  16. 17 10月, 2017 1 次提交
    • G
      console: add support for dmabufs · 4133fa71
      Gerd Hoffmann 提交于
      This patch adds support for dma-bufs to the qemu console interfaces.
      It adds a new "struct QemuDmaBuf" to represent a dmabuf with accociated
      metatdata (size, format).  It adds three functions (and
      DisplayChangeListenerOps operations) to set a dma-buf as display
      scanout, as cursor and to release a dmabuf.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20171010135453.6704-2-kraxel@redhat.com
      4133fa71
  17. 13 9月, 2017 2 次提交
  18. 21 6月, 2017 1 次提交
  19. 20 6月, 2017 1 次提交
  20. 02 6月, 2017 2 次提交
  21. 04 5月, 2017 1 次提交
  22. 24 4月, 2017 2 次提交
  23. 28 3月, 2017 2 次提交
  24. 17 3月, 2017 1 次提交
    • A
      ui/console: ensure graphic updates don't race with TCG vCPUs · 8bb93c6f
      Alex Bennée 提交于
      Commit 8d04fb55..
      
        tcg: drop global lock during TCG code execution
      
      ..broke the assumption that updates to the GUI couldn't happen at the
      same time as TCG vCPUs where running. As a result the TCG vCPU could
      still be updating a directly mapped frame-buffer while the display
      side was updating. This would cause artefacts to appear when the
      update code assumed that memory block hadn't changed.
      
      The simplest solution is to ensure the two things can't happen at the
      same time like the old BQL locking scheme. Here we use the solution
      introduced for MTTCG and schedule the update as async_safe_work when
      we know no vCPUs can be running.
      Reported-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 20170315144825.3108-1-alex.bennee@linaro.org
      Cc: BALATON Zoltan <balaton@eik.bme.hu>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      
      [ kraxel: updated comment clarifying the display adapters are buggy
                and this is a temporary workaround ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8bb93c6f
  25. 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
  26. 27 2月, 2017 2 次提交
  27. 31 1月, 2017 3 次提交
  28. 28 1月, 2017 2 次提交
    • 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
    • M
      vc: use a common prefix for chr callbacks · 5bf5adae
      Marc-André Lureau 提交于
      vc_chr_write() is more appropriate than _puts() since no newline is
      appended, even though it's not used only as a callback.
      
      Keep "qemu_chr_parse" prefix, most chardev parse functions use this
      prefix atm.
      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>
      5bf5adae