diff options
author | Sasha Levin <levinsasha928@gmail.com> | 2011-08-14 17:52:32 +0300 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-11-02 11:40:58 +1030 |
commit | 3ead6f4d42e2866a48d7abf9bc98553f1110b6df (patch) | |
tree | db9bcecd8d232b0f3b9fb14589c58a872c400539 /include/linux/virtio_config.h | |
parent | 51c6d61ac58844b5e3e0d28271084c06f6a15371 (diff) | |
download | blackbird-op-linux-3ead6f4d42e2866a48d7abf9bc98553f1110b6df.tar.gz blackbird-op-linux-3ead6f4d42e2866a48d7abf9bc98553f1110b6df.zip |
virtio_config: Add virtio_config_val_len()
This patch adds virtio_config_val_len() which allows retrieving variable
length data from the virtio config space only if a specific feature is on.
Cc: Amit Shah <amit.shah@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r-- | include/linux/virtio_config.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 39c88c5ad19d..add4790b21fe 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -155,6 +155,9 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, #define virtio_config_val(vdev, fbit, offset, v) \ virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v)) +#define virtio_config_val_len(vdev, fbit, offset, v, len) \ + virtio_config_buf((vdev), (fbit), (offset), (v), (len)) + static inline int virtio_config_buf(struct virtio_device *vdev, unsigned int fbit, unsigned int offset, |