[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 07/11] virtio-gpu: Handle resource blob commands
- To: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Marc-André Lureau <marcandre.lureau@xxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>, "Michael S . Tsirkin" <mst@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Antonio Caggiano <quic_acaggian@xxxxxxxxxxx>, "Dr . David Alan Gilbert" <dgilbert@xxxxxxxxxx>, Robert Beckett <bob.beckett@xxxxxxxxxxxxx>, Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx>, Gert Wollny <gert.wollny@xxxxxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Pierre-Eric Pelloux-Prayer <pierre-eric@xxxxxxxxx>
- Date: Wed, 10 Jan 2024 13:59:21 +0100
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx>, ernunes@xxxxxxxxxx, Alyssa Ross <hi@xxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@xxxxxxx>, Honglei Huang <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, Chen Jiqian <Jiqian.Chen@xxxxxxx>, Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>
- Delivery-date: Wed, 10 Jan 2024 12:59:33 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Le 21/12/2023 à 09:09, Akihiko Odaki a écrit :
On 2023/12/19 16:53, Huang Rui wrote:
From: Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>
Support BLOB resources creation, mapping and unmapping by calling the
new stable virglrenderer 0.10 interface. Only enabled when available and
via the blob config. E.g. -device virtio-vga-gl,blob=true
I have another concern about delaying virgl_renderer_resource_unref() until the
resource gets unmapped; the guest will expect the resource ID will be available
for a new resource immediately after VIRTIO_GPU_CMD_RESOURCE_UNREF, but it will
break the assumption and may corrupt things.
Yes this is a problem.
And another one is virglrenderer is not really thread-safe, so this callstack:
#0 virgl_resource_blob_async_unmap ()
#1 object_finalize ()
#2 object_unref ()
#3 memory_region_unref ()
#4 flatview_destroy ()
#5 call_rcu_thread ()
#6 qemu_thread_start ()
Will call into virgl_renderer_ctx_resource_unmap which in turn uses
virgl_resource_lookup
without any multithreading considerations.
Regards,
Pierre-Eric
|