]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
virtio: document virtio_config_ops restrictions
authorCornelia Huck <cohuck@redhat.com>
Thu, 3 Jan 2019 16:08:04 +0000 (17:08 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 15 Jan 2019 01:15:17 +0000 (20:15 -0500)
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>
include/linux/virtio_config.h

index 7087ef946ba7f061f744d0332536ee9676d8ceef..987b6491b9461bfe33c9d1306999da1c21c9f63d 100644 (file)
@@ -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