diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-12-04 18:49:58 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-12-09 12:06:33 +0200 |
commit | b6098c30423cb1f0f5a4d0a5495e2670e274e544 (patch) | |
tree | 6f3c5ebe2d6fe46677444406eddc8d3a9943a0ea /include/linux/virtio.h | |
parent | 48b36066b48025b7cd7d46c9a879f2f72fd9086a (diff) | |
download | op-kernel-dev-b6098c30423cb1f0f5a4d0a5495e2670e274e544.zip op-kernel-dev-b6098c30423cb1f0f5a4d0a5495e2670e274e544.tar.gz |
virtio: add API to detect legacy devices
transports need to be able to detect legacy-only
devices (ATM balloon only) to use legacy path
to drive them.
Add a core API to do just that.
The implementation just blacklists balloon:
not too pretty, but let's not over-engineer.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r-- | include/linux/virtio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 2bbf626..d666bcb 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -108,6 +108,8 @@ struct virtio_device { void *priv; }; +bool virtio_device_is_legacy_only(struct virtio_device_id id); + static inline struct virtio_device *dev_to_virtio(struct device *_dev) { return container_of(_dev, struct virtio_device, dev); |