diff options
author | Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> | 2014-05-27 15:04:42 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-06-19 16:41:55 +0300 |
commit | 2e6d46d77ed328d34a94688da8371bcbe243479b (patch) | |
tree | b81d5f34c7f98e7c0372bb0db7fb34804b963603 /include/hw/virtio/vhost.h | |
parent | cdaa86a54b232572bba594bf87a7416e527e460c (diff) | |
download | hqemu-2e6d46d77ed328d34a94688da8371bcbe243479b.zip hqemu-2e6d46d77ed328d34a94688da8371bcbe243479b.tar.gz |
vhost: add vhost_get_features and vhost_ack_features
Generalize the features get/ack to be used for both vhost-net and vhost-scsi.
In vhost-net add vhost_net_get_feature_bits to select the feature bit set
depending on the NetClient kind.
Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/vhost.h')
-rw-r--r-- | include/hw/virtio/vhost.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index de24746..df1f214 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -25,6 +25,7 @@ typedef unsigned long vhost_log_chunk_t; #define VHOST_LOG_PAGE 0x1000 #define VHOST_LOG_BITS (8 * sizeof(vhost_log_chunk_t)) #define VHOST_LOG_CHUNK (VHOST_LOG_PAGE * VHOST_LOG_BITS) +#define VHOST_INVALID_FEATURE_BIT (0xff) struct vhost_memory; struct vhost_dev { @@ -68,4 +69,8 @@ bool vhost_virtqueue_pending(struct vhost_dev *hdev, int n); */ void vhost_virtqueue_mask(struct vhost_dev *hdev, VirtIODevice *vdev, int n, bool mask); +unsigned vhost_get_features(struct vhost_dev *hdev, const int *feature_bits, + unsigned features); +void vhost_ack_features(struct vhost_dev *hdev, const int *feature_bits, + unsigned features); #endif |