mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
2e123b44a3
commit
404123c2db
2 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue