mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 22:12:32 -04:00
virtio: add dma-buf support for exported objects
This change adds a new flavor of dma-bufs that can be used by virtio drivers to share exported objects. A virtio dma-buf can be queried by virtio drivers to obtain the UUID which identifies the underlying exported object. Signed-off-by: David Stevens <stevensd@chromium.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200818071343.3461203-2-stevensd@chromium.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
Gerd Hoffmann
parent
bbaac1354c
commit
a0308938ec
@@ -357,6 +357,12 @@ out:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(register_virtio_device);
|
||||
|
||||
bool is_virtio_device(struct device *dev)
|
||||
{
|
||||
return dev->bus == &virtio_bus;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(is_virtio_device);
|
||||
|
||||
void unregister_virtio_device(struct virtio_device *dev)
|
||||
{
|
||||
int index = dev->index; /* save for after device release */
|
||||
|
||||
Reference in New Issue
Block a user