aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2022-05-24 16:40:44 +0100
committerMichael S. Tsirkin <mst@redhat.com>2022-06-27 18:53:18 -0400
commit2055c2a454b4265a7aa360212a75d4731f98429a (patch)
tree39c3d74c0e33d8f0d4b94586fc68866bb4899557
parent26ed501b9958cd319b75231ace8f883cd9331e9d (diff)
downloadqemu-2055c2a454b4265a7aa360212a75d4731f98429a.zip
qemu-2055c2a454b4265a7aa360212a75d4731f98429a.tar.gz
qemu-2055c2a454b4265a7aa360212a75d4731f98429a.tar.bz2
include/hw/virtio: document vhost_get_features
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220524154056.2896913-4-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--include/hw/virtio/vhost.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index 1e7cbd9..bfc71b7 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -247,6 +247,17 @@ bool vhost_virtqueue_pending(struct vhost_dev *hdev, int n);
*/
void vhost_virtqueue_mask(struct vhost_dev *hdev, VirtIODevice *vdev, int n,
bool mask);
+
+/**
+ * vhost_get_features() - return a sanitised set of feature bits
+ * @hdev: common vhost_dev structure
+ * @feature_bits: pointer to terminated table of feature bits
+ * @features: original feature set
+ *
+ * This returns a set of features bits that is an intersection of what
+ * is supported by the vhost backend (hdev->features), the supported
+ * feature_bits and the requested feature set.
+ */
uint64_t vhost_get_features(struct vhost_dev *hdev, const int *feature_bits,
uint64_t features);
void vhost_ack_features(struct vhost_dev *hdev, const int *feature_bits,