qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v7 0/4] Support mapping virtio-gpu virgl hostmem blobs using MAP_FIXED API
@ 2025-12-08 21:40 Dmitry Osipenko
  2025-12-08 21:40 ` [RFC PATCH v7 1/4] virtio-gpu: Remove superfluous memory_region_set_enabled() Dmitry Osipenko
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2025-12-08 21:40 UTC (permalink / raw)
  To: Akihiko Odaki, Huang Rui, Marc-André Lureau,
	Philippe Mathieu-Daudé, Gerd Hoffmann, Alex Bennée,
	Pierre-Eric Pelloux-Prayer, Michael S . Tsirkin, Paolo Bonzini,
	Yiwei Zhang, Sergio Lopez Pascual
  Cc: Gert Wollny, qemu-devel, Gurchetan Singh, Alyssa Ross,
	Roger Pau Monné, Alex Deucher, Stefano Stabellini,
	Christian König, Xenia Ragiadakou, Honglei Huang,
	Julia Zhang, Chen Jiqian, Rob Clark, Robert Beckett

Virglrender got a new API that allows mapping host blobs at a given
memory address using MAP_FIXED mmap flag [1]. Usage of this new API brings
major performance and stability improvement for venus and drm native contexts,
see commit message of the RFC patch for details.

Sending early to collect review feeback and have patch prepared by the
time new version of libvirglrenderer will be released with the stabilized
API.

[1] https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1374

Based-on: 20251116125641.2255794-1-dmitry.osipenko@collabora.com

Changelog:

v7: - Changed virtio_gpu_virgl_reset() to keep virtio-gpu in reset state
      when reset fails and renamed cmd_suspended -> suspended argument
      of resource_unref(), as was suggested by Akihiko Odaki.

v6: - Updated comment for virtio_gpu_virgl_reset(), removing part
      telling that reset at "runtime" is unexpected and removing
      excessive error message about a failed reset. Requested by
      Akihiko Odaki.

v5: - Switched to use error_setg_errno() for qemu_ram_mmap() error
      handling, as was suggested Akihiko Odaki.

    - Added r-b from Alex Bennée to the first patch.

    - Moved hostmem mapping offset validation to upper function as
      was suggested by Alex Bennée.

    - Dropped all patches and changes that made funcs to return -1
      since it was rejected by Alex Bennée. Refactoring can be done
      later on in a separate patchset.

    - Extended clarifying comment of virtio_gpu_virgl_reset().

v4: - Addressed v3 review comments from Akihiko Odaki.

    - Dropped patch making resource_unmap() error reported as a host
      failure instead of guest and added patch improving resource_map_blob()
      error reporting.

    - Re-added CONFIG_WIN32 checks.

    - Added clarifying comment to virtio_gpu_virgl_reset() RE unsupported
      context restoring.

v3: - Addressed v2 review comments from Akihiko Odaki.

    - Droped check for CONFIG_WIN32. My current understanding that
      MAP_FIXED is supported by Cygwin.

    - Added new patches resetting virgl resources, validating hostmem
      offset and improving error-handlings.

    - Added r-b from Akihiko Odaki to the frist patch and t-b from
      Yiwei Zhang to the map_fixed patch.

v2: - Addressed v1 review comments from Akihiko Odaki

    - Added patch that removes unnecessary memory_region_set_enabled(),
      suggested by Akihiko Odaki

Dmitry Osipenko (4):
  virtio-gpu: Remove superfluous memory_region_set_enabled()
  virtio-gpu: Validate hostmem mapping offset
  virtio-gpu: Destroy virgl resources on virtio-gpu reset
  virtio-gpu: Support mapping hostmem blobs with map_fixed

 hw/display/virtio-gpu-gl.c     |  45 +++++++++-
 hw/display/virtio-gpu-virgl.c  | 155 ++++++++++++++++++++++++++++-----
 include/hw/virtio/virtio-gpu.h |   8 +-
 3 files changed, 181 insertions(+), 27 deletions(-)

-- 
2.51.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-11 14:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-08 21:40 [RFC PATCH v7 0/4] Support mapping virtio-gpu virgl hostmem blobs using MAP_FIXED API Dmitry Osipenko
2025-12-08 21:40 ` [RFC PATCH v7 1/4] virtio-gpu: Remove superfluous memory_region_set_enabled() Dmitry Osipenko
2025-12-08 21:40 ` [RFC PATCH v7 2/4] virtio-gpu: Validate hostmem mapping offset Dmitry Osipenko
2025-12-08 21:40 ` [RFC PATCH v7 3/4] virtio-gpu: Destroy virgl resources on virtio-gpu reset Dmitry Osipenko
2025-12-11 14:37   ` Akihiko Odaki
2025-12-08 21:40 ` [RFC PATCH v7 4/4] virtio-gpu: Support mapping hostmem blobs with map_fixed Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).