summaryrefslogtreecommitdiff
path: root/include/linux/virtio.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2017-03-29 19:06:20 +0300
committerMichael S. Tsirkin <mst@redhat.com>2017-04-07 16:38:59 +0300
commit404123c2db798027e852480ed9c4accef9f1d9e6 (patch)
tree07f8ecc47704cfbc7759e19d0121acf201f7e6ba /include/linux/virtio.h
parent2e123b44a3c19de75f40ee0081d6d4fc04adfdc7 (diff)
downloadlinux-404123c2db798027e852480ed9c4accef9f1d9e6.tar.xz
virtio: allow drivers to validate features
Some drivers can't support all features in all configurations. At the moment we blindly set FEATURES_OK and later FAILED. Support this better by adding a callback drivers can use to do some early checks. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r--include/linux/virtio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 04b0d3f95043..7edfbdb55a99 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -167,6 +167,7 @@ struct virtio_driver {
unsigned int feature_table_size;
const unsigned int *feature_table_legacy;
unsigned int feature_table_size_legacy;
+ int (*validate)(struct virtio_device *dev);
int (*probe)(struct virtio_device *dev);
void (*scan)(struct virtio_device *dev);
void (*remove)(struct virtio_device *dev);