diff options
author | Cornelia Huck <cohuck@redhat.com> | 2019-01-03 19:08:04 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-01-15 04:15:17 +0300 |
commit | d1c1dad89e7a8be2cfdc7b92deca2c8048f0d263 (patch) | |
tree | e597a3da2ffd8a936ff932d9e19f74ce9f3653a1 /include/linux/virtio_config.h | |
parent | b89a07c4373b27321b1f6d4b4fdc369fd45ef79d (diff) | |
download | linux-d1c1dad89e7a8be2cfdc7b92deca2c8048f0d263.tar.xz |
virtio: document virtio_config_ops restrictions
Some transports (e.g. virtio-ccw) implement virtio operations that
seem to be a simple read/write as something more involved that
cannot be done from an atomic context.
Give at least a hint about that.
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r-- | include/linux/virtio_config.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 7087ef946ba7..987b6491b946 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -12,6 +12,11 @@ struct irq_affinity; /** * virtio_config_ops - operations for configuring a virtio device + * Note: Do not assume that a transport implements all of the operations + * getting/setting a value as a simple read/write! Generally speaking, + * any of @get/@set, @get_status/@set_status, or @get_features/ + * @finalize_features are NOT safe to be called from an atomic + * context. * @get: read the value of a configuration field * vdev: the virtio_device * offset: the offset of the configuration field |