]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/vhost/vhost.h
Merge tag 'dmaengine-4.19-rc1' of git://git.infradead.org/users/vkoul/slave-dma
[linux.git] / drivers / vhost / vhost.h
index 6c844b90a1687317792bb7687a9955d7436bf572..466ef75422916c020fcb26d27cf812bd99f99284 100644 (file)
@@ -132,6 +132,7 @@ struct vhost_virtqueue {
        struct vhost_umem *iotlb;
        void *private_data;
        u64 acked_features;
+       u64 acked_backend_features;
        /* Log write descriptors */
        void __user *log_base;
        struct vhost_log *log;
@@ -147,7 +148,10 @@ struct vhost_virtqueue {
 };
 
 struct vhost_msg_node {
-  struct vhost_msg msg;
+  union {
+         struct vhost_msg msg;
+         struct vhost_msg_v2 msg_v2;
+  };
   struct vhost_virtqueue *vq;
   struct list_head node;
 };
@@ -238,6 +242,11 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
        return vq->acked_features & (1ULL << bit);
 }
 
+static inline bool vhost_backend_has_feature(struct vhost_virtqueue *vq, int bit)
+{
+       return vq->acked_backend_features & (1ULL << bit);
+}
+
 #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
 static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
 {