summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2018-06-13 20:17:17 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:36 +0000
commitf2cef5fb9ae20136ca18d16328787b69b3abfa18 (patch)
tree444579d57e72654ca83905a27e64c6a7ea628419 /tools
parent204d8ae57b3c57098642c79b3c03d42495149c09 (diff)
downloadfocaccia-qemu-f2cef5fb9ae20136ca18d16328787b69b3abfa18.tar.gz
focaccia-qemu-f2cef5fb9ae20136ca18d16328787b69b3abfa18.zip
virtiofsd: get/set features callbacks
Add the get/set features callbacks.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/fuse_virtio.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 1928a2025c..4819e56568 100644
--- a/tools/virtiofsd/fuse_virtio.c
+++ b/tools/virtiofsd/fuse_virtio.c
@@ -46,6 +46,17 @@ struct virtio_fs_config {
     uint32_t num_queues;
 };
 
+/* Callback from libvhost-user */
+static uint64_t fv_get_features(VuDev *dev)
+{
+    return 1ULL << VIRTIO_F_VERSION_1;
+}
+
+/* Callback from libvhost-user */
+static void fv_set_features(VuDev *dev, uint64_t features)
+{
+}
+
 /*
  * Callback from libvhost-user if there's a new fd we're supposed to listen
  * to, typically a queue kick?
@@ -78,7 +89,9 @@ static bool fv_queue_order(VuDev *dev, int qidx)
 }
 
 static const VuDevIface fv_iface = {
-    /* TODO: Add other callbacks */
+    .get_features = fv_get_features,
+    .set_features = fv_set_features,
+
     .queue_is_processed_in_order = fv_queue_order,
 };