qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e561b3: ui/gtk-gl-area: implement GL context


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] e561b3: ui/gtk-gl-area: implement GL context destruction
Date: Tue, 14 Jun 2022 06:22:28 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: e561b3b7df11875d7bd3b8670598cae5601a7f70
      
https://github.com/qemu/qemu/commit/e561b3b7df11875d7bd3b8670598cae5601a7f70
  Author: Volker Rümelin <vr_qemu@t-online.de>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M ui/gtk-gl-area.c
    M ui/trace-events

  Log Message:
  -----------
  ui/gtk-gl-area: implement GL context destruction

The counterpart function for gd_gl_area_create_context() is
currently empty. Implement the gd_gl_area_destroy_context()
function to avoid GL context leaks.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20220605085131.7711-1-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 09053670c9b83f1f4759f37e62a6f2b1a5bbd105
      
https://github.com/qemu/qemu/commit/09053670c9b83f1f4759f37e62a6f2b1a5bbd105
  Author: Volker Rümelin <vr_qemu@t-online.de>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M ui/gtk-gl-area.c
    M ui/trace-events

  Log Message:
  -----------
  ui/gtk-gl-area: create the requested GL context version

Since about 2018 virglrenderer (commit fa835b0f88 "vrend: don't
hardcode context version") tries to open the highest available GL
context version. This is done by creating the known GL context
versions from the highest to the lowest until (*create_gl_context)
returns a context != NULL.

This does not work properly with
the current QEMU gd_gl_area_create_context() function, because
gdk_gl_context_realize() on Wayland creates a version 3.0 legacy
context if the requested GL context version can't be created.

In order for virglrenderer to find the highest available GL
context version, return NULL if the created context version is
lower than the requested version.

This fixes the following error:
QEMU started with -device virtio-vga-gl -display gtk,gl=on.
Under Wayland, the guest window remains black and the following
information can be seen on the host.

gl_version 30 - compat profile
(qemu:5978): Gdk-WARNING **: 16:19:01.533:
  gdk_gl_context_set_required_version
  - GL context versions less than 3.2 are not supported.

(qemu:5978): Gdk-WARNING **: 16:19:01.537:
  gdk_gl_context_set_required_version -
  GL context versions less than 3.2 are not supported.

(qemu:5978): Gdk-WARNING **: 16:19:01.554:
  gdk_gl_context_set_required_version -
  GL context versions less than 3.2 are not supported.
vrend_renderer_fill_caps: Entering with stale GL error: 1282

To reproduce this error, an OpenGL driver is required on the host
that doesn't have the latest OpenGL extensions fully implemented.
An example for this is the Intel i965 driver on a Haswell processor.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20220605085131.7711-2-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 2910abd6b4364ee96d2339b2be8858246fcd3161
      
https://github.com/qemu/qemu/commit/2910abd6b4364ee96d2339b2be8858246fcd3161
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Fix poweroff request code

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220529082508.89097-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: d7d34918551dc48a2f6b42b44a12c7a9183f89e6
      
https://github.com/qemu/qemu/commit/d7d34918551dc48a2f6b42b44a12c7a9183f89e6
  Author: Hongren (Zenithal) Zheng <i@zenithal.me>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    A hw/usb/canokey.c
    A hw/usb/canokey.h

  Log Message:
  -----------
  hw/usb: Add CanoKey Implementation

This commit added a new emulated device called CanoKey to QEMU.

CanoKey implements platform independent features in canokey-core
https://github.com/canokeys/canokey-core, and leaves the USB implementation
to the platform.

In this commit the USB part was implemented in QEMU using QEMU's USB APIs,
therefore the emulated CanoKey can communicate with the guest OS using USB.

Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
Message-Id: <YoY6Mgph6f6Hc/zI@Sun>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: d37d0e0e855222b89008930b8675198ce74f8d4f
      
https://github.com/qemu/qemu/commit/d37d0e0e855222b89008930b8675198ce74f8d4f
  Author: Hongren (Zenithal) Zheng <i@zenithal.me>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/usb/canokey.c
    M hw/usb/trace-events

  Log Message:
  -----------
  hw/usb/canokey: Add trace events

Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
Message-Id: <YoY6RoDKQIxSkFwL@Sun>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 8caef8507809634fc70ecb1faa898a0edaf1ae5c
      
https://github.com/qemu/qemu/commit/8caef8507809634fc70ecb1faa898a0edaf1ae5c
  Author: Hongren (Zenithal) Zheng <i@zenithal.me>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/usb/Kconfig
    M hw/usb/meson.build
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  meson: Add CanoKey

Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
Message-Id: <YoY6YRD6cxH21mms@Sun>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 994e735c830f01e58710fdc01f5c527ed2ac7aba
      
https://github.com/qemu/qemu/commit/994e735c830f01e58710fdc01f5c527ed2ac7aba
  Author: Hongren (Zenithal) Zheng <i@zenithal.me>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M docs/system/device-emulation.rst
    A docs/system/devices/canokey.rst

  Log Message:
  -----------
  docs: Add CanoKey documentation

Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
Message-Id: <YoY6ilQimrK+l5NN@Sun>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: adaf4d2e84d30e559327917b0725f98f0d5b8cd4
      
https://github.com/qemu/qemu/commit/adaf4d2e84d30e559327917b0725f98f0d5b8cd4
  Author: Hongren (Zenithal) Zheng <i@zenithal.me>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M docs/system/devices/usb.rst

  Log Message:
  -----------
  docs/system/devices/usb: Add CanoKey to USB devices examples

Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
Message-Id: <YoY6o+QFhzA7VHcZ@Sun>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 5028d66cb2fb5ec6c2997b1ab274230ffdd57bbc
      
https://github.com/qemu/qemu/commit/5028d66cb2fb5ec6c2997b1ab274230ffdd57bbc
  Author: Hongren (Zenithal) Zheng <i@zenithal.me>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: add myself as CanoKey maintainer

Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
Message-Id: <YoY61xI0IcFT1fOP@Sun>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: f471e8b060798f26a7fc339c6152f82f22a7b33d
      
https://github.com/qemu/qemu/commit/f471e8b060798f26a7fc339c6152f82f22a7b33d
  Author: Arnout Engelen <arnout@bzzt.net>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/usb/hcd-ehci.c

  Log Message:
  -----------
  hw/usb/hcd-ehci: fix writeback order

The 'active' bit passes control over a qTD between the guest and the
controller: set to 1 by guest to enable execution by the controller,
and the controller sets it to '0' to hand back control to the guest.

ehci_state_writeback write two dwords to main memory using DMA:
the third dword of the qTD (containing dt, total bytes to transfer,
cpage, cerr and status) and the fourth dword of the qTD (containing
the offset).

This commit makes sure the fourth dword is written before the third,
avoiding a race condition where a new offset written into the qTD
by the guest after it observed the status going to go to '0' gets
overwritten by a 'late' DMA writeback of the previous offset.

This race condition could lead to 'cpage out of range (5)' errors,
and reproduced by:

./qemu-system-x86_64 -enable-kvm -bios $SEABIOS/bios.bin -m 4096 -device 
usb-ehci -blockdev 
driver=file,read-only=on,filename=/home/aengelen/Downloads/openSUSE-Tumbleweed-DVD-i586-Snapshot20220428-Media.iso,node-name=iso
 -device usb-storage,drive=iso,bootindex=0 -chardev 
pipe,id=shell,path=/tmp/pipe -device virtio-serial -device 
virtconsole,chardev=shell -device virtio-rng-pci -serial mon:stdio -nographic

(press a key, select 'Installation' (2), and accept the default
values. On my machine the 'cpage out of range' is reproduced while
loading the Linux Kernel about once per 7 attempts. With the fix in
this commit it no longer fails)

This problem was previously reported as a seabios problem in
https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/OUTHT5ISSQJGXPNTUPY3O5E5EPZJCHM3/
and as a nixos CI build failure in
https://github.com/NixOS/nixpkgs/issues/170803

Signed-off-by: Arnout Engelen <arnout@bzzt.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 0631d4b448454ae8a1ab091c447e3f71ab6e088a
      
https://github.com/qemu/qemu/commit/0631d4b448454ae8a1ab091c447e3f71ab6e088a
  Author: Joelle van Dyne <j@getutm.app>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/usb/redirect.c

  Log Message:
  -----------
  usbredir: avoid queuing hello packet on snapshot restore

When launching QEMU with "-loadvm", usbredir_create_parser() should avoid
setting up the hello packet (just as with "-incoming". On the latest version
of libusbredir, usbredirparser_unserialize() will return error if the parser
is not "pristine."

Signed-off-by: Joelle van Dyne <j@getutm.app>
Message-Id: <20220507041850.98716-1-j@getutm.app>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 45e64ab63d7deb77b9fd1d2a3d43fee5cb17a5b5
      
https://github.com/qemu/qemu/commit/45e64ab63d7deb77b9fd1d2a3d43fee5cb17a5b5
  Author: Dongwon Kim <dongwon.kim@intel.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/display/virtio-gpu.c

  Log Message:
  -----------
  virtio-gpu: update done only on the scanout associated with rect

It only needs to update the scanouts containing the rect area
coming with the resource-flush request from the guest.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20220505214030.4261-1-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 362239c05f28e8185d00d66884729a726ec4d226
      
https://github.com/qemu/qemu/commit/362239c05f28e8185d00d66884729a726ec4d226
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/display/virtio-gpu-base.c
    M hw/display/virtio-vga.c
    M hw/vfio/display.c
    M include/ui/console.h

  Log Message:
  -----------
  ui/console: Do not return a value with ui_info

The returned value is not used and misleading.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220226115516.59830-2-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: aeffd071ed818fa83c723fe8e2715144ee8385c7
      
https://github.com/qemu/qemu/commit/aeffd071ed818fa83c723fe8e2715144ee8385c7
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/display/xenfb.c
    M include/ui/console.h
    M include/ui/gtk.h
    M ui/console.c
    M ui/gtk-egl.c
    M ui/gtk-gl-area.c
    M ui/gtk.c

  Log Message:
  -----------
  ui: Deliver refresh rate via QemuUIInfo

This change adds a new member, refresh_rate to QemuUIInfo in
include/ui/console.h. It represents the refresh rate of the
physical display backend, and it is more appropriate than
GUI update interval as the refresh rate which the emulated device
reports:
- sdl may set GUI update interval shorter than the refresh rate
  of the physical display to respond to user-generated events.
- sdl and vnc aggressively changes GUI update interval, but
  a guests is typically not designed to respond to frequent
  refresh rate changes, or frequent "display mode" changes in
  general. The frequency of refresh rate changes of the physical
  display backend matches better to the guest's expectation.

QemuUIInfo also has other members representing "display mode",
which makes it suitable for refresh rate representation. It has
a throttling of update notifications, and prevents frequent changes
of the display mode.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220226115516.59830-3-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: b95b56311a0890da0c9f7fc624529c3d7f8dbce0
      
https://github.com/qemu/qemu/commit/b95b56311a0890da0c9f7fc624529c3d7f8dbce0
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M hw/display/virtio-gpu-base.c
    M hw/display/virtio-gpu.c
    M include/hw/virtio/virtio-gpu.h

  Log Message:
  -----------
  virtio-gpu: Respect UI refresh rate for EDID

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220226115516.59830-4-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 8e6c70b9d4a1b1f3011805947925cfdb31642f7f
      
https://github.com/qemu/qemu/commit/8e6c70b9d4a1b1f3011805947925cfdb31642f7f
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M MAINTAINERS
    M docs/system/device-emulation.rst
    A docs/system/devices/canokey.rst
    M docs/system/devices/usb.rst
    M hw/display/virtio-gpu-base.c
    M hw/display/virtio-gpu.c
    M hw/display/virtio-vga.c
    M hw/display/xenfb.c
    M hw/usb/Kconfig
    A hw/usb/canokey.c
    A hw/usb/canokey.h
    M hw/usb/hcd-ehci.c
    M hw/usb/meson.build
    M hw/usb/redirect.c
    M hw/usb/trace-events
    M hw/vfio/display.c
    M include/hw/virtio/virtio-gpu.h
    M include/ui/console.h
    M include/ui/gtk.h
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh
    M ui/cocoa.m
    M ui/console.c
    M ui/gtk-egl.c
    M ui/gtk-gl-area.c
    M ui/gtk.c
    M ui/trace-events

  Log Message:
  -----------
  Merge tag 'kraxel-20220614-pull-request' of git://git.kraxel.org/qemu into 
staging

usb: add CanoKey device, fixes for ehci + redir
ui: fixes for gtk and cocoa, rework refresh rate
virtio-gpu: scanout flush fix

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmKoe/8ACgkQTLbY7tPo
# cTgZqw/9HD5dMjP74jwrf14dSCR6FD8PfSZU43YBZtMKMtYIzSgrG0NGmreDIhmr
# ZM+G0By+J8vFaSqDukX31077DnptyrxsANOg3zc28SfOCrI7I/mNVymd9hl+Ydpd
# A7h0DpHxs1mkpTVxGoXZoJRGXUE41rctbFVjG3CGynSG9K2vFQRsJz0jG723dg5Y
# uv+Di1WkhqNkyKNsTEGbz9LNqtdtGzvQm3COBpKoTsl4X3EXIE68Qh7i3cMTSNIw
# KKPARW3oiCOy3Fc4kQW9nSxkkHMS6NPL1uyQ52j7pXYxRdxRaREFQ9Gxst3ie9bS
# mbqSuzS2+1v0w37bq9wE0PiCkmwWnu2KWiWWkAIYlmmZTgHvgxCvPcJaeItmap27
# dsAuPUGBbhhrmUwfMgJXp/wRvoZQc2l9w9+eUklsbI+VTbr6i+r/OoLRmnDJr+K/
# yNscMU1LzoigK0NDdP+PnFl3k8pux0Awtotgfyd+UGTSW8a5L6UFAWIxcUcd0Jjv
# 24jAEEc1S1ciDxJDWYn4+17KJARG7no2PRXsGXCUNaWduGEk8wPK+i6Xk82U36o7
# 7j0N16RFNv1YSUaUJHgtmAMRJIQMCiB42VaYxlDfzKupvq2RgRWaWBD/HozgLhXn
# DjEX+JRAnaOYnn1NURzTNDwnhQethJRXI1ntI1U8IFLYT4baSCY=
# =L5PO
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 14 Jun 2022 05:15:59 AM PDT
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" 
[undefined]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [undefined]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" 
[undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* tag 'kraxel-20220614-pull-request' of git://git.kraxel.org/qemu:
  virtio-gpu: Respect UI refresh rate for EDID
  ui: Deliver refresh rate via QemuUIInfo
  ui/console: Do not return a value with ui_info
  virtio-gpu: update done only on the scanout associated with rect
  usbredir: avoid queuing hello packet on snapshot restore
  hw/usb/hcd-ehci: fix writeback order
  MAINTAINERS: add myself as CanoKey maintainer
  docs/system/devices/usb: Add CanoKey to USB devices examples
  docs: Add CanoKey documentation
  meson: Add CanoKey
  hw/usb/canokey: Add trace events
  hw/usb: Add CanoKey Implementation
  ui/cocoa: Fix poweroff request code
  ui/gtk-gl-area: create the requested GL context version
  ui/gtk-gl-area: implement GL context destruction

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/debd0753663b...8e6c70b9d4a1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]