diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-05-27 16:15:52 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-05-27 16:15:52 +0200 |
commit | ce1d966a302229a88bcb4398a5ca76d657b06848 (patch) | |
tree | 812671d666fef8b5a955087cff5dc7b3cd555a35 /drivers/vhost/vhost.h | |
parent | f8af9113b1cf71cd21b0a027d38b06c15989c789 (diff) | |
parent | 9cb1fd0efd195590b828b9b865421ad345a4a145 (diff) |
Merge tag 'v5.7-rc7' into devel
Linux 5.7-rc7
Diffstat (limited to 'drivers/vhost/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 181382185bbc..f8403bd46b85 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -231,6 +231,33 @@ enum { (1ULL << VIRTIO_F_VERSION_1) }; +/** + * vhost_vq_set_backend - Set backend. + * + * @vq Virtqueue. + * @private_data The private data. + * + * Context: Need to call with vq->mutex acquired. + */ +static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, + void *private_data) +{ + vq->private_data = private_data; +} + +/** + * vhost_vq_get_backend - Get backend. + * + * @vq Virtqueue. + * + * Context: Need to call with vq->mutex acquired. + * Return: Private data previously set with vhost_vq_set_backend. + */ +static inline void *vhost_vq_get_backend(struct vhost_virtqueue *vq) +{ + return vq->private_data; +} + static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) { return vq->acked_features & (1ULL << bit); |