summary refs log tree commit diff stats
path: root/hw/display/vhost-user-gpu.c
diff options
context:
space:
mode:
authorWafer <wafer@jaguarmicro.com>2024-05-10 15:27:53 +0800
committerMichael S. Tsirkin <mst@redhat.com>2024-07-01 14:56:23 -0400
commit33abfea239592a706e98269b01c0096249612ea4 (patch)
tree922b5f1aaff116b9f1e39dda54f11dc343e2507e /hw/display/vhost-user-gpu.c
parenta0eebd790ca4f90fc1e3662cb38542ccc21963bf (diff)
downloadfocaccia-qemu-33abfea239592a706e98269b01c0096249612ea4.tar.gz
focaccia-qemu-33abfea239592a706e98269b01c0096249612ea4.zip
hw/virtio: Fix obtain the buffer id from the last descriptor
The virtio-1.3 specification
<https://docs.oasis-open.org/virtio/virtio/v1.3/virtio-v1.3.html> writes:
2.8.6 Next Flag: Descriptor Chaining
      Buffer ID is included in the last descriptor in the list.

If the feature (_F_INDIRECT_DESC) has been negotiated, install only
one descriptor in the virtqueue.
Therefor the buffer id should be obtained from the first descriptor.

In descriptor chaining scenarios, the buffer id should be obtained
from the last descriptor.

Fixes: 86044b24e8 ("virtio: basic packed virtqueue support")

Signed-off-by: Wafer <wafer@jaguarmicro.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20240510072753.26158-2-wafer@jaguarmicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/display/vhost-user-gpu.c')
0 files changed, 0 insertions, 0 deletions