On 2024/05/16 1:39, Dmitry Osipenko wrote:
On 5/13/24 12:18, Akihiko Odaki wrote:
     static void virgl_cmd_resource_unref(VirtIOGPU *g,
-                                     struct virtio_gpu_ctrl_command
*cmd)
+                                     struct virtio_gpu_ctrl_command
*cmd,
+                                     bool *cmd_suspended)

This parameter is not used as it returns an error if the resource is
still mapped.

Missed to remove it by accident

It may be better to actually implement unmapping instead of returning an
error for consistency with the iov operation. Apparently crosvm also
unmaps blobs with VIRTIO_GPU_CMD_RESOURCE_UNREF.

Then I'll add back `async_unmap_in_progress` because resource can be
both mapped/unmapped on unref, and we'll need flag to know whether async
unmapping has been finished to do the final unmapping of the resource.

Such a situation should be already handled since unmapping in progress blocks all commands (not just VIRTIO_GPU_CMD_RESOURCE_UNMAP_BLOB but literally all, including VIRTIO_GPU_CMD_RESOURCE_UNREF).

Reply via email to