diff mbox series

[v2,04/15] include/hw/virtio: document vhost_ack_features

Message ID 20220524154056.2896913-5-alex.bennee@linaro.org
State Superseded
Headers show
Series virtio-gpio and various virtio cleanups | expand

Commit Message

Alex Bennée May 24, 2022, 3:40 p.m. UTC
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/hw/virtio/vhost.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Stefan Hajnoczi May 25, 2022, 4:11 p.m. UTC | #1
On Tue, May 24, 2022 at 04:40:45PM +0100, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  include/hw/virtio/vhost.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox series

Patch

diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index 9f9f57c46e..bfe868e341 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -259,6 +259,16 @@  void vhost_virtqueue_mask(struct vhost_dev *hdev, VirtIODevice *vdev, int n,
  */
 uint64_t vhost_get_features(struct vhost_dev *hdev, const int *feature_bits,
                             uint64_t features);
+
+/**
+ * vhost_ack_features() - set vhost acked_features
+ * @hdev: common vhost_dev structure
+ * @feature_bits: pointer to terminated table of feature bits
+ * @features: requested feature set
+ *
+ * This sets the internal hdev->acked_features to the intersection of
+ * the backends advertised features and the supported feature_bits.
+ */
 void vhost_ack_features(struct vhost_dev *hdev, const int *feature_bits,
                         uint64_t features);
 bool vhost_has_free_slot(void);