diff options
author | Eugenio Pérez <eperezma@redhat.com> | 2022-07-20 08:59:35 +0200 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2022-07-20 16:58:08 +0800 |
commit | ac4cfdc6f39c06732d27554523f9d5f8a53b4ffa (patch) | |
tree | 3f50c24d1f98f4cd906262bc51616ec770cb52fd /hw/virtio/vhost-shadow-virtqueue.h | |
parent | 9e87868fcaf5785c8e1490c290505fa32305ff91 (diff) |
vhost: Track number of descs in SVQDescState
A guest's buffer continuos on GPA may need multiple descriptors on
qemu's VA, so SVQ should track its length sepparatedly.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/virtio/vhost-shadow-virtqueue.h')
-rw-r--r-- | hw/virtio/vhost-shadow-virtqueue.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/virtio/vhost-shadow-virtqueue.h b/hw/virtio/vhost-shadow-virtqueue.h index d646c35054..5c7e7cbab6 100644 --- a/hw/virtio/vhost-shadow-virtqueue.h +++ b/hw/virtio/vhost-shadow-virtqueue.h @@ -17,6 +17,12 @@ typedef struct SVQDescState { VirtQueueElement *elem; + + /* + * Number of descriptors exposed to the device. May or may not match + * guest's + */ + unsigned int ndescs; } SVQDescState; /* Shadow virtqueue to relay notifications */ |